Description of problem: When failing to stop the SPM because there are uncleared tasks, log the details (guid and type) of the tasks that are uncleared yet Steps to Reproduce: 1. Stop the SPM while there running async tasks Actual results: A log message explaining that stopping the SPM failed because there are uncleared tasks: 2017-11-30 16:35:51,637+02 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.SpmStopVDSCommand] (default task-20) [hosts_syncAction_32e8cdc8-2f8f-45d0] SpmStopVDSCommand::Not stopping SPM on vds 'host_mixed_2', pool id '4eabbc3f-aae9-404f-bde3-262d505fa6d0' as there are uncleared tasks Expected results: Add uncleared tasks details to the log message
Ala, I see the message that says there are uncleared tasks when trying to maintenance SPM when there are async tasks but I don't see the details of the task: "Expected results: Add uncleared tasks details to the log message"
You should look messages similar to the following: 2018-01-09 22:08:12,981+02 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.SpmStopVDSCommand] (default task-16) [ac8687c9-6792-4759-a632-b4d1fd6ffcb8] SpmStopVDSCommand::Not stopping SPM on vds 'rich-el73-host04', pool id '7ea6d0c9-8563-4909-a406-183cd18ebd35' as there are uncleared tasks 'Task '8424a48a-814d-4650-9b48-539d5107863a', status 'running'' Didn't you see such?
Ala, I tried the following: 1. Create VM with disk. 2. Put SPM to maintenance while the VM is being created. Also tried: 1. Create template from VM. 2. Put SPM to maintenance while the VM is being created. For both tests I get: UI: "Error while executing action: Cannot switch Host to Maintenance mode. Host has asynchronous running tasks, wait for operation to complete and retry." and there are the following messages in engine.log: 2018-02-04 14:45:25,521+02 WARN [org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand] (default task-8) [9b0e3418-20ad-46b9-85d6-b8807cbc2244] There are running tasks on the SPM: 'AsyncTask:{commandId='3037ebed-7fab-4539-94b1-78b46525874a', rootCommandId='0dbe00e8-80cd-476d-9d9b-1a41686ef7d4', storagePoolId='85059f91-4b8e-443f-980f-89046833f505', taskId='6540a2c1-5d93-400e-a3a6-a0eeabb6aaac', vdsmTaskId='27df0cf0-3974-4f22-a154-642ec730f1ec', stepId='1c3a283b-fb1a-4162-a348-78492ab54c3d', taskType='copyImage', status='running'}' 2018-02-04 14:45:25,521+02 WARN [org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand] (default task-8) [9b0e3418-20ad-46b9-85d6-b8807cbc2244] Validation of action 'MaintenanceNumberOfVdss' failed for user admin@internal-authz. Reasons: VAR__TYPE__HOST,VAR__ACTION__MAINTENANCE,VDS_CANNOT_MAINTENANCE_SPM_WITH_RUNNING_TASKS It's not very similar to the message in comment 2, but it does explain why maintenance operation failed. Is this log message OK?
Yes, this is the correct message.
Verified, using builds: rhvm-4.2.1.4-0.1.el7.noarch vdsm-4.20.17-1.el7ev.x86_64
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.1 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.