Bug 1431158 - There are warnings when running lvm commands
Summary: There are warnings when running lvm commands
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-node
Classification: oVirt
Component: General
Version: 4.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ovirt-4.1.2
: 4.1
Assignee: Yuval Turgeman
QA Contact: Qin Yuan
URL:
Whiteboard:
Depends On:
Blocks: 1652795
TreeView+ depends on / blocked
 
Reported: 2017-03-10 13:57 UTC by Qin Yuan
Modified: 2018-11-23 03:59 UTC (History)
13 users (show)

Fixed In Version: imgbased-0.9.24-0.1.el7ev
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1652795 (view as bug list)
Environment:
Last Closed: 2017-05-23 08:17:54 UTC
oVirt Team: Node
Embargoed:
rbarry: needinfo-
sbonazzo: ovirt-4.1?
rule-engine: blocker?
sbonazzo: planning_ack?
rule-engine: devel_ack+
cshao: testing_ack+


Attachments (Terms of Use)
/var/log*,/tmp/* (346.64 KB, application/x-gzip)
2017-03-10 13:57 UTC, Qin Yuan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 75594 0 master MERGED build: mask out lvmetad service and socket 2021-02-17 19:42:07 UTC
oVirt gerrit 75622 0 ovirt-4.1 MERGED build: mask out lvmetad service and socket 2021-02-17 19:42:12 UTC

Description Qin Yuan 2017-03-10 13:57:02 UTC
Created attachment 1261938 [details]
/var/log*,/tmp/*

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: 

[root@rhvh515 ~]# systemctl status lvm2-lvmetad 
● lvm2-lvmetad.service
   Loaded: masked (/dev/null; bad)
   Active: failed (Result: signal) since Fri 2017-03-10 20:58:32 CST; 32min ago
 Main PID: 1208 (code=killed, signal=KILL)

Mar 10 12:56:41 rhvh515.redhat.com systemd[1]: Started LVM2 metadata daemon.
Mar 10 12:56:41 rhvh515.redhat.com systemd[1]: Starting LVM2 metadata daemon...
Mar 10 12:57:02 rhvh515.redhat.com systemd[1]: Stopping lvm2-lvmetad.service...
Mar 10 12:57:02 rhvh515.redhat.com lvmetad[1208]: Failed to accept connection errno 11.
Mar 10 20:58:32 rhvh515.redhat.com systemd[1]: lvm2-lvmetad.service stop-sigterm timed out. Killing.
Mar 10 20:58:32 rhvh515.redhat.com systemd[1]: lvm2-lvmetad.service: main process exited, code=killed, status=9/KILL
Mar 10 20:58:32 rhvh515.redhat.com systemd[1]: Stopped lvm2-lvmetad.service.
Mar 10 20:58:32 rhvh515.redhat.com systemd[1]: Unit lvm2-lvmetad.service entered failed state.
Mar 10 20:58:32 rhvh515.redhat.com systemd[1]: lvm2-lvmetad.service failed.

[root@rhvh515 ~]# cat /run/lvmetad.pid 
1208

[root@rhvh515 ~]# ls /proc/1208
ls: cannot access /proc/1208: No such file or directory

[root@rhvh515 ~]# kill -0 1208
-bash: kill: (1208) - No such process

[root@rhvh515 ~]# 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.1-20170308.1
imgbased-0.9.17-0.1.el7ev.noarch

How reproducible:
100%


Steps to Reproduce:
1. Install redhat-virtualization-host-4.1-20170308.1
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 info:
1. Searched via internet, the codes generating the warnings should be like:

      if (!find_config_tree_bool(cmd, global_use_lvmetad_CFG, NULL)) {
          if (lvmetad_pidfile_present()) {
              log_warn("WARNING: Not using lvmetad because config setting use_lvmetad=0.");
              log_warn("WARNING: To avoid corruption, rescan devices to make changes visible (pvscan --cache).");
          }
          return 1;
      }

This indicates if lvmetad.pid file exists and use_lvmetad=0, the warnings will be shown when running lvm commands.

2. Reboot RHVH again, the warnings disappear when running lvm commands. Check lvmetad and use_lvmetad: 
[root@rhvh515 ~]# 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.

[root@rhvh515 ~]# cat /run/lvmetad.pid 
cat: /run/lvmetad.pid: No such file or directory

[root@rhvh515 ~]# lvmconfig global/use_lvmetad 
use_lvmetad=0

Comment 1 Red Hat Bugzilla Rules Engine 2017-04-03 15:09:19 UTC
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.

Comment 2 Sandro Bonazzola 2017-05-03 07:01:38 UTC
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.

Comment 3 Qin Yuan 2017-05-09 03:44:11 UTC
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.


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