Ticket #3403 (closed defect: Fixed)

Opened 7 months ago

Last modified 7 weeks ago

Configuration file taking precedence over command line option

Reported by: cluther Owned by: kkearney
Priority: 2 - High Milestone: Blue Crab
Component: All Version: 2.2.0
Keywords: Cc:
Community Patch Attached: Deployed @ Customer:
Installer: Any/All Maintenance Target:
Specific ZenPack: Maintenance Status:
Documentation Note?: Required Regression:

Description

It appears that at least in some circumstances options in the $ZENHOME/etc/*.conf files take precedence over the same option specified on the command line. As far as I'm aware, the command line should always take precedence.

Steps to reproduce:

  1. Add device localhost to $ZENHOME/etc/zencommand.conf
  2. Run zencommand run --device=otherDevice
  3. Note that zencommand collected only for localhost

Change History

Changed 6 months ago by bwhichard

  • keywords zenoss-2.2.3-rejected added; zenoss-2.2.3-proposed removed

Changed 6 months ago by bwhichard

  • keywords zenoss-2.2.3-rejected removed
  • priority changed from medium to high
  • reviewed set to 0

Changed 6 months ago by bwhichard

  • reviewed changed from 0 to 1

Changed 2 months ago by bbibeault

  • milestone changed from zenoss-2.3 to zenoss-2.4

Changed 7 weeks ago by kkearney

  • owner changed from edahl to kkearney

Changed 7 weeks ago by kkearney

(In [11028]) * Refs #3403: Allow command-line params to override config-file defaults

Changed 7 weeks ago by kkearney

(In [11035]) * Refs #3403: added inline comment about optparse oddness

Changed 7 weeks ago by kkearney

  • status changed from new to closed
  • resolution set to fixed

(In [11038]) * Fixes #3403: allow command-line to override config files. Reviewed by JP.

Changed 7 weeks ago by kkearney

  • installer set to Any/All
  • documentation changed from Not required to Required

Documentation Note:
The command-line parameters now override information provided in the configuration files. Also, this change now allows for case-sensitive command-line options and configuration-file options. Any options not understood by the option parser will be output to standard-error and not to a log file, as the determination of the log file is not known at this point, much less whether or not the command is expected to create a log file.

Note: See TracTickets for help on using tickets.