Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sled agent: don't publish the Destroyed instance state #3284

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

gjcolombo
Copy link
Contributor

Nexus reserves the "Creating" and "Destroyed" instance states to refer to instances that it (Nexus) is in the process of creating and that it has deleted. Propolis uses these states to refer to VMMs that it has created and destroyed. Sled agent is responsible for correcting this impedance mismatch by turning Propolis's per-VMM states into appropriate Nexus instance states. Specifically:

  • A Propolis that's Creating its internal VM must be represented as an instance that's Starting
  • A Propolis that has Destroyed its internal VM must be represented as an instance that's Stopped

Fix two places where sled agent was erroneously publishing the Destroyed state to Nexus. Also, adjust some types and function signatures to make it harder to make this mistake in the future.

Fixes #3260.

@gjcolombo gjcolombo force-pushed the gjcolombo/sled-agent-instance-state-fixes branch 2 times, most recently from c2a1da3 to f29f2d8 Compare June 6, 2023 16:02
@gjcolombo gjcolombo requested a review from luqmana June 7, 2023 20:24
Nexus reserves the "Creating" and "Destroyed" instance states to refer to
instances that it (Nexus) is in the process of creating and that it has deleted.
Propolis uses these states to refer to VMMs that it has created and destroyed.
Sled agent is responsible for correcting this impedance mismatch by turning
Propolis's "per-VMM" states into appropriate Nexus instance states.

Fix two places where sled agent was erroneously publishing the Destroyed state.
Adjust some types to make it harder to make this mistake in the future.
@gjcolombo gjcolombo force-pushed the gjcolombo/sled-agent-instance-state-fixes branch from f29f2d8 to ca42756 Compare June 7, 2023 20:26
@gjcolombo gjcolombo enabled auto-merge (squash) June 7, 2023 21:16
@gjcolombo gjcolombo merged commit 9ec914d into main Jun 7, 2023
@gjcolombo gjcolombo deleted the gjcolombo/sled-agent-instance-state-fixes branch June 7, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sled agent sometimes publishes the Destroyed instance state when it should publish Stopped
2 participants