Created attachment 755792 [details]
Description of problem:
I wanted to put a domain in maintenance when it has a disk attached to a running vm and disk is deactivate -> I get a CanDoAction.
however we can attach an inactive disk to a running vm when the domain is in maintenance.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create a vm with two disks located on different domains
2. deactivate the second disk (not the boot disk)
3. try to put the domain in maintenance
4. detach the disk
5. put the domain in maintenance
6. attach the disk as inactive
7. activate the domain
8. deactivate the doamin
we cannot put a domain in maintenance because of running vms even when the disk on it is inactive
we can however attach a disk as inactive to a vm while the domain is in maintenance.
we should succeed to put the domain in maintenance if the disk is inactive
Additional info: logs
The relevant backend command is DeactivateStorageDomainCommand.
The canDoAction (as described above) checks if there are active VMs.
It looks like for all active VMs need to add a check whether the disk is indeed inactive - and then not to fail canDoAction.
*** Bug 1065747 has been marked as a duplicate of this bug. ***
bug 1065747 and this one describe the same issue. I've reopened 1065747 and closed this one as the oVirt gerrit hooks require an oVirt bug and not a RHEV one.
*** This bug has been marked as a duplicate of bug 1065747 ***