[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-bugs] [Bug 1470] Not only status executes network-* start



http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1470





------- Comment #2 from adamc@xxxxxxx  2009-09-04 02:17 -------
I've made some modification in scripts, just added some 'echos' and 'prints'
for debug:

#####################################################################
/usr/lib/xen-3.2-1/bin/xend, l.117:

print 'In /usr/lib/xen-3.2-1/bin/xend, l. 117, sys.argv: %s' % sys.argv

#####################################################################
/usr/lib/xen-3.2-1/lib/python/xen/xend/server/SrvDaemon.py, l.327:

print '/usr/lib/xen-3.2-1/lib/python/xen/xend/server/SrvDaemon.py, l.327, we
are in stop function'

#####################################################################
/usr/lib/xen-3.2-1/lib/python/xen/xend/server/SrvDaemon.py, l.333:

print '/usr/lib/xen-3.2-1/lib/python/xen/xend/server/SrvDaemon.py, l.333, we
are in run function'

#####################################################################
/etc/xen/scripts/xen-script-common.sh, l.22-47:

evalVariables()
{ 
  for arg in "$@"
  do
    if expr 'index' "$arg" '=' '>' '1' >/dev/null
    then
        echo "Function evalVariables in script
/etc/xen/scrits/xen-script-common.sh - \$arg: $arg"
      eval "$arg"
    fi                                                        
  done                                                        
}

findCommand()
{
  for arg in "$@"
  do
    if ! expr 'index' "$arg" '=' >/dev/null
    then
      command="$arg"
        echo "Function findCommand in script
/etc/xen/scripts/xen-script-common.sh \$command: $command"
      return
    fi
  done
}

#####################################################################
/etc/xen/scripts/network-dummy:

#!/bin/sh

dir=$(dirname "$0")
. "$dir/xen-script-common.sh"
echo "${0} args: ${@}"
findCommand "$@"
evalVariables "$@"

exit 0
#####################################################################

I can see the results:
debian:~# /etc/init.d/xend start
Starting XEN control daemon: xend
/etc/xen/scripts/network-dummy args: start
Function findCommand in script /etc/xen/scripts/xen-script-common.sh $command:
start
In /usr/lib/xen-3.2-1/bin/xend, l. 117, sys.argv:
['/usr/lib/xen-3.2-1/bin/xend', 'status']

/etc/xen/scripts/network-dummy args: start
Function findCommand in script /etc/xen/scripts/xen-script-common.sh $command:
start
In /usr/lib/xen-3.2-1/bin/xend, l. 117, sys.argv:
['/usr/lib/xen-3.2-1/bin/xend', 'start']

/etc/xen/scripts/network-dummy args: start
Function findCommand in script /etc/xen/scripts/xen-script-common.sh $command:
start
In /usr/lib/xen-3.2-1/bin/xend, l. 117, sys.argv:
['/usr/lib/xen-3.2-1/bin/xend', 'status']
.

+--------------------------------------------------------------------+

debian:~# /etc/init.d/xend stop
Stopping XEN control daemon: xend
/etc/xen/scripts/network-dummy args: start
Function findCommand in script /etc/xen/scripts/xen-script-common.sh $command:
start
In /usr/lib/xen-3.2-1/bin/xend, l. 117, sys.argv:
['/usr/lib/xen-3.2-1/bin/xend', 'status']

/etc/xen/scripts/network-dummy args: start
Function findCommand in script /etc/xen/scripts/xen-script-common.sh $command:
start
In /usr/lib/xen-3.2-1/bin/xend, l. 117, sys.argv:
['/usr/lib/xen-3.2-1/bin/xend', 'stop']
/usr/lib/xen-3.2-1/lib/python/xen/xend/server/SrvDaemon.py, l.327, we are in
stop function
.

+---------------------------------------------------------------+
As you can see when we stop xenserver, xend gets 'stop' arg, but in network
script we get 'start' arg. (even twice, because there is xend status check
first). Why?


-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.