Bug 990696

Summary: commented out sections in lvm.con w/ uncommented out variables now causes warnings
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED NOTABUG QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5CC: agk, dwysocha, heinzm, jbrassow, msnitzer, prajnoha, prockai, thornber, zkabelac
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-31 20:11:36 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:

Description Corey Marthaler 2013-07-31 19:24:53 UTC
Description of problem:
This is a regression from rhel6.4. For any commented out section tags, any variable inside that section that's not also commented out, will cause a warning message.

From lvm.conf:

# allocation {

[...]
    # Changes made in version 2.02.85 extended the reach of the 'cling'
    # policies to detect more situations where data can be grouped
    # onto the same disks.  Set this to 0 to revert to the previous
    # algorithm.
    maximise_cling = 1

    # Set to 1 to guarantee that mirror logs will always be placed on
    # different PVs from the mirror images.  This was the default
    # until version 2.02.85.
    mirror_logs_require_separate_pvs = 0

    # Set to 1 to guarantee that thin pool metadata will always
    # be placed on different PVs from the pool data.
    thin_pool_metadata_require_separate_pvs = 0
[...]

#}

[root@taft-01 lvm]# lvs
  Configuration setting "vgmetadatacopies" invalid. It's not part of any section.
  Configuration setting "thin_pool_zero" invalid. It's not part of any section.
  Configuration setting "thin_pool_discards" invalid. It's not part of any section.
  Configuration setting "thin_pool_chunk_size" invalid. It's not part of any section.
  Configuration setting "thin_pool_metadata_require_separate_pvs" invalid. It's not part of any section.
  Configuration setting "mirror_logs_require_separate_pvs" invalid. It's not part of any section.
  Configuration setting "maximise_cling" invalid. It's not part of any section.
  LV      VG        Attr       LSize  Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_home vg_taft01 -wi-ao----  9.94g                                             
  lv_root vg_taft01 -wi-ao---- 50.00g                                             
  lv_swap vg_taft01 -wi-ao----  7.81g                                             



Version-Release number of selected component (if applicable):
2.6.32-404.el6.x86_64
lvm2-2.02.100-0.35.el6    BUILT: Tue Jul 30 09:44:33 CDT 2013
lvm2-libs-2.02.100-0.35.el6    BUILT: Tue Jul 30 09:44:33 CDT 2013
lvm2-cluster-2.02.100-0.35.el6    BUILT: Tue Jul 30 09:44:33 CDT 2013
udev-147-2.46.el6    BUILT: Tue Jan 15 06:41:59 CST 2013
device-mapper-1.02.79-0.35.el6    BUILT: Tue Jul 30 09:44:33 CDT 2013
device-mapper-libs-1.02.79-0.35.el6    BUILT: Tue Jul 30 09:44:33 CDT 2013
device-mapper-event-1.02.79-0.35.el6    BUILT: Tue Jul 30 09:44:33 CDT 2013
device-mapper-event-libs-1.02.79-0.35.el6    BUILT: Tue Jul 30 09:44:33 CDT 2013
cmirror-2.02.100-0.35.el6    BUILT: Tue Jul 30 09:44:33 CDT 2013


How reproducible:
Everytime

Comment 1 Peter Rajnoha 2013-07-31 19:39:03 UTC
This is supposed to be a feature, not a bug actually... We've added more lvm.conf checks and one of them is that the config should be defined properly It's not correct to keep dangling config settings without being in any section - this could pose a confusion as lvm just ignored such settings silently before, now it warns at least.

Comment 2 Peter Rajnoha 2013-07-31 19:42:34 UTC
(...I've seen many times that people uncommented some settings, but they forgot to uncomment the section itself and expecting that the config they uncommented will do the change...)

Comment 3 Peter Rajnoha 2013-07-31 19:46:36 UTC
If those extra checks are unwanted, it's possible to disable them by setting config/checks=0.

Comment 5 Corey Marthaler 2013-07-31 20:11:00 UTC
OK, that works, unless I comment out the config section. HA HA! :)

#config {

    # If enabled, any LVM2 configuration mismatch is reported.
    # This implies checking that the configuration key is understood
    # by LVM2 and that the value of the key is of a proper type.
    # If disabled, any configuration mismatch is ignored and default
    # value is used instead without any warning (a message about the
    # configuration key not being found is issued in verbose mode only).
    checks = 0

    # If enabled, any configuration mismatch aborts the LVM2 process.
    abort_on_errors = 0

    # Directory where LVM looks for configuration profiles.
    profile_dir = "/etc/lvm/profile"
#}


[root@taft-01 lvm]# lvs
  Configuration setting "checks" invalid. It's not part of any section.
  Configuration setting "profile_dir" invalid. It's not part of any section.
  Configuration setting "abort_on_errors" invalid. It's not part of any section.