Bug 760946
Summary: | lvm2-monitor fails to start with lvm.conf containing 'command_names = 1' or 'prefix='something'' | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Alexander Todorov <atodorov> |
Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.2 | CC: | agk, cmarthal, dwysocha, heinzm, jbrassow, mbroz, nperic, prajnoha, prockai, thornber, zkabelac |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.02.95-1.el6 | Doc Type: | Bug Fix |
Doc Text: |
Using a prefix or using command names on LVM command output (the 'log/prefix' and 'log/command_names' lvm.conf setting) caused the lvm2-monitor init script to fail start monitoring for relevant VGs.
The init script acquires the list of VGs first by calling the 'vgs' command and then it uses its output for further processing. However, if the prefix or command name is used on output, the VG name was not correctly formatted. To solve this, the lvm2-monitor init script overrides the log/prefix and log/command_names setting so the command's output is always suitable for use in the init script.
|
Story Points: | --- |
Clone Of: | 593096 | Environment: | |
Last Closed: | 2012-06-20 15:00:34 UTC | Type: | --- |
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: | |||
Bug Blocks: | 760559 |
Description
Alexander Todorov
2011-12-07 12:04:14 UTC
Nice catch, thanks for the report! Adding QA ack for 6.3. Devel will need to provide unit testing results however before this bug can be ultimately verified by QA. (In reply to comment #3) > Devel will need to provide unit testing results however before this bug can be > ultimately verified by QA. Using log/command_names=1 and log/prefix="---" in lvm.conf. Before the patch: [root@node-a ~]# service lvm2-monitor start Starting monitoring for VG vgs---VolGroup: vgchange---Volume group "vgs---VolGroup" not found [FAILED] After the patch (https://www.redhat.com/archives/lvm-devel/2011-December/msg00009.html): [root@node-a ~]# service lvm2-monitor start Starting monitoring for VG VolGroup: vgchange---2 logical volume(s) in volume group "VolGroup" monitored [ OK ] [root@node-a ~]# service lvm2-monitor force-stop Stopping monitoring for VG VolGroup: vgchange---2 logical volume(s) in volume group "VolGroup" unmonitored [ OK ] (Note that the "vgchange" command name with the prefix is still visible - but I guess this is expected if configured in lvm.conf that way.) "(Note that the "vgchange" command name with the prefix is still visible - but I guess this is expected if configured in lvm.conf that way.)" Why? Might as well fix that at the same time... OK, patched as well (https://www.redhat.com/archives/lvm-devel/2011-December/msg00029.html): [root@node-a ~]# service lvm2-monitor start Starting monitoring for VG VolGroup: 2 logical volume(s) in volume group "VolGroup" monitored [ OK ] [root@node-a ~]# service lvm2-monitor force-stop Stopping monitoring for VG VolGroup: 2 logical volume(s) in volume group "VolGroup" unmonitored [ OK ] Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Using a prefix or using command names on LVM command output (the 'log/prefix' and 'log/command_names' lvm.conf setting) caused the lvm2-monitor init script to fail start monitoring for relevant VGs. The init script acquires the list of VGs first by calling the 'vgs' command and then it uses its output for further processing. However, if the prefix or command name is used on output, the VG name was not correctly formatted. To solve this, the lvm2-monitor init script overrides the log/prefix and log/command_names setting so the command's output is always suitable for use in the init script. The commands have been tested and verified with lvm2-2.02.95-5.el6.x86_64 (08:10:31) [root@node01:~]$ vgs vgs---VG #PV #LV #SN Attr VSize VFree vgs---VolGroup 1 2 0 wz--n- 9.51g 0 vgs---volume1 4 2 0 wz--n- 38.11g 34.61g (08:10:27) [root@node01:~]$ lvs lvs---LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert lvs---lv_root VolGroup -wi-ao-- 8.52g lvs---lv_swap VolGroup -wi-ao-- 1008.00m lvs---mirror volume1 mwi-a-m- 1.50g mirror_mlog 100.00 lvs---stripe volume1 -wi-a--- 504.00m (08:09:51) [root@node01:~]$ service lvm2-monitor start Starting monitoring for VG VolGroup: 2 logical volume(s) in volume group "VolGroup" monitored [ OK ] Starting monitoring for VG volume1: 5 logical volume(s) in volume group "volume1" monitored [ OK ] Apr 27 08:08:20 node01 dmeventd[2086]: dmeventd ready for processing. Apr 27 08:08:20 node01 lvm[2086]: Monitoring mirror device volume1-mirror for events. Apr 27 08:09:42 node01 lvm[2086]: volume1-mirror is now in-sync. (08:11:41) [root@node01:~]$ service lvm2-monitor force-stop Stopping monitoring for VG VolGroup: 2 logical volume(s) in volume group "VolGroup" unmonitored [ OK ] Stopping monitoring for VG volume1: 5 logical volume(s) in volume group "volume1" unmonitored [ OK ] Apr 27 08:11:49 node01 lvm[2086]: No longer monitoring mirror device volume1-mirror for events. 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. http://rhn.redhat.com/errata/RHBA-2012-0962.html |