Bug 1652795

Summary: RHVH 4.3: There are warnings when running lvm commands
Product: Red Hat Enterprise Virtualization Manager Reporter: cshao <cshao>
Component: imgbasedAssignee: Yuval Turgeman <yturgema>
Status: CLOSED ERRATA QA Contact: cshao <cshao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3.0CC: cshao, dfediuck, huzhao, mtessun, qiyuan, rdlugyhe, sbonazzo, weiwang, yaniwang, ycui, yturgema
Target Milestone: ovirt-4.3.1Keywords: Regression
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: imgbased-1.1.4 Doc Type: Bug Fix
Doc Text:
Previously, even if lvmetad was disabled in the configuration, the lvmetad service left a pid file hanging. As a result, entering lvm commands displayed warnings. The current release masks the lvmetad service during build so it never starts and lvm commands do not show warnings.
Story Points: ---
Clone Of: 1431158 Environment:
Last Closed: 2019-05-08 12:32:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1431158    
Bug Blocks: 1653669    
Attachments:
Description Flags
all log none

Description cshao 2018-11-23 03:59:32 UTC
+++ This bug was initially created as a clone of Bug #1431158 +++

Description of problem:
Install RHVH, after reboot, run lvm commands, like lvs, pvs,vgs, there will be warnings as below:
  WARNING: Not using lvmetad because config setting use_lvmetad=0.
  WARNING: To avoid corruption, rescan devices to make changes visible (pvscan --cache).


Check lvmetad and use_lvmetad: 
# systemctl status lvm2-lvmetad 
● lvm2-lvmetad.service
   Loaded: masked (/dev/null; bad)
   Active: failed (Result: signal) since Thu 2018-11-22 21:42:06 EST; 1h 12min ago
 Main PID: 1831 (code=killed, signal=KILL)

Nov 22 21:40:17 localhost.localdomain systemd[1]: Started LVM2 metadata daemon.
Nov 22 21:40:35 localhost.localdomain systemd[1]: Current command vanished from the unit file, execution of the command list won't be resumed.
Nov 22 21:40:36 dhcp-8-187.nay.redhat.com systemd[1]: Stopping lvm2-lvmetad.service...
Nov 22 21:42:06 dhcp-8-187.nay.redhat.com systemd[1]: lvm2-lvmetad.service stop-sigterm timed out. Killing.
Nov 22 21:42:06 dhcp-8-187.nay.redhat.com systemd[1]: lvm2-lvmetad.service: main process exited, code=killed, status=9/KILL
Nov 22 21:42:06 dhcp-8-187.nay.redhat.com systemd[1]: Stopped lvm2-lvmetad.service.
Nov 22 21:42:06 dhcp-8-187.nay.redhat.com systemd[1]: Unit lvm2-lvmetad.service entered failed state.
Nov 22 21:42:06 dhcp-8-187.nay.redhat.com systemd[1]: lvm2-lvmetad.service failed.



# cat /run/lvmetad.pid 
1831

# ls /proc/1831
ls: cannot access /proc/1831: No such file or directory

# kill -0 1831
-bash: kill: (1831) - No such process

# lvmconfig global/use_lvmetad 
use_lvmetad=0


The results show lvmetad is not running, in this case, the warning shouldn't be shown out when running lvm commands. 


Version-Release number of selected component (if applicable):
redhat-virtualization-host-4.3-20181122.0.el7_6
imgbased-1.1.1-0.1.el7ev.noarch


How reproducible:
100%


Steps to Reproduce:
1. Install RHVH-4.3-20181122.2-RHVH-x86_64-dvd1.iso via anadonda.
2. Reboot and log in to RHVH
3. Run lvm commands, like lvs, pvs. 

Actual results:
1. After step3, there are warnings as above. 

Expected results:
1. After step3, there is no warnings. 






--- Additional comment from Red Hat Bugzilla Rules Engine on 2017-04-03 23:09:19 CST ---

This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

--- Additional comment from Sandro Bonazzola on 2017-05-03 15:01:38 CST ---

Ryan please check if this was included in the build we gave to QE.
I merged the patch into 4.1 branch right now so it seems this should be on modified.

--- Additional comment from Qin Yuan on 2017-05-09 11:44:11 CST ---

Test Versions:
redhat-virtualization-host-4.1-20170506.0
imgbased-0.9.24-0.1.el7ev.noarch

Test Steps:
1. Install RHVH.
2. Log into RHVH, and run lvm commands, such as lvs, pvs, vgs.
3. Check lvm2-lvmetad.service status using "systemctl status lvm2-lvmetad.service" cmd.

Test Results:
1. After step2, there is no Warning message.
   
[root@dhcp-8-226 ~]# pvs
  PV         VG              Fmt  Attr PSize   PFree 
  /dev/sda2  rhvh_dhcp-8-226 lvm2 a--  231.88g 14.90g

2. After step3, lvm2-lvmetad.service status is:

[root@dhcp-8-226 ~]# systemctl status lvm2-lvmetad
● lvm2-lvmetad.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)
Warning: lvm2-lvmetad.service changed on disk. Run 'systemctl daemon-reload' to reload units.

Conclusion:
There is no warning message when running lvm commands, this bug is fixed, change bug status to VERIFIED.

Comment 1 cshao 2018-11-23 04:02:56 UTC
Created attachment 1508178 [details]
all log

Comment 4 Yuval Turgeman 2019-02-05 13:44:13 UTC
This can be worked around by pointing LVM_LVMETAD_PIDFILE to some non-exsting path

[root@node-iso-9979 ~]# lvs > /dev/null
  WARNING: Not using lvmetad because config setting use_lvmetad=0.
  WARNING: To avoid corruption, rescan devices to make changes visible (pvscan --cache).
[root@node-iso-9979 ~]# LVM_LVMETAD_PIDFILE=/path/to/non-existing/file lvs > /dev/null
[root@node-iso-9979 ~]#

Comment 6 cshao 2019-02-22 10:22:55 UTC
Test version:
redhat-virtualization-host-4.3-20190221.0.el7_6
imgbased-1.1.4-0.1.el7ev.noarch

Test Steps:
1. Install RHVH.
2. Log into RHVH, and run lvm commands, such as lvs, pvs, vgs.
3. Check lvm2-lvmetad.service status using "systemctl status lvm2-lvmetad.service" cmd.

Test Results:
1. After step2, there is no Warning message.
   

2. After step3, lvm2-lvmetad.service status is:
# systemctl status lvm2-lvmetad
● lvm2-lvmetad.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)
Warning: lvm2-lvmetad.service changed on disk. Run 'systemctl daemon-reload' to reload units.

Conclusion:
There is no warning message when running lvm commands, this bug is fixed, change bug status to VERIFIED.

Comment 9 errata-xmlrpc 2019-05-08 12:32:19 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, 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/RHBA-2019:1053