Bug 990696 - commented out sections in lvm.con w/ uncommented out variables now causes warnings
commented out sections in lvm.con w/ uncommented out variables now causes war...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.5
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: LVM and device-mapper development team
Cluster QE
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-31 15:24 EDT by Corey Marthaler
Modified: 2013-07-31 16:11 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-31 16:11:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2013-07-31 15:24:53 EDT
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 15:39:03 EDT
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 15:42:34 EDT
(...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 15:46:36 EDT
If those extra checks are unwanted, it's possible to disable them by setting config/checks=0.
Comment 5 Corey Marthaler 2013-07-31 16:11:00 EDT
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.

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