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

Make VmBackupStop async using flag #281

Merged
merged 1 commit into from
May 10, 2022

Conversation

mkemel
Copy link
Member

@mkemel mkemel commented Apr 17, 2022

Currently StopVmBackup command changed VM Backup phase in order to
stop/finalize backup.

This patch changes StopVmBackupCommand to set a flag on the backup
entity that it is stopped (only for Hybrid backup), and then
HybridBackupCommand detects that the flag was raised and finalizes
the Backup accordingly.

But-Url: https://bugzilla.redhat.com/1900552

@ahadas ahadas changed the title core: make VmBackupStop async using flag Make VmBackupStop async using flag Apr 18, 2022
@mkemel
Copy link
Member Author

mkemel commented May 3, 2022

After investigating what happens when HybridBackup is finalized during active image transfer - found that the RemoveSnapshotCommand fails validation

WARN  [org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-94) [ed7881f4-7bf0-4d6a-aa9b-928270984597] Validation of action 'RemoveSnapshot' failed for user admin@internal-authz. Reasons: VAR__TYPE__SNAPSHOT,VAR__ACTION__REMOVE,ACTION_TYPE_FAILED_DISKS_LOCKED,$diskAliases vm1_Disk1

Then, HybridBackup command goes to endWithFailure, and then the same flow as in https://bugzilla.redhat.com/2080766 happens. The transfer remains active, Auto-Generated is left hanging. Fixing the mentioned bug would handle the command ending, also leaving an audit log entry regarding snapshot leftover

@mkemel mkemel requested review from bennyz and ahadas May 3, 2022 09:09
@ahadas
Copy link
Member

ahadas commented May 3, 2022

After investigating what happens when HybridBackup is finalized during active image transfer - found that the RemoveSnapshotCommand fails validation

WARN  [org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-94) [ed7881f4-7bf0-4d6a-aa9b-928270984597] Validation of action 'RemoveSnapshot' failed for user admin@internal-authz. Reasons: VAR__TYPE__SNAPSHOT,VAR__ACTION__REMOVE,ACTION_TYPE_FAILED_DISKS_LOCKED,$diskAliases vm1_Disk1

Then, HybridBackup command goes to endWithFailure, and then the same flow as in https://bugzilla.redhat.com/2080766 happens. The transfer remains active, Auto-Generated is left hanging. Fixing the mentioned bug would handle the command ending, also leaving an audit log entry regarding snapshot leftover

maybe the transfers were previously (with the old mechanism) stopped when we issued the call to stopVmBackup on VDSM. but yeah, let's handle that separately

@ahadas
Copy link
Member

ahadas commented May 10, 2022

/ost

Currently StopVmBackup command changed VM Backup phase in order to
stop/finalize backup.

This patch changes StopVmBackupCommand to set a flag on the backup
entity that it is stopped (only for Hybrid backup), and then
as HybridBackupCommand detects that the flag was raised and finalizes
the Backup accordingly.
@ahadas ahadas merged commit 60cf5f5 into oVirt:master May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants