Skip to content

Conversation

@LopatinDmitr
Copy link
Contributor

@LopatinDmitr LopatinDmitr commented Mar 20, 2025

Description

  • Add checks for current restarts when attempting to start a VM with AlwaysOn.
  • In the sync_powerstate.go handler, add a check for the deletion of the current VM.
  • Add a check for the current status of StateChangeRequests when creating a new request.

Why do we need it, and what problem does it solve?

This PR fix errors with power state operations. For example:

[
  {
    "controller": "vm-controller",
    "name": "head-ec22cb89-vm-automatic-conf",
    "namespace": "head-ec22cb89-testcases-vm-configuration",
    "msg": "failed to sync powerstate: failed to start VM: unable to complete request: stop/start already underway",
    "err": null,
    "source": "usr/local/go/src/virtualization-controller/pkg/controller/vm/internal/sync_power_state.go:82"
  },
  {
    "controller": "vm-controller",
    "name": "head-ec22cb89-vm-manual-conf",
    "namespace": "head-ec22cb89-testcases-vm-configuration",
    "msg": "failed to sync powerstate: add annotation to KVVM: internalvirtualizationvirtualmachines.internal.virtualization.deckhouse.io \"head-ec22cb89-vm-manual-conf\" not found",
    "err": null,
    "source": "usr/local/go/src/virtualization-controller/pkg/controller/vm/internal/sync_power_state.go:82"
  }
]

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: vm
type: fix
summary: fix errors with power state operations
impact_level: low

@LopatinDmitr LopatinDmitr added this to the v0.17.0 milestone Mar 20, 2025
@LopatinDmitr LopatinDmitr marked this pull request as ready for review March 20, 2025 15:33
@LopatinDmitr LopatinDmitr marked this pull request as draft March 20, 2025 15:49
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/fix-errors-with-power-state-operations branch 3 times, most recently from cf24e18 to 7d0785f Compare March 21, 2025 06:39
@LopatinDmitr LopatinDmitr marked this pull request as ready for review March 21, 2025 07:02
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/fix-errors-with-power-state-operations branch from 7d0785f to 676fbfa Compare March 23, 2025 18:25
@LopatinDmitr LopatinDmitr requested a review from Isteb4k March 24, 2025 17:25
Copy link
Contributor

@Isteb4k Isteb4k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments need to be resolved

@LopatinDmitr LopatinDmitr force-pushed the fix/vm/fix-errors-with-power-state-operations branch from e575860 to cdb8b9c Compare March 26, 2025 07:20
@LopatinDmitr LopatinDmitr requested a review from Isteb4k March 26, 2025 07:20
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/fix-errors-with-power-state-operations branch 2 times, most recently from 8094c47 to 1399228 Compare March 26, 2025 07:28
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/fix-errors-with-power-state-operations branch from 1399228 to 1dd9f0b Compare March 26, 2025 13:13
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/fix-errors-with-power-state-operations branch from 1dd9f0b to 9e20dad Compare March 27, 2025 04:46
@LopatinDmitr LopatinDmitr merged commit 91933d6 into main Mar 27, 2025
16 checks passed
@LopatinDmitr LopatinDmitr deleted the fix/vm/fix-errors-with-power-state-operations branch March 27, 2025 09:30
yachmenevas pushed a commit that referenced this pull request Oct 15, 2025
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.

3 participants