Bug 1843089 - virsh storage pools from HE deployments are not cleaned up
Summary: virsh storage pools from HE deployments are not cleaned up
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup
Version: 4.3.9
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ovirt-4.4.1
: 4.4.1
Assignee: Asaf Rachmani
QA Contact: Wei Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-02 17:39 UTC by amashah
Modified: 2023-10-06 20:22 UTC (History)
5 users (show)

Fixed In Version: ovirt-ansible-hosted-engine-setup-1.1.5
Doc Type: Bug Fix
Doc Text:
Before this release, local storage pools were created but were not deleted during Self-Hosted Engine deployment, causing storage pool leftovers to remain. In this release, the cleanup is performed properly following Self-Hosted Engine deployment, and there are no storage pool leftovers.
Clone Of:
Environment:
Last Closed: 2020-08-04 13:23:51 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-hosted-engine-setup pull 333 0 None closed storage: Clean local storage pools 2021-02-03 10:10:05 UTC
Red Hat Product Errata RHEA-2020:3309 0 None None None 2020-08-04 13:26:12 UTC

Description amashah 2020-06-02 17:39:06 UTC
Description of problem:

There are storage pools that appear to be defined from HE deployment in /var/tmp/localvm* on hosts where HE was deployed.

These pools are set with Autostart enabled. When restarting libvirtd.service, errors fly around because these paths don't exist. 


~~~
# virsh -r pool-list --all --details
 Name                                    State     Autostart  Persistent  Capacity  Allocation  Available
----------------------------------------------------------------------------------------------------------
 2ee2f90b-9465-4be8-91d8-bd5d81122c7c    inactive  yes        yes                -           -          -
 2ee2f90b-9465-4be8-91d8-bd5d81122c7c-1  inactive  yes        yes                -           -          -
 2ee2f90b-9465-4be8-91d8-bd5d81122c7c-2  inactive  yes        yes                -           -          -
 2ee2f90b-9465-4be8-91d8-bd5d81122c7c-3  inactive  yes        yes                -           -          -
 6f5d5e3a-fd91-42fd-92ad-d97e7e67a14b    inactive  no         yes                -           -          -
 localvm20WEfl                           inactive  yes        yes                -           -          -
 localvmgMacYp                           inactive  yes        yes                -           -          -
 localvmHBQRGU                           inactive  yes        yes                -           -          -
 localvmqox8ET                           inactive  yes        yes                -           -          -
 localvmZELgKK                           inactive  yes        yes                -           -          -
~~~

# grep autostart /var/log/messages
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.829+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool 'localvm20WEfl': cannot open directory '/var/tmp/localvm20WEfl': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool '2ee2f90b-9465-4be8-91d8-bd5d81122c7c': cannot open directory '/var/tmp/localvmgMacYp/images/2ee2f90b-9465-4be8-91d8-bd5d81122c7c': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool 'localvmqox8ET': cannot open directory '/var/tmp/localvmqox8ET': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool '6f5d5e3a-fd91-42fd-92ad-d97e7e67a14b': cannot open directory '/var/tmp/localvmqox8ET/images/6f5d5e3a-fd91-42fd-92ad-d97e7e67a14b': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool 'localvmZELgKK': cannot open directory '/var/tmp/localvmZELgKK': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool 'localvmHBQRGU': cannot open directory '/var/tmp/localvmHBQRGU': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool '2ee2f90b-9465-4be8-91d8-bd5d81122c7c-2': cannot open directory '/var/tmp/localvmZELgKK/images/2ee2f90b-9465-4be8-91d8-bd5d81122c7c': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool '2ee2f90b-9465-4be8-91d8-bd5d81122c7c-1': cannot open directory '/var/tmp/localvm20WEfl/images/2ee2f90b-9465-4be8-91d8-bd5d81122c7c': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool 'localvmgMacYp': cannot open directory '/var/tmp/localvmgMacYp': No such file or directory
Jun  2 13:02:29 rhevh-24 libvirtd: 2020-06-02 17:02:29.830+0000: 1318: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool '2ee2f90b-9465-4be8-91d8-bd5d81122c7c-3': cannot open directory '/var/tmp/localvmHBQRGU/images/2ee2f90b-9465-4be8-91d8-bd5d81122c7c': No such file or directory


Version-Release number of selected component (if applicable):
4.3.9

How reproducible:
100%

Steps to Reproduce:
1. Deploy HE
2. Restart libvirtd
3. Check for errors relating to failed to autostart

Actual results:
storage pools were not cleaned up from HE deployment

Expected results:
storage pools should be cleaned up after HE deployment

Additional info:

Comment 1 Sandro Bonazzola 2020-06-04 07:33:19 UTC
Is this the result of a failed hosted engine setup?

Comment 2 amashah 2020-06-04 16:34:25 UTC
(In reply to Sandro Bonazzola from comment #1)
> Is this the result of a failed hosted engine setup?

I *think* it happens whether it fails or succeeds, but the reason there are several is likely because of several failed deployment attempts. 

One of the ansible plays does a cleanup of the local VM dir [1], but it doesn't remove the defined storage pools.

[1] https://github.com/oVirt/ovirt-ansible-hosted-engine-setup/blob/master/tasks/clean_localvm_dir.yml

Comment 3 Wei Wang 2020-06-11 08:42:49 UTC
Test Version
rhvh-4.3.10.1-0.20200513.0
cockpit-ovirt-dashboard-0.13.10-1.el7ev.noarch
libvirt-4.5.0-33.el7_8.1.x86_64

Test Steps:
1. Deploy hosted engine with rhvh
2. Systemctl restart libvirtd
3. # grep autostart /var/log/messages

Result:
Jun 11 16:36:11 hp-dl388g9-04 libvirtd: 2020-06-11 08:36:11.193+0000: 20930: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool '411445cd-76ac-4df7-b20c-5c1da1af8681': cannot open directory '/var/tmp/localvmsrsE67/images/411445cd-76ac-4df7-b20c-5c1da1af8681': No such file or directory
Jun 11 16:36:11 hp-dl388g9-04 libvirtd: 2020-06-11 08:36:11.193+0000: 20930: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool 'localvmsrsE67': cannot open directory '/var/tmp/localvmsrsE67': No such file or directory

QE can reproduce this issue, ack+

Comment 5 Wei Wang 2020-06-30 22:59:55 UTC
QE will verify this issue until the new build is coming.

Comment 6 Wei Wang 2020-07-02 03:14:46 UTC
Test with RHVH-4.4-20200701.0-RHVH-x86_64-dvd1.iso,ovirt-ansible-hosted-engine-setup-1.1.5-1.el8ev.noarch, bug is fixed, move it to "VERIFIED"

Comment 10 errata-xmlrpc 2020-08-04 13:23:51 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 (RHV Engine and Host Common Packages 4.4), 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/RHEA-2020:3309


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