Bug 720359

Summary: [vdsm] [Init-script] vdsmd startup hangs forever while libvirt-guests service is running.
Product: Red Hat Enterprise Linux 6 Reporter: David Naori <dnaori>
Component: vdsmAssignee: David Naori <dnaori>
Status: CLOSED ERRATA QA Contact: David Naori <dnaori>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: abaron, bazulay, danken, dnaori, hateya, iheim, mgoldboi, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: vdsm-4.9-82 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 07:31:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Naori 2011-07-11 13:58:23 UTC
Description of problem:

When starting vdsmd and libvirt-guests service is running. vdsmd init script tries to stop libvirt-guests (CONFLICTING_SERVICES) and hangs forever on:

Running guests on default URI:

it is possible to get out of this hang by pressing enter:
vdsm: libvirt already configured for vdsm                  [  OK  ]
Starting iscsid: 
Running guests on default URI: 
error: Failed to reconnect to the hypervisor
error: no valid connection
error: authentication failed: Failed to step SASL negotiation: -1 (SASL(-1): generic failure: All-whitespace username.)


**possible sulotion is shutdown this servise instead of stop:
shutdown_conflicting_srv() {
    local srv 

    for srv in $CONFLICTING_SERVICES
    do  
        /sbin/chkconfig $srv off 
        if /sbin/service $srv status > /dev/null 2>&1;
        then
             if [ "$srv" == "libvirt-guests" ]; then
                 /sbin/service $srv shutdown
             else
                 /sbin/service $srv stop
             fi  
        fi  
    done
    return 0
}

Version-Release number of selected component (if applicable):
vdsm-4.9-81.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.service libvirt-guests start
2.service vdsmd start
  
Actual results:
startup hangs forever

Expected results:


Additional info:

Comment 2 Dan Kenigsberg 2011-07-11 14:31:16 UTC
Are you sure that `/sbin/service $srv shutdown` does not block, too? It needs sasl just as much.

Instead, I suggest

rm -f /var/lock/subsys/libvirt-guests

which would signify to libvirt-guests that it is not running. Could you verify that?

Comment 3 David Naori 2011-07-12 07:17:46 UTC
(In reply to comment #2)
> Are you sure that `/sbin/service $srv shutdown` does not block, too? It needs
> sasl just as much.
> 
> Instead, I suggest
> 
> rm -f /var/lock/subsys/libvirt-guests
> 
> which would signify to libvirt-guests that it is not running. Could you verify
> that?

tried that.

shutdown_conflicting_srv() {
    local srv

    for srv in $CONFLICTING_SERVICES
    do
        /sbin/chkconfig $srv off
        if /sbin/service $srv status > /dev/null 2>&1;
        then
             if [ "$srv" == "libvirt-guests" ]; then
                 rm -f /var/lock/subsys/libvirt-guests
             fi
             /sbin/service $srv stop
        fi
    done
    return 0
}

this dose not solve the problem.

Comment 4 David Naori 2011-07-12 08:45:53 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Are you sure that `/sbin/service $srv shutdown` does not block, too? It needs
> > sasl just as much.
> > 
> > Instead, I suggest
> > 
> > rm -f /var/lock/subsys/libvirt-guests
> > 
> > which would signify to libvirt-guests that it is not running. Could you verify
> > that?
> 
> tried that.
> 
> shutdown_conflicting_srv() {
>     local srv
> 
>     for srv in $CONFLICTING_SERVICES
>     do
>         /sbin/chkconfig $srv off
>         if /sbin/service $srv status > /dev/null 2>&1;
>         then
>              if [ "$srv" == "libvirt-guests" ]; then
>                  rm -f /var/lock/subsys/libvirt-guests
>              fi
>              /sbin/service $srv stop
>         fi
>     done
>     return 0
> }
> 
> this dose not solve the problem.

i had a mistake. this solution works.

 shutdown_conflicting_srv() {
    local srv 

    for srv in $CONFLICTING_SERVICES
    do  
        /sbin/chkconfig $srv off 
        if /sbin/service $srv status > /dev/null 2>&1;
        then
             if [ "$srv" == "libvirt-guests" ]; then
                 rm -f /var/lock/subsys/libvirt-guests
             else
                 /sbin/service $srv stop
             fi  
        fi  
    done
    return 0
}

Comment 5 David Naori 2011-07-12 13:58:50 UTC
http://gerrit.usersys.redhat.com/#change,687

Comment 7 David Naori 2011-07-18 08:17:09 UTC
Verified  vdsm-4.9-82


[root@camel-vdsa vdsm]# /etc/init.d/vdsmd stop
Shutting down vdsm daemon: 
vdsm watchdog stop                                         [  OK  ]
vdsm stop                                                  [  OK  ]
[root@camel-vdsa vdsm]# /etc/init.d/libvirt-guests start
[root@camel-vdsa vdsm]# /etc/init.d/vdsmd start
vdsm: libvirt already configured for vdsm                  [  OK  ]
Starting iscsid: 
Starting up vdsm daemon: 
vdsm start                                                 [  OK  ]

Comment 8 errata-xmlrpc 2011-12-06 07:31:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2011-1782.html