Skip to content

script_tools.py --disable-locking option not recognized correctly #29

@kwaegema

Description

@kwaegema

[root@ceph001 ~]# ./ceph-smart_health -d --disable-locking
2015-12-14 17:50:16,919 DEBUG ceph-smart_health.ExtOption MainThread changed loglevel to DEBUG, previous state: (ceph-smart_health.SimpleOptionParser, NOTSET), (ceph-smart_health.CEPH-SMART_HEALTH, NOTSET), (ceph-smart_health.ExtOptionGroup, NOTSET), (ceph-smart_health.vsc.utils.missing, NOTSET), (ceph-smart_health.main, NOTSET), (ceph-smart_health.vsc.utils.nagios, NOTSET), (ceph-smart_health.vsc.utils.lock, NOTSET), (ceph-smart_health.ExtOption, NOTSET), (ceph-smart_health, NOTSET)
2015-12-14 17:50:16,919 DEBUG ceph-smart_health.CEPH-SMART_HEALTH MainThread parseoptions: options from environment []
2015-12-14 17:50:16,919 DEBUG ceph-smart_health.CEPH-SMART_HEALTH MainThread parseoptions: options from commandline ['-d', '--disable-locking']
2015-12-14 17:50:16,919 DEBUG ceph-smart_health.CEPH-SMART_HEALTH MainThread Found options {'info': False, 'disable_locking': False, 'cache': '/tmp/smart_ceph_health.json.gz', 'help': None, 'dry_run': False, 'nagios_report': False, 'nagios_check_interval_threshold': 0, 'locking_filename': '/var/lock/ceph-smart_health.lock', 'quiet': False, 'configfiles': None, 'debug': True, 'ignoreconfigfiles': None, 'nagios_check_filename': '/var/cache/ceph-smart_health.nagios.json.gz', 'ha': None} args []

also not shown when running -H.
But it doesn't give an error that it is unrecognized or something (like --disable-bla would give), but it still is set to false. the dry-run option, declared in same place ,works as expected.
Running 1.7.6

options = {
    'cache': ('the location to store the cache with previous release hold data', None, 'store',
              CEPH_HEALTH_CACHE_FILE)
}
opts = ExtendedSimpleOption(options)

print opts.options.disable_locking #-> False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions