Bug 1085119
| Summary: | overkill of 'socket connect' messages when lvmetad is not running | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> |
| Component: | lvm2 | Assignee: | Petr Rockai <prockai> |
| lvm2 sub component: | LVM Metadata / lvmetad | QA Contact: | Cluster QE <mspqa-list> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | low | CC: | agk, cmarthal, dwysocha, heinzm, jbrassow, msnitzer, nperic, nyewale, prajnoha, prockai, thornber, zkabelac |
| Version: | 7.0 | Keywords: | Triaged |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.111-1.el7 | Doc Type: | Bug Fix |
| Doc Text: |
If lvmetad use was enabled in lvm.conf (use_lvmetad = 1) but at the same time lvmetad was not available, lvm commands would print an error message (about lvmetad being unavavailable) multiple times instead of just once. This has been remedied and there will be only one error message in those cases.
|
Story Points: | --- |
| Clone Of: | 1016218 | Environment: | |
| Last Closed: | 2015-03-05 13:07:58 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1016218 | ||
| Bug Blocks: | |||
|
Comment 2
Corey Marthaler
2014-04-07 21:29:19 UTC
(In reply to Corey Marthaler from comment #2) > Looks like we never cloned this for rhel7.0. Well, in RHEL7 this works a bit differently with systemd. There's always lvm2-lvmetad.socket systemd unit ready to start the lvmetad when needed and it works like this: - at the very beginning, the /lib/systemd/systemd-generators/lvm2-activation-generator is executed by systemd, the generator looks at /etc/lvm.conf and checkes the global/use_lvmetad setting and then it does the following based on what it finds: A. if global/use_lvmetad=1 (default), then the generator exits immediately (it *does not* generate lvm2-activation-early.service, lvm2-activation.service and lvm2-activation-net.service) and the boot continues and the first lvmetad socket access causes the lvmetad to start which then also causes all the LVM volumes to be autoactivated as the underlying PVs appear in the system B. if global/use_lvmetad=0, then the generator generates lvm2-activation-early.service, lvm2-activation.service and lvm2-activation-net.service which activate the LVM volumes directly (there's no autoactivation since we're not using lvmetad which is essential for this feature) Simply, we shouldn't get the error message ("connect failed") as seen on RHEL6 because there's always the lvm2-lvmetad.socket unit ready to start the lvmetad daemon if needed and all requests should be always handled unless lvmetad crashed or the lvm2-lvmetad.socket systemd unit got disabled. The error messages are (were) visible on RHEL6 because some services (the ones that activated LVs at boot - the vgchange used in rc.sysinit etc.) used the global lvm.conf with use_lvmetad=1 and at the same time lvmetad was not yet running since it was started a bit later as another service... And the vgchange in rc.sysinit tried to use lvmetad (based on use_lvmetad=1 found in lvm.conf). Do you see these messages in RHEL7? # Newly created virt system
3.10.0-116.el7.x86_64
lvm2-2.02.105-14.el7 BUILT: Wed Mar 26 08:29:41 CDT 2014
lvm2-libs-2.02.105-14.el7 BUILT: Wed Mar 26 08:29:41 CDT 2014
lvm2-cluster-2.02.105-14.el7 BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-1.02.84-14.el7 BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-libs-1.02.84-14.el7 BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-event-1.02.84-14.el7 BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-event-libs-1.02.84-14.el7 BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-persistent-data-0.3.0-1.el7 BUILT: Fri Mar 28 07:42:24 CDT 2014
cmirror-2.02.105-14.el7 BUILT: Wed Mar 26 08:29:41 CDT 2014
[root@host-029 ~]# pvscan
/run/lvm/lvmetad.socket: connect failed: Connection refused
WARNING: Failed to connect to lvmetad: Connection refused. Falling back to internal scanning.
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
PV /dev/vda2 VG rhel_host-029 lvm2 [7.51 GiB / 0 free]
Total: 1 [7.51 GiB] / in use: 1 [7.51 GiB] / in no VG: 0 [0 ]
[root@host-029 ~]# systemctl status lvm2-lvmetad.socket
lvm2-lvmetad.socket - LVM2 metadata daemon socket
Loaded: loaded (/usr/lib/systemd/system/lvm2-lvmetad.socket; disabled)
Active: inactive (dead) since Tue 2014-04-08 14:38:02 CDT; 2h 33min ago
Docs: man:lvmetad(8)
Listen: /run/lvm/lvmetad.socket (Stream)
Apr 08 14:38:02 host-029.virt.lab.msp.redhat.com systemd[1]: Stopping LVM2 metadata daemon socket.
Apr 08 14:38:02 host-029.virt.lab.msp.redhat.com systemd[1]: Closed LVM2 metadata daemon socket.
[root@host-029 ~]# systemctl start lvm2-lvmetad.socket
[root@host-029 ~]# pvscan
PV /dev/vda2 VG rhel_host-029 lvm2 [7.51 GiB / 0 free]
Total: 1 [7.51 GiB] / in use: 1 [7.51 GiB] / in no VG: 0 [0 ]
[root@host-029 ~]# systemctl stop lvm2-lvmetad.socket
[root@host-029 ~]# pvscan
/run/lvm/lvmetad.socket: connect failed: Connection refused
WARNING: Failed to connect to lvmetad: Connection refused. Falling back to internal scanning.
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
/run/lvm/lvmetad.socket: connect failed: Connection refused
PV /dev/vda2 VG rhel_host-029 lvm2 [7.51 GiB / 0 free]
Total: 1 [7.51 GiB] / in use: 1 [7.51 GiB] / in no VG: 0 [0 ]
(In reply to Corey Marthaler from comment #4) > [root@host-029 ~]# systemctl status lvm2-lvmetad.socket > lvm2-lvmetad.socket - LVM2 metadata daemon socket > Loaded: loaded (/usr/lib/systemd/system/lvm2-lvmetad.socket; disabled) This should have been enabled by default after new package installation based on /lib/systemd/system-preset/90-default.preset with this line: "enable lvm2-lvmetad.*". If it's not, it's an lvmetad issue then. However, if it's an upgrade from previous lvm2 package and if the socket unit was disabled before, the state is preserved... (In reply to Peter Rajnoha from comment #5) > This should have been enabled by default after new package installation > based on /lib/systemd/system-preset/90-default.preset with this line: > "enable lvm2-lvmetad.*". If it's not, it's an lvmetad issue then. s/lvmetad issue/systemd issue A couple of options: 1) Set internal state to say that lvmetad is disabled and fall back to scanning like the warning messages say has happened i.e. do not continue repeatedly trying to contact lvmetad; 2) For read commands, reduce the error messages after the first to debug level and continue running; for update commands, give a hard failure telling the user they must restart lvmetad or turn it off in the configuration. I think (1) is likely to be sufficient: if the daemon isn't running (or is uncontactable) it's still safe to proceed, and when it does get restarted, its state will get repopulated correctly again. Those comments are based on the actual subject of this bugzilla. Why it didn't get started up should probably be discussed in a different place. Seems to be a regression (the error message spam). I'll look at it. Fixed upstream in 02e1bf406b2fc9731b2f67c273acd8f21df64714. We now only try to connect once and remember if we failed. This request was not resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you need to escalate this bug. I cannot really seem to reproduce it since lvmetad starts automatically as soon as a command is executed and use_lvmetad is set to 1 in the config. Stopping lvmetad was just tempolrary since it would restart itself on a new lvm command. I will however mark this as VERIFIED since the behavior stated in the opening of the bug no longer happens. Verified with: 3.10.0-223.el7.x86_64 lvm2-2.02.114-5.el7 BUILT: Wed Jan 14 15:42:28 CET 2015 lvm2-libs-2.02.114-5.el7 BUILT: Wed Jan 14 15:42:28 CET 2015 lvm2-cluster-2.02.114-5.el7 BUILT: Wed Jan 14 15:42:28 CET 2015 device-mapper-1.02.92-5.el7 BUILT: Wed Jan 14 15:42:28 CET 2015 device-mapper-libs-1.02.92-5.el7 BUILT: Wed Jan 14 15:42:28 CET 2015 device-mapper-event-1.02.92-5.el7 BUILT: Wed Jan 14 15:42:28 CET 2015 device-mapper-event-libs-1.02.92-5.el7 BUILT: Wed Jan 14 15:42:28 CET 2015 device-mapper-persistent-data-0.4.1-2.el7 BUILT: Wed Nov 12 19:39:46 CET 2014 cmirror-2.02.114-5.el7 BUILT: Wed Jan 14 15:42:28 CET 2015 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://rhn.redhat.com/errata/RHBA-2015-0513.html |