Bug 1368117 - vdsm-tool prints no error if config file is invalid
Summary: vdsm-tool prints no error if config file is invalid
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: vdsm
Classification: oVirt
Component: Tools
Version: 4.18.11
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: ovirt-4.1.0-alpha
: ---
Assignee: Yaniv Bronhaim
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-18 13:16 UTC by Lucie Leistnerova
Modified: 2016-11-28 13:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-28 13:50:54 UTC
oVirt Team: Infra
mperina: ovirt-4.1?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)

Description Lucie Leistnerova 2016-08-18 13:16:52 UTC
Description of problem:
vdsm-tool doesn't print any error message if some config file is syntactically invalid


Version-Release number of selected component (if applicable):
vdsm-4.18.11-1.el7ev.x86_64


How reproducible: always


Steps to Reproduce:
1. save file /etc/vdsm/vdsm.conf.d/test.conf 

[vars]
ssl

2. run vdsm-tool validate-config
3. incomplete help is printed

Actual results:

# vdsm-tool validate-config
Usage: /usr/bin/vdsm-tool [options] <action> [arguments]
Valid options:
  -h, --help
		Show this help menu.
  -l, --logfile <path>
		Redirect logging to file.
  -v, --verbose
		Include warning (and errors) messages in log.
  -vv, --vverbose
		Include information (and above) messages in log.
  -vvv, --vvverbose
		Include debug (and above) messages in log.
  -a, --append
		Append to logfile instead of truncating it
(if logging to a file).

 Commands in module configfile:

 Commands in module upgrade:



Expected results:
some error in parsing config file is printed

Comment 1 Yaniv Bronhaim 2016-11-28 13:50:54 UTC
"vdsm-tool validate-config" command validates only conf files that vdsm-tool itself configure to set the environment based on vdsm.conf files. such as libvirtd.conf, sanlock.conf and some more.. it doesn't check anything regarding vdsm.conf files and it shouldn't. the validation also doesn't check any syntax errors, it just checks if the environment configuration meets vdsm settings. this is not the vdsm-tool intention. 
probably vdsmd will fail to start with this configuration and you will see warnings or errors in syslog if that's what you're looking for


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