Bug 1910302 - [RFE] Allow SPM switching if all tasks have finished via UI
Summary: [RFE] Allow SPM switching if all tasks have finished via UI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.2.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.4.5
: 4.4.5
Assignee: Pavel Bar
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-23 11:22 UTC by Pavel Bar
Modified: 2021-04-23 08:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Previously, the storage pool manager (SPM) failed to switch to another host if the SPM had uncleared tasks. With this enhancement, a new UI menu has been added to enable cleaning up finished tasks.
Clone Of:
Environment:
Last Closed: 2021-04-14 11:40:02 UTC
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1627997 0 unspecified CLOSED [RFE] Allow SPM switching if all tasks have finished via REST-API 2021-04-01 07:00:36 UTC
Red Hat Product Errata RHSA-2021:1169 0 None None None 2021-04-14 11:40:27 UTC
oVirt gerrit 112781 0 master MERGED core: finished tasks cleanup (code refactoring) 2021-02-19 13:28:34 UTC
oVirt gerrit 112784 0 master MERGED core: finished tasks cleanup (audit log & validation messages) 2021-02-19 13:28:34 UTC
oVirt gerrit 112798 0 master MERGED core: finished tasks cleanup (proper error handling) 2021-02-19 13:28:34 UTC
oVirt gerrit 112844 0 master MERGED webadmin: finished tasks cleanup (adding UI Menu) 2021-02-19 13:28:34 UTC
oVirt gerrit 113149 0 master MERGED core: finished tasks cleanup (partial failure update) 2021-02-19 13:28:34 UTC
oVirt gerrit 113156 0 master MERGED core: finished tasks cleanup tests 2021-02-19 13:28:34 UTC

Description Pavel Bar 2020-12-23 11:22:14 UTC
Description of problem:

Continued work on #1627997.
Implementing an option to trigger the finished tasks cleanup via UI.

Comment 1 Pavel Bar 2021-02-04 14:18:07 UTC
Verification flow for QE - mostly copied from https://bugzilla.redhat.com/show_bug.cgi?id=1627997, only step #11 is different:
Please try the following:
1) Run the engine, add a host and a Storage Domain.
2) Open the CLI terminal to the host via ssh.
3) Execute on the host the following command:
$ vdsm-client Host getAllTasksStatuses
You should probably see an empty response, i.e., "{}". That's good, now you can continue.
4) Start adding a new disk: Storage --> Disks --> New. Don't press "OK" just yet.

The following steps need to be done fast, I used breakpoints to stop the flow where I need it, so I was more lucky :)
5) Press "OK" to finish adding a disk.
6) Go to the host CLI and see the response:
$ vdsm-client Host getAllTasksStatuses
It should be something like that:
{
    "1dc4d885-577a-4b6a-b01f-e682602a907c": {
        "code": 0,
        "message": "1 jobs completed successfully",
        "taskID": "1dc4d885-577a-4b6a-b01f-e682602a907c",
        "taskResult": "success",
        "taskState": "finished"
    }
}
7) Kill the engine as fast as possible: CTRL+C.
8) After the engine stops verify that there still a finished task on the host (same command as mentioned above), that is you don't receive an empty result "{}". If that doesn't happen, try not to execute step #6 in order to save time, simply press "OK" and kill engine after 1 second or faster.
9) Start the engine, wait until it's up.
10) Verify (again) that there still a finished task on the host, as in step #6.
11) Go to the engine UI: Compute --> Data Centers.
  11a) Select the relevant Data Center (where host with SPM runs) and via the menu you can "Cleanup Finished Tasks".
  11b) You can also run flows with a multiple selection of Data Centers (the "Cleanup Finished Tasks" commands runs in parallel on all of them). Worth checking.
  11c) The "Cleanup Finished Tasks" menu is allowed only if *all* the selected Data Centers are active. If at least one is not active the menu is greyed-out/inactive. Also worth checking :)
12) Verify (using the above command) that there are NO finished tasks on the host (that means all were cleared by the command that you executed from the UI menu) and you receive an empty response as it was at the beginning: "{}".

Comment 5 Evelina Shames 2021-02-14 11:43:25 UTC
(In reply to Pavel Bar from comment #1)
> Verification flow for QE - mostly copied from
> https://bugzilla.redhat.com/show_bug.cgi?id=1627997, only step #11 is
> different:
> Please try the following:
> 1) Run the engine, add a host and a Storage Domain.
> 2) Open the CLI terminal to the host via ssh.
> 3) Execute on the host the following command:
> $ vdsm-client Host getAllTasksStatuses
> You should probably see an empty response, i.e., "{}". That's good, now you
> can continue.
> 4) Start adding a new disk: Storage --> Disks --> New. Don't press "OK" just
> yet.
> 
> The following steps need to be done fast, I used breakpoints to stop the
> flow where I need it, so I was more lucky :)
> 5) Press "OK" to finish adding a disk.
> 6) Go to the host CLI and see the response:
> $ vdsm-client Host getAllTasksStatuses
> It should be something like that:
> {
>     "1dc4d885-577a-4b6a-b01f-e682602a907c": {
>         "code": 0,
>         "message": "1 jobs completed successfully",
>         "taskID": "1dc4d885-577a-4b6a-b01f-e682602a907c",
>         "taskResult": "success",
>         "taskState": "finished"
>     }
> }
> 7) Kill the engine as fast as possible: CTRL+C.
> 8) After the engine stops verify that there still a finished task on the
> host (same command as mentioned above), that is you don't receive an empty
> result "{}". If that doesn't happen, try not to execute step #6 in order to
> save time, simply press "OK" and kill engine after 1 second or faster.
> 9) Start the engine, wait until it's up.
> 10) Verify (again) that there still a finished task on the host, as in step
> #6.
> 11) Go to the engine UI: Compute --> Data Centers.
>   11a) Select the relevant Data Center (where host with SPM runs) and via
> the menu you can "Cleanup Finished Tasks".
>   11b) You can also run flows with a multiple selection of Data Centers (the
> "Cleanup Finished Tasks" commands runs in parallel on all of them). Worth
> checking.
>   11c) The "Cleanup Finished Tasks" menu is allowed only if *all* the
> selected Data Centers are active. If at least one is not active the menu is
> greyed-out/inactive. Also worth checking :)
> 12) Verify (using the above command) that there are NO finished tasks on the
> host (that means all were cleared by the command that you executed from the
> UI menu) and you receive an empty response as it was at the beginning: "{}".

Verified on:
vdsm-4.40.50.4-1.el8ev.x86_64
ovirt-engine-4.4.5.4-0.6.el8ev.noarch

Moving to 'VERIFIED'.

Comment 11 errata-xmlrpc 2021-04-14 11:40:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHV Manager (ovirt-engine) 4.4.z [ovirt-4.4.5] security, bug fix, enhancement), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1169


Note You need to log in before you can comment on or make changes to this bug.