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 = []
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Validate conf in configure only if not forcing overriding ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6193/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7086/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/6972/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Validate conf in configure only if not forcing overriding ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6319/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7209/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7102/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: Validate conf in configure only if not forcing overriding ......................................................................
Patch Set 2: Code-Review+1
Yaniv Bronhaim has posted comments on this change.
Change subject: Validate conf in configure only if not forcing overriding ......................................................................
Patch Set 2: Verified+1
Dan Kenigsberg has posted comments on this change.
Change subject: Validate conf in configure only if not forcing overriding ......................................................................
Patch Set 2: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
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 (depends on reconfigureOnForce return value). Therefore, checking validate conf before overriding can lead to a fail while the current configuration is not relevant.
libvirt_configure.sh already manage to set the right configure in libvirtd.conf and qemu.conf according to the ssl verb in vdsm.conf. BUT, without this patch we validate the current config state before overriding the files even though the --force flag was stated, and this lead to fail the configure.
With that patch, setting in vdsm.conf ssl=True and then running "vdsm-tool configure --force" will update libvirtd.conf and qemu.conf according to vdsm.conf state.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036883 Change-Id: Ibd9e95c06b1437074f37248e77bb086a3c3bad63 Signed-off-by: Yaniv Bronhaim ybronhei@redhat.com Reviewed-on: http://gerrit.ovirt.org/24132 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/tool/configurator.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Yaniv Bronhaim: Verified Dan Kenigsberg: Looks good to me, approved
vdsm-patches@lists.fedorahosted.org