Description of problem: Not possible to set the MBS on maintenance even though the VM and the disk that was under this SD were deleted. The following error pops up from the UI admin: "Operation Canceled - Error while executing action: Cannot deactivate Storage while there are running tasks on this Storage. -Tasks running: -Please wait until tasks will finish and try again." Version: ovirt-engine-4.4.6.7-0.1.el8ev.noarch How reproducible: 100% Steps to Reproduce: 1.Create MBS domain via rest API and attaching it to the datacenter. 2.Create a new MB disk under the MBS domain that has been created. 3.Create a new VM and attach the disk as bootable. 4.Run the VM 5.power off the VM 6.Remove the VM with the disk 7.Storage-> Data centers-> data center that VM was attached to -> maintenance the MBS domain Actual results: The MDS domain is not turning to maintenance with a popup error: "Operation Canceled - Error while executing action: Cannot deactivate Storage while there are running tasks on this Storage. -Tasks running: -Please wait until tasks will finish and try again." Expected results: The MBS domain should turn to maintenance mode. Additional info: Cinderlib log: The Error is not reported in the cinderlib.log only the first steps of creating the disk and deleting it "2021-05-11 15:03:41,784 - cinder.volume.driver - INFO - Driver hasn't implemented _init_vendor_properties() 2021-05-11 15:03:41,792 - cinderlib-client - INFO - Creating volume 'e70f8bdc-df65-454f-af40-130f670206fe', with size '2' GB [58db6cd5-18c6-4528-8097-e8bed023cc78] 2021-05-11 15:04:55,221 - cinder.volume.driver - INFO - Driver hasn't implemented _init_vendor_properties() 2021-05-11 15:04:55,295 - cinderlib-client - INFO - Connecting volume 'e70f8bdc-df65-454f-af40-130f670206fe', to host with info '{"ip":null,"nqn":"nqn.2014-08.org.nvmexpress:uuid:97462187-a16d-4000-90fa-75832dc182a8","host":"storage-ge3-vdsm2.lab.eng.tlv2.redhat.com","uuid":"bf880b9a-05d5-497b-a18e-dfe147497235","os_type":"linux","platform":"x86_64","initiator":"iqn.1994-05.com.redhat:storage-ge3-vdsm2","multipath":true,"system uuid":"77085062-c130-47f6-99da-66c9110047e4","do_local_attach":false}' [3bb29b0b] 2021-05-11 15:05:00,259 - cinder.volume.driver - INFO - Driver hasn't implemented _init_vendor_properties() 2021-05-11 15:05:00,292 - cinderlib-client - INFO - Saving connection <cinderlib.Connection object 45288818-6d89-4e91-acf4-74a0a2410f49 on backend ceph-cinderlib4> for volume 'e70f8bdc-df65-454f-af40-130f670206fe' [60221a4b] 2021-05-11 15:06:25,525 - cinder.volume.driver - INFO - Driver hasn't implemented _init_vendor_properties() 2021-05-11 15:06:25,555 - cinderlib-client - INFO - Disconnecting volume 'e70f8bdc-df65-454f-af40-130f670206fe' [56c6dd7] 2021-05-11 15:06:32,741 - cinder.volume.driver - INFO - Driver hasn't implemented _init_vendor_properties() 2021-05-11 15:06:32,778 - cinderlib-client - INFO - Deleting volume 'e70f8bdc-df65-454f-af40-130f670206fe' [1154a541-a56c-436f-8979-5f10021c5542] Engine log: 2021-05-11 15:21:30,109+03 INFO [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand] (default task-38) [94aef466-a99a-4a21-871d-af3b9662db1b] Lock Acquired to object 'EngineLock:{exclusiveLocks='[c252a05b-4353-4e2f-81ae-94bbb6228e5a=STORAGE]', sharedLocks=''}' 2021-05-11 15:21:30,239+03 WARN [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand] (default task-38) [94aef466-a99a-4a21-871d-af3b9662db1b] There are running tasks: '' 2021-05-11 15:21:30,239+03 WARN [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand] (default task-38) [94aef466-a99a-4a21-871d-af3b9662db1b] Validation of action 'DeactivateStorageDomainWithOvfUpdate' failed for user admin@internal-authz. Reasons: VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__DEACTIVATE,ERROR_CANNOT_DEACTIVATE_DOMAIN_WITH_TASKS,$tasksNames 2021-05-11 15:21:30,239+03 INFO [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand] (default task-38) [94aef466-a99a-4a21-871d-af3b9662db1b] Lock freed to object 'EngineLock:{exclusiveLocks='[c252a05b-4353-4e2f-81ae-94bbb6228e5a=STORAGE]', sharedLocks=''}'
Additional information about the issue: - This is not a regression bug, it is reproducible also in 4.4.5 - It doesn't occur on hosted engine env since it is not supported yet, see the bug : (https://bugzilla.redhat.com/show_bug.cgi?id=1959490). - The removal MBS domain is as basic as adding MBS domain. In addition, maintenance of the MBS domain works when attaching its disk to the VM and never running the VM, which is not likely to do, so in my opinion, it is a blocker.
Sophie, please add full engine and cinderlib logs for these bugs Additionally, you can't move the SD to maintenance at all? Or just for some time, and it is possible later?
(In reply to Benny Zlotnik from comment #3) > Sophie, please add full engine and cinderlib logs for these bugs > > > Additionally, you can't move the SD to maintenance at all? Or just for some > time, and it is possible later? Not possible to set the SD to maintenance at all, even not later.
Couple of notes: 1. There is no need to run and poweroff the VM 2. The problem is that RemoveVm's callback is not invoked for MBS disks[1] An incorrect run looks like this: 2021-08-17 06:55:26,738-04 INFO [org.ovirt.engine.core.bll.RemoveVmCommand] (default task-5) [3b42eaa5-86d8-4e98-b797-b47922e4eca2] Lock Acquired to object 'EngineLock:{exclusiveLocks='[ff5a87ff-4f3b-441f-b488-be49c240ac17=VM]', sharedLocks=''}' 2021-08-17 06:55:26,838-04 INFO [org.ovirt.engine.core.bll.RemoveVmCommand] (EE-ManagedThreadFactory-engine-Thread-51) [3b42eaa5-86d8-4e98-b797-b47922e4eca2] Running command: RemoveVmCommand internal: false. Entities affected : ID: ff5a87ff-4f3b-441f-b488-be49c240ac17 Type: VMAction group DELETE_VM with role type USER 2021-08-17 06:55:26,846-04 INFO [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (EE-ManagedThreadFactory-engine-Thread-51) [3b42eaa5-86d8-4e98-b797-b47922e4eca2] START, SetVmStatusVDSCommand( SetVmStatusVDSCommandParameters:{vmId='ff5a87ff-4f3b-441f-b488-be49c240ac17', status='ImageLocked', exitStatus='Normal'}), log id: 23850106 2021-08-17 06:55:26,868-04 INFO [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (EE-ManagedThreadFactory-engine-Thread-51) [3b42eaa5-86d8-4e98-b797-b47922e4eca2] FINISH, SetVmStatusVDSCommand, return: , log id: 23850106 2021-08-17 06:55:26,886-04 INFO [org.ovirt.engine.core.bll.RemoveVmCommand] (EE-ManagedThreadFactory-engine-Thread-51) [3b42eaa5-86d8-4e98-b797-b47922e4eca2] Lock freed to object 'EngineLock:{exclusiveLocks='[ff5a87ff-4f3b-441f-b488-be49c240ac17=VM]', sharedLocks=''}' 2021-08-17 06:55:26,900-04 INFO [org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand] (EE-ManagedThreadFactory-engine-Thread-51) [31fd4cf6] Running command: RemoveMemoryVolumesCommand internal: true. 2021-08-17 06:55:27,009-04 INFO [org.ovirt.engine.core.bll.storage.disk.managedblock.RemoveAllManagedBlockStorageDisksCommand] (EE-ManagedExecutorService-commandCoordinator-Thread-2) [3b42eaa5-86d8-4e98-b797-b47922e4eca2] Running command: RemoveAllManagedBlockStorageDisksCommand internal: true. 2021-08-17 06:55:27,054-04 INFO [org.ovirt.engine.core.bll.storage.disk.managedblock.RemoveManagedBlockStorageDiskCommand] (EE-ManagedExecutorService-commandCoordinator-Thread-3) [3b42eaa5-86d8-4e98-b797-b47922e4eca2] Running command: RemoveManagedBlockStorageDiskCommand internal: true. A correct run would look like: 2021-08-17 10:14:57,077-04 INFO [org.ovirt.engine.core.bll.ConcurrentChildCommandsExecutionCallback] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-48) [f538ea2b-dfbf-4e60-8e07-9ce8c0f45eb0] Command 'RemoveManagedBlockStorageDisk' id: '10398245-6556-4ab4-8fcf-bfb7e287411d' child commands '[]' executions were completed, status 'SUCCEEDED' 2021-08-17 10:14:58,143-04 INFO [org.ovirt.engine.core.bll.RemoveVmCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-95) [f538ea2b-dfbf-4e60-8e07-9ce8c0f45eb0] Ending command 'org.ovirt.engine.core.bll.RemoveVmCommand' successfully. The difference is that in the second command we can see an indication that the endAction sequence is going to be invoked for RemoveVm, after RemoveManagedBlockStorageDisk completed [1] https://github.com/oVirt/ovirt-engine/blob/a4c08581377d669300ee35d1cd6406f0b37f25f0/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java#L237
Verified. Versions: vdsm-4.50.0.5-1.el8ev ovirt-engine-4.5.0-582.gd548206.185.el8ev Steps to Reproduce: 1.Create MBS domain via rest API and attaching it to the datacenter. 2.Create a new MB disk under the MBS domain that has been created. 3.Create a new VM and attach the disk as bootable. 4.Run the VM 5.power off the VM 6.Remove the VM with the disk 7.Storage-> Data centers-> data center that VM was attached to -> maintenance the MBS domain Actual results: The MBD was moved to maintenance mode successfully. There was no problem detaching it afterward and removing it eventually.
Was verified on Upstream.
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.