Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1994663

Summary: [RFE][CBT][UX] Let's allow to change VM power state during a backup operation and cancel the current running backup with proper error and cleanup
Product: [oVirt] ovirt-engine Reporter: Yury.Panchenko
Component: Backup-Restore.VMsAssignee: Mark Kemel <mkemel>
Status: CLOSED DUPLICATE QA Contact: Evelina Shames <eshames>
Severity: high Docs Contact: bugs <bugs>
Priority: high    
Version: 4.4.7.7CC: aefrat, ahadas, bugs, eshames, michal.skrivanek, nsoffer, pelauter, yuriy.khokhlov, Yury.Panchenko
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: pm-rhel: ovirt-4.5?
pm-rhel: planning_ack?
pm-rhel: devel_ack?
pm-rhel: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-13 12:52:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yury.Panchenko 2021-08-17 16:18:17 UTC
Description of problem:
Let's allow user to change vm powerstate during backup operation.
Current architecture doesn’t allow to change powerstate during backup, but ovirt can offer some compromise solution – allow user to change powerstate with termination current backup process.

Version-Release number of selected component (if applicable):
Ovirt 4.4.7

Actual results:
Power controls locked when vm is in backup state.

Expected results:
Power controls unlocked even if vm in backup state.

If user changes vm power state, he’s giving the question form like “If you PowerOn the vm, current backup process will be terminated. Do you agree?” 

Based on the user decision, ovirt can change vm powerstate or continue backup process.

Comment 1 Eyal Shenitzky 2021-08-26 10:39:20 UTC
As part of bug 1900564, we've already introduced an option to shutdown/power-off/reboot the VM even if it is during a backup.
It can be done only via the REST-API by using the 'force' option:

POST /ovirt-engine/api/vms/123/(shutdown/power-off/reboot)

<action>
    <force>true</force>
</action>

The VM can also be powered off using the guest.

So there is an option to power off the VM. We do not think that adding it to the UI is valuable and worth the effort 
since it will make the option to power off the VM during the backup much easier and might fail the running backup.

Comment 2 Yury.Panchenko 2021-08-27 11:13:26 UTC
Hello Eyal.

> It can be done only via the REST-API by using the 'force' option:
I think customers who use ovirt by UI is much more than by REST-API, so for the most customers it's still unavailable.

> So there is an option to power off the VM. We do not think that adding it to the UI is valuable and worth the effort 
> since it will make the option to power off the VM during the backup much easier and might fail the running backup.

But with that option, a customer can controll that. He can decide what does he need - terminate backup and change a vm power state, or continue backup.

Comment 3 Eyal Shenitzky 2021-08-30 11:55:41 UTC
Note, When the VM is powered on/off during a backup, the current backup operation should be canceled with a proper error same for running image transfers.
We should also consider a proper cleanup for it.

Comment 8 Nir Soffer 2022-02-01 13:46:43 UTC
Lets handle the option to abort backup by changing vm state in this bug.

This is easy UI only change that we can do for ovirt 4.5.

The topic of making backup independent from the vm, so we can start and stop a vm
without interrupting backup is a much bigger change; we need separate RFE for that.

Comment 9 Arik 2022-02-01 14:09:58 UTC
(In reply to Nir Soffer from comment #8)
> Lets handle the option to abort backup by changing vm state in this bug.
> 
> This is easy UI only change that we can do for ovirt 4.5.

Not sure it's such an easy change - do we have any indication on the VM that there's an ongoing backup? otherwise we need to add a query to the backend - not that nice (especially not for the web-ui that would need to get it over rest-api). Ideally there needs to be some indication of the ongoing backup, not only to avoid querying the backend, but also for the case the user chooses not to proceed with the shutdown because of an ongoing backup and would like to know when it completes (events tab is not always a good option, not to speak about the web-ui that doesn't have it)

And as power-off/shutdown are relatively frequent operations, we may get the similar issues to those we had in the past by customers that say "I don't care about the backup in that case, don't ask me that again and again" and so we'll need a "remember my decision" option as we did in other scenarios.

 
> The topic of making backup independent from the vm, so we can start and stop
> a vm
> without interrupting backup is a much bigger change; we need separate RFE
> for that.

Yes, one that relevant guys from platform/storage will take part in

Comment 10 Yury.Panchenko 2022-02-11 17:48:40 UTC
Hello Nir,
based on our email discussion, I created another RFE 
https://bugzilla.redhat.com/show_bug.cgi?id=2053669
Thanks.

Comment 11 Arik 2022-03-13 12:52:13 UTC
We ended up going with bz 2053669 for oVirt 4.5 so no need in this one anymore

*** This bug has been marked as a duplicate of bug 2053669 ***