Yaniv Bronhaim has uploaded a new change for review.
Change subject: Validate conf in configure only if not forcing overriding ......................................................................
Validate conf in configure only if not forcing overriding
When --force flag is sent to configure the conf might be overrided. Therefore, checking validate conf before overriding can lead to a fail while the current configuration is not relevant.
Change-Id: Ibd9e95c06b1437074f37248e77bb086a3c3bad63 Signed-off-by: Yaniv Bronhaim ybronhei@redhat.com --- M lib/vdsm/tool/configurator.py 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/24132/1
diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py index dfc4115..26eb627 100644 --- a/lib/vdsm/tool/configurator.py +++ b/lib/vdsm/tool/configurator.py @@ -195,11 +195,12 @@ sys.stdout.write("\nChecking configuration status...\n\n") for c in __configurers: if c.getName() in args.modules: - if not c.validate(): + override = args.force and c.reconfigureOnForce() + if not override and not c.validate(): raise RuntimeError( "Configuration of %s is invalid" % c.getName() ) - if (args.force and c.reconfigureOnForce()) or not c.isconfigured(): + if override or not c.isconfigured(): configurer_to_trigger.append(c)
services = []