Fix/cloud init shutdown support#5038
Open
deepakshirkem wants to merge 3 commits into
Open
Conversation
Detect when cloud-init uses power_state mode poweroff/halt and treat as successful launch instead of timeout. Created expects_shutdown_from_cloud_init() helper function. Implemented in all backend constructors and detect_aborted_start. Handles intentional shutdown in wait functions. Fixes VirtualBox current_state to detect stopped state immediately. Fixes canonical#4456 [daemon] Move parsing to backend constructors [backends] Add shutdown detection to all Created expects_shutdown_from_cloud_init() helper function. Implemented in all backend constructors and detect_aborted_start. Handles intentional shutdown in wait functions. [review] Address review feedback - Restore missing 'starting' state check in VirtualBox current_state - Fix VirtualBox current_state to detect stopped state immediately - Remove duplicate TODO comment in wait_for_cloud_init - Remove extra newline in wait_for_cloud_init - Add if constexpr check to only treat IntentionalShutdownException as success for LaunchRequest, not StartRequest [review] Fix whitespace and test failure - Remove trailing whitespace (per GIT9) - Add expected_shutdown check to detect_aborted_start - Fixes BaseVM.waitForCloudInitVMDownReconnects test
- Remove early return for intentional shutdown during launch - Save mount configuration even when VM is stopped - Skip mount activation if VM not running - Fix missing braces in detect_aborted_start - Apply clang-format to all modified files Ensures mounts are ready when VM starts later. All tests passing including BaseVM.waitForCloudInitVMDownReconnects.
Add extra current_state() call expectation to match additional state check in wait_for_cloud_init.
Contributor
|
Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces #4695, which was automatically closed after I accidentally deleted my fork repository.
The changes are the same as in the original PR. Recreating the PR so @tobe2098 can pull the changes into another branch as requested.