feat(vm): allow detach cloud-init volumes without restart#2583
Draft
loktev-d wants to merge 7 commits into
Draft
feat(vm): allow detach cloud-init volumes without restart#2583loktev-d wants to merge 7 commits into
loktev-d wants to merge 7 commits into
Conversation
Contributor
|
Workflow has started. The target step completed with status: failure. |
Signed-off-by: Daniil Loktev <70405899+loktev-d@users.noreply.github.com>
Contributor
|
Workflow has started. The target step completed with status: failure. |
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.
Description
Allows removing a cloudinit initialization script from a running virtual machine without a restart. Removing
.spec.provisioning(typeUserData/UserDataRef) is now applied live: the cloud-init disk is hot-detached from the running VM, after which the referenced Secret can be deleted.'Module-side changes:
vmchangecomparator (compareProvisioning): removal of a cloudinit provisioning block is downgraded toActionApplyImmediate(no restart). Any add or change of provisioning, still require a restart (ActionRestart), because that data is consumed only at VM startup.kvbuilder.KVVM.SetProvisioning+ newRemoveDisk: the KubeVirt VM template now correctly drops the cloud-init/sysprep disk and volume when provisioning is removed or the provisioning type is switched. This also fixes a latent bug where a stale provisioning disk was left in the template on removal.Why do we need it, and what problem does it solve?
What is the expected result?
provisioning.type: UserData(orUserDataRef)..spec.provisioningblock.Running(same VMI, no restart), theAwaitingRestartToApplyConfigurationcondition does not appear, thecloudinitdisk/volume disappears from the running VMI, and aUserDataRefSecret can be deleted.AwaitingRestartToApplyConfiguration: Trueand keeps the disk until the VM is restarted.Checklist
Changelog entries