Yaniv Bronhaim has uploaded a new change for review.
Change subject: Workaround to avoid password request when starting vdsmd service ......................................................................
Workaround to avoid password request when starting vdsmd service
During start of vdsmd we shutdown conflicting services. As part of this we try to stop libvirt-guests. `service libvirt-guests stop` tries to access libvirtd which requires sasl authentication. This patch removes libvirt-guests lockfile instead of stopping the service.
The patch should be reverted after a fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1011981 will be available (Comment was added above the change to keep tracking the issue)
The workaround was part of vdsmd init script already in the past and was removed by mistake.
Change-Id: If7a3ad4db377f57a9d7fd34afc33d1add25c967f Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1010693 Signed-off-by: Yaniv Bronhaim ybronhei@redhat.com --- M init/sysvinit/vdsmd.init.in 1 file changed, 15 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/19644/1
diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in index 8f2c39b..2fd222d 100755 --- a/init/sysvinit/vdsmd.init.in +++ b/init/sysvinit/vdsmd.init.in @@ -55,12 +55,22 @@ local conflicting_services="$1"
for srv in ${conflicting_services}; do - if initctl status "${srv}" >/dev/null 2>&1; then - # When srv is Upstart service, status srv always returns 0 - initctl stop "${srv}" || : # stop fails when already down - initctl status "${srv}" | grep -q stop/waiting + if [ "$srv" == "libvirt-guests" ]; then + # `service libvirt-guests stop` tries to access libvirtd and + # requires sasl authentication. Instead, removing the lockfile + # signifies to libvirt-guests that it has stopped. + # TODO: This condition needs to be removed when BZ 1011981 fix will + # be available. + "@RM_PATH@" -f /var/lock/subsys/libvirt-guests >/dev/null 2>&1 else - (! service "${srv}" status >/dev/null 2>&1) || service "${srv}" stop + if initctl status "${srv}" >/dev/null 2>&1; then + # When srv is Upstart service, status srv always returns 0 + initctl stop "${srv}" || : # stop fails when already down + initctl status "${srv}" | grep -q stop/waiting + else + (! service "${srv}" status >/dev/null 2>&1) || + service "${srv}" stop + fi fi ret_val=$? if [ "${ret_val}" -ne 0 ]; then
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Workaround to avoid password request when starting vdsmd service ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/3780/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/4665/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/4589/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: Workaround to avoid password request when starting vdsmd service ......................................................................
Patch Set 1: Code-Review+2
We have to take it in until libvirt fixes their bug in el6.4.
Yaniv Bronhaim has posted comments on this change.
Change subject: Workaround to avoid password request when starting vdsmd service ......................................................................
Patch Set 1: Verified+1
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Workaround to avoid password request when starting vdsmd service ......................................................................
Workaround to avoid password request when starting vdsmd service
During start of vdsmd we shutdown conflicting services. As part of this we try to stop libvirt-guests. `service libvirt-guests stop` tries to access libvirtd which requires sasl authentication. This patch removes libvirt-guests lockfile instead of stopping the service.
The patch should be reverted after a fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1011981 will be available (Comment was added above the change to keep tracking the issue)
The workaround was part of vdsmd init script already in the past and was removed by mistake.
Change-Id: If7a3ad4db377f57a9d7fd34afc33d1add25c967f Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1010693 Signed-off-by: Yaniv Bronhaim ybronhei@redhat.com Reviewed-on: http://gerrit.ovirt.org/19644 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M init/sysvinit/vdsmd.init.in 1 file changed, 15 insertions(+), 5 deletions(-)
Approvals: Yaniv Bronhaim: Verified Dan Kenigsberg: Looks good to me, approved
vdsm-patches@lists.fedorahosted.org