-
Notifications
You must be signed in to change notification settings - Fork 261
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
core: RemoveImage: handle failure in VDS command #656
Conversation
@ahadas @bennyz
And lv with a broken tag
So we can do getVolumeInfo on all the volumes of the disk (there's not getImageInfo for image group as I see), and leave the disk there in the DB, maybe allowing to run the remove again? |
3042ef0
to
b86371c
Compare
b86371c
to
5fe9ce8
Compare
...dules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommand.java
Outdated
Show resolved
Hide resolved
...dules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommand.java
Show resolved
Hide resolved
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Outdated
Show resolved
Hide resolved
5fe9ce8
to
0f21548
Compare
...dules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommand.java
Outdated
Show resolved
Hide resolved
...dules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommand.java
Show resolved
Hide resolved
...dules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommand.java
Show resolved
Hide resolved
7c3c2d8
to
cc1ef95
Compare
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Show resolved
Hide resolved
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Show resolved
Hide resolved
cc1ef95
to
c629ec0
Compare
/ost |
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.
LGTM, just minor comments.
...dules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommand.java
Outdated
Show resolved
Hide resolved
...dules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommand.java
Show resolved
Hide resolved
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Show resolved
Hide resolved
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
Outdated
Show resolved
Hide resolved
c629ec0
to
85cbae6
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.
LGTM
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Show resolved
Hide resolved
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Outdated
Show resolved
Hide resolved
Just missed why after all |
+1 |
...l/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/RemoveImageCommandCallback.java
Outdated
Show resolved
Hide resolved
RemoveImageCommand used to call for DeleteImageGroup VDS command, and perform the required DB operations without polling on the Async Task. One issue that it led to is when disk is configured with "Wipe on Delete", and the wipe action took more than 50 hours (default max async task polling time) - the task was interrupted, the image is not deleted in VDSM, but removed from DB, not having any tracking for them in the engine. In this patch we add async task polling to RemoveImageCommand and handle the removal of the image from the DB only if it succeeded, otherwise we mark the image as ILLEGAL, and add an Audit Log, logging the error and the IDs of the volumes that might need manual removal. Additional removal of the now ILLEGAL disk will succeed, as the command will not find any volumes associated with it in VDSM Bug-Url: https://bugzilla.redhat.com/1836318
85cbae6
to
2edb482
Compare
Bummer, |
/ost |
unrelated failure in OST (UI tests) |
RemoveImageCommand used to call for DeleteImageGroup VDS command, and perform the required DB operations without polling on the Async Task.
One issue that it led to is when disk is configured with "Wipe on Delete", and the wipe action took more than 50 hours (default max async task polling time) - the task was interrupted, the image is not deleted in VDSM, but removed from DB, not having any tracking for them in the engine.
In this patch we add async task polling to RemoveImageCommand and handle the removal of the image from the DB only if it succeeded, otherwise we mark the image as ILLEGAL, and add an Audit Log, logging the error and the IDs of the volumes that might need manual removal. Additional removal of the now ILLEGAL disk will succeed, as the command will not find any volumes associated with it in VDSM
Bug-Url: https://bugzilla.redhat.com/1836318