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

openstack: check image is in the inventory before progressing #693

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

bennyz
Copy link
Member

@bennyz bennyz commented Jan 1, 2024

Image based migrations can get stuck since there is no check to ensure they were created in the inventory before attempting to progress, this will lead to the migration progressing to the next phase, but the PVC will not be created.

This patch adds the relevant property and checks the snapshot image is in the inventory before progressing

if imageID, ok := vm.Image["id"]; ok {
// Update property for image based
imageUpdateOpts := &libclient.ImageUpdateOpts{}
imageUpdateOpts.AddImageProperty(forkliftPropertyOriginalVolumeID, imageID.(string))
Copy link
Member Author

Choose a reason for hiding this comment

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

this can break in builder.go, can't reuse the same property key

@bennyz bennyz force-pushed the os-image-inventory branch from 98ed855 to 4509a49 Compare January 2, 2024 09:08
@bennyz bennyz force-pushed the os-image-inventory branch from 4509a49 to 557abaa Compare January 2, 2024 09:42
bennyz added 2 commits January 2, 2024 13:12
Image based migrations can get stuck since there is not check to ensure
they were created in the inventory before attempting to progress, this
will lead to the migration progressing to the next phase, but the PVC
will not be created.

This patch adds the relevant property and checks the snapshot image is
in the inventory before progressing

Signed-off-by: Benny Zlotnik <[email protected]>
Address review comments

Signed-off-by: Benny Zlotnik <[email protected]>
@bennyz bennyz force-pushed the os-image-inventory branch from 557abaa to c72cff3 Compare January 2, 2024 11:15
Copy link

sonarqubecloud bot commented Jan 2, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
5.5% Duplication on New Code

See analysis details on SonarCloud

@bennyz bennyz marked this pull request as ready for review January 2, 2024 11:34
@ahadas ahadas self-requested a review January 2, 2024 12:04
@ahadas ahadas merged commit c4e53e0 into kubev2v:main Jan 2, 2024
10 checks passed
@bennyz bennyz deleted the os-image-inventory branch February 7, 2024 10:27
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