-
Notifications
You must be signed in to change notification settings - Fork 63
openstack: convert qcow2 snapshots for image based VMs #692
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
openstack: convert qcow2 snapshots for image based VMs #692
Conversation
c68afe1
to
325b1fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't look at the details yet but there might be a need for a 'converter' also for export-to-OVA - can't we reuse the virt-v2v image for this though? it should have qemu-img..
271145a
to
c45587a
Compare
4c2d93b
to
d579b2c
Compare
4807ac1
to
4a84c3c
Compare
for _, image := range images { | ||
if imageID, ok := image.Properties[forkliftPropertyOriginalImageID]; ok && imageID == workload.ImageID { | ||
annotations[planbase.AnnRequiresConversion] = "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about:
annotations[planbase.AnnRequiresConversion] = "true" | |
// these are always qcow2 images that need to be converted to raw | |
annotations[planbase.AnnRequiresConversion] = "true" |
for _, image := range images { | ||
if imageID, ok := image.Properties[forkliftPropertyOriginalImageID]; ok && imageID == workload.ImageID { | ||
annotations[planbase.AnnRequiresConversion] = "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you told me you'll add a test of the format here - that would be better
6b35b03
to
1be0321
Compare
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Missing completedPVCs++ when noticing the successful job Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
When a VM has both image and volumes attached, set the boot order to prefer the image if the volumes aren't bootable Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
instead of setting as qcow2 Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
02941b9
to
db2aac1
Compare
|
for _, pvc := range persistentVolumeClaims { | ||
// Handle loopvar https://go.dev/wiki/LoopvarExperiment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be great to upgrade to go 1.21 when we can not only to get rid of this thingie but also to have slice.Contains ;)
@@ -842,7 +911,7 @@ func (r *KubeVirt) GetPodsWithLabels(podLabels map[string]string) (pods *core.Po | |||
} | |||
|
|||
// Deletes an object from destination cluster associated with the VM. | |||
func (r *KubeVirt) DeleteObject(object client.Object, vm *plan.VMStatus, message, objType string) (err error) { | |||
func (r *KubeVirt) DeleteObject(object client.Object, vm *plan.VMStatus, message, objType string, options ...client.DeleteOption) (err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options
is unused but ok, it should be at some point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, I tried PropagationPolicy again 😅
This PR currently introduces the image-converter image that will perform the conversion. It has to jobs:
forklift-controller will create an additional PVC for the output of the conversion
convert
command and will perform the conversion itself