[Spacewalk-list] Problems starting virtual machines from withinSpacewalk

Joshua Roys joshua.roys at gtri.gatech.edu
Wed Oct 14 11:53:56 UTC 2009


On 10/14/2009 05:07 AM, Stephen Ross wrote:
> Anybody else got any ideas on this? I Don't really know what else to try!
>
> Cheers,
>
>
>         When I schedule a machine to start, then do rhn_check -vvv on
>         the client side I get the following errors:
>
>         D: handle_action {'action': "<?xml
>         version='1.0'?>\n<methodCall>\n<methodName>virt.start</methodName>\n<params>\n<param>\n<value><string>daa9ccc17372fcc1e96c05ec1601bafe</string></value>n</param>\n</params>\n</methodCall>\n",
>         'version': 2, 'id': 64}
>         D: handle_action actionid = 64, version = 2
>         D: do_call virt.start ('daa9ccc17372fcc1e96c05ec1601bafe',)
>         D: Sending back response ((6,), 'Fatal error in Python code
>         occured', {})
>

Hello,

Do lots more -vs:
rhn_check -vvvvvvvvvvvv

to see if you can get an error to be printed on the console other than 
just 'Fatal error'

Or if you feel up to it, use a python debugger.  (Note, I am not a 
python programmer nor have I ever debugged one before, so there is very 
likely a better way to do this.)  I had to find it first:

# rpm -ql python | grep pdb
...
/usr/lib64/python2.4/pdb.py
...
# python /usr/lib64/python2.4/pdb.py /usr/sbin/rhn_check -vvvvvvvvvvvv
 > /usr/sbin/rhn_check(13)?()
-> import os
(Pdb)

Then:
Type 'n' (for next) 15-20 times until you see '-> cli.run()'
Then type 's' (for step [into])
Again type 'n' around 4 times until '-> sys.exit(self.main() or 0)'
Now 's' again
Then 'n' until '-> CheckCli.__run_local_actions()'  (or maybe it's: '-> 
self.__run_remote_actions()' ?) etc, etc.  's'tep into interesting 
functions and jump 'n'ext over uninteresting ones.

(The basic idea is to start pdb, and 'n' until you accidentally go over 
the function you want to trace - then restart pdb and 's' into it, then 
'n' again until you go over the function you are interested in... etc)

If you accidentally 's'tep into an uninteresting function, try 'r'eturn.

Eventually you'll start seeing some output from rhn_check:
 > /usr/sbin/rhn_check(65)main()
-> CheckCli.__run_local_actions()
(Pdb) n  (<--- should have done a 's' here to step into it)
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
Loaded plugins: rhnplugin
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: opening  db index       /var/lib/rpm/Providename rdonly mode=0x0
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))
D: login(forceUpdate=False) invoked
D: readCachedLogin invoked
D: Checking pickled loginInfo, currentTime= 1255520601.18 , createTime= 
1255518047.28 , expire-offset= 3600.0
D: readCachedLogin(): using pickled loginInfo set to expire at 
1255521647.28
D: local action status:  (0, 'rpm database not modified since last 
update (or package list recently updated)', {})
 > /usr/sbin/rhn_check(67)main()
-> sys.exit(0)

You might have to run the debugger a few times to track down the 
functions you need to step into.

Here's a site that explains a little more:
http://pythonconquerstheuniverse.wordpress.com/category/the-python-debugger/

Hope to help,

Joshua Roys




More information about the Spacewalk-list mailing list