Skip to content

oVirt SPM Migration Failed Uncleared Tasks⚓︎

Error⚓︎

When using the Web GUI in oVirt 4.3 to move the SPM to a new host you will receive the following error if there are tasks still running on the current SPM.

Text Only
1
Not stopping SPM on vds server1.company.com, pool id cc62018d-4ec1-46f5-a94f-cf81820bb74a as there are uncleared tasks Task '7e62a49e-aee3-11ed-afa1-0242ac120002', status 'finished'

Cause⚓︎

Any task, even in a finished state, must be cleared from the SPM before the role can be moved. In higher versions of oVirt there is a Web GUI option to help clear these tasks, but in many versions of 4.3 this must be resolved via CLI.

Bash Session
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
$ sudo vdsm-client Host getAllTasksInfo
{
    "7e62a49e-aee3-11ed-afa1-0242ac120002": {
        "verb": "downloadImageFromStream",
        "id": "7e62a49e-aee3-11ed-afa1-0242ac120002"
    }
}
$ sudo vdsm-client Host getAllTasksStatuses
{
    "7e62a49e-aee3-11ed-afa1-0242ac120002": {
        "message": "1 jobs completed successfully",
        "code": 0,
        "taskID": "7e62a49e-aee3-11ed-afa1-0242ac120002",
        "taskResult": "success",
        "taskState": "finished"
    }
}

Fix⚓︎

The fix is to clear and then delete the pending jobs. Verify the jobs are safe to stop, but for jobs in a finished state this is safe to perform.

Bash
1
2
vdsm-client Task stop taskID=7e62a49e-aee3-11ed-afa1-0242ac120002
vdsm-client Task clear taskID=7e62a49e-aee3-11ed-afa1-0242ac120002

Example⚓︎

Bash Session
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$ sudo vdsm-client Task getStatus taskID=7e62a49e-aee3-11ed-afa1-0242ac120002
{
    "message": "1 jobs completed successfully",
    "code": 0,
    "taskID": "7e62a49e-aee3-11ed-afa1-0242ac120002",
    "taskResult": "success",
    "taskState": "finished"
}
$ sudo vdsm-client Task stop taskID=7e62a49e-aee3-11ed-afa1-0242ac120002
true
$ sudo vdsm-client Task getStatus taskID=7e62a49e-aee3-11ed-afa1-0242ac120002
{
    "message": "1 jobs completed successfully",
    "code": 0,
    "taskID": "7e62a49e-aee3-11ed-afa1-0242ac120002",
    "taskResult": "success",
    "taskState": "finished"
}
$ sudo vdsm-client Task clear taskID=7e62a49e-aee3-11ed-afa1-0242ac120002
true
$ sudo vdsm-client Task getStatus taskID=7e62a49e-aee3-11ed-afa1-0242ac120002
vdsm-client: Command Task.getStatus with args {'taskID': '7e62a49e-aee3-11ed-afa1-0242ac120002'} failed:
(code=401, message=Task id unknown: (u'7e62a49e-aee3-11ed-afa1-0242ac120002',))

References⚓︎