Skip to content

Commit e66e5de

Browse files
committed
server: improve comments
1 parent b6427f7 commit e66e5de

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

bin/propolis-server/src/lib/vm/request_queue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ impl ExternalRequestQueue {
332332
// its state are ignored.
333333
//
334334
// Requests to change Crucible volume configuration can still be
335-
// queued if they were previously alloewd. This allows the state
335+
// queued if they were previously allowed. This allows the state
336336
// driver to accept VCR mutations that are needed to allow an
337337
// activation to complete even if the instance is slated to stop
338338
// immediately after starting.

bin/propolis-server/src/lib/vm/state_driver.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -644,14 +644,18 @@ impl StateDriver {
644644
biased;
645645

646646
res = &mut block_backend_fut => {
647+
// If the VM started up successfully, publish that it is
648+
// running and queue up any external requests that were
649+
// deferred while startup was ongoing.
650+
//
651+
// If startup failed, just return the error without changing
652+
// any state or processing any additional requests. The
653+
// caller will move the instance to the appropriate terminal
654+
// state and clean up the VM as needed.
647655
if res.is_ok() {
648656
let objects = &self.objects;
649657
objects.lock_exclusive().await.resume_vcpus();
650658
self.publish_steady_state(InstanceState::Running);
651-
652-
// If a stop request was seen while in the startup
653-
// sequence, self-request a stop for the main event
654-
// loop to handle.
655659
if stopped_while_starting {
656660
self.input_queue.push_self_request(
657661
ExternalRequest::Stop

0 commit comments

Comments
 (0)