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(kubevirt): migration disk serial #690

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yaroslavborbat
Copy link
Member

@yaroslavborbat yaroslavborbat commented Feb 3, 2025

Description

Fix disk serial handling for successful migration:

Previously, we set the disk serial to match the disk name, relying on Kubernetes to ensure the uniqueness of names. However, after this commit on QEMU, we can no longer do this, as QEMU no longer truncates the serial to 36 characters and now returns an error. We must handle the truncation ourselves. However, truncation does not guarantee uniqueness, so we switched to generating an MD5 hash of the disk name. The MD5 hash is easy to reproduce and fits the required 32-character length.

To ensure a successful migration, existing kvvm and kvvmi resources need to be patched to reflect the new serial format.

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: <kebab-case of a module name> | <1st level dir in the repo>
type: fix | feature | chore
summary: <ONE-LINE of what effectively changes for a user>

@yaroslavborbat yaroslavborbat changed the title fix(kubevirt): backport disk serial fix(kubevirt): migration disk serial Feb 3, 2025
@yaroslavborbat yaroslavborbat added this to the v0.15.1 milestone Feb 3, 2025
@yaroslavborbat yaroslavborbat force-pushed the fix/kubevirt/backport-disk-serial branch 2 times, most recently from d5ef5b8 to 6435099 Compare February 3, 2025 12:26
@yaroslavborbat yaroslavborbat marked this pull request as ready for review February 3, 2025 19:22
@yaroslavborbat yaroslavborbat force-pushed the fix/kubevirt/backport-disk-serial branch 4 times, most recently from 7e765ae to 4013ade Compare February 4, 2025 11:19
Isteb4k
Isteb4k previously approved these changes Feb 4, 2025
Signed-off-by: Yaroslav Borbat <[email protected]>
@yaroslavborbat yaroslavborbat force-pushed the fix/kubevirt/backport-disk-serial branch from 597b972 to 18be4fe Compare February 4, 2025 14:38
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.

2 participants