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

fix(vm): refactor blockDeviceReady handler #800

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LopatinDmitr
Copy link
Contributor

@LopatinDmitr LopatinDmitr commented Feb 26, 2025

Description

  • Merge the inuse.go and attachee.go handlers.
  • Add a "Mounted" flag to the AttachedVirtualMachine status of the virtual disk.
  • Update the AttachedVirtualMachine status to reflect all VMs that specify the given disk in their spec.
  • Refactore the block_device.go handler.
  • Update messages to align with the new design.

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

What is the expected result?

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: Improved the blockDeviceReady condition message. 

Sorry, something went wrong.

@LopatinDmitr LopatinDmitr force-pushed the fix/vm/block-device-ready-condition branch 3 times, most recently from 66f13af to df7e85f Compare March 4, 2025 06:17
@LopatinDmitr LopatinDmitr added this to the v0.18.0 milestone Mar 4, 2025
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/block-device-ready-condition branch 5 times, most recently from 49a72ca to 34fc1b5 Compare March 6, 2025 08:46
@LopatinDmitr LopatinDmitr changed the base branch from main to fix/vd/refactor-handle-inuse-condition March 6, 2025 10:52
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/block-device-ready-condition branch 3 times, most recently from de49b36 to 64abd19 Compare March 7, 2025 07:52
@LopatinDmitr LopatinDmitr force-pushed the fix/vd/refactor-handle-inuse-condition branch from ac1deaf to 26b0d68 Compare March 7, 2025 20:11
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/block-device-ready-condition branch 7 times, most recently from 37e90ef to e78a9be Compare March 10, 2025 18:08
Base automatically changed from fix/vd/refactor-handle-inuse-condition to main March 11, 2025 07:16
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/block-device-ready-condition branch 7 times, most recently from c037b07 to 7e0f50d Compare March 12, 2025 10:52
prismagod
prismagod previously approved these changes Mar 25, 2025
Zhbert
Zhbert previously approved these changes Mar 25, 2025
prismagod
prismagod previously approved these changes Mar 25, 2025
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.

checkBlockDevicesToBeReadyForUse violates SOLID. It would be good to implement it in a way that doesn't violate the principles

@LopatinDmitr LopatinDmitr marked this pull request as draft March 26, 2025 08:07
@LopatinDmitr LopatinDmitr dismissed stale reviews from prismagod and Zhbert via dd9c43c March 26, 2025 08:29
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/block-device-ready-condition branch 13 times, most recently from f3111ad to 5da4399 Compare March 31, 2025 10:57
LopatinDmitr and others added 2 commits March 31, 2025 13:59
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Co-authored-by: Vladislav Panfilov <97229646+prismagod@users.noreply.github.com>
Signed-off-by: Konstantin Nezhbert <zhbert@yandex.ru>
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
@LopatinDmitr LopatinDmitr force-pushed the fix/vm/block-device-ready-condition branch from 5da4399 to 033f443 Compare March 31, 2025 10:59
@LopatinDmitr LopatinDmitr marked this pull request as ready for review April 1, 2025 03:43
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.

None yet

4 participants