-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 09 Jan 2009 16:22:13 -0500 Jason Dobies <[email protected]> wrote:
> I'm looking for some help on: > https://bugzilla.redhat.com/show_bug.cgi?id=444519 > > I am looking at the backend python code for handling an action > (server/handlers/xmlrpc/queue.py:411): > > elif status == 2 and trigger_snapshot and self.__should_snapshot(): > # if action status is 'Completed', snapshot if allowed and if > needed self.server.take_snapshot("Scheduled action completion: %s" % > row['name']) > > - I'm assuming status is set to 2, based on the fact that the action > shows it was successful. > - I followed trigger_snapshot around and ended up in the DB; the > action type for config file deployment is set to trigger a snapshot > - I believe __should_snapshot should be returning 1. That method just > checks for the provisioning entitlement, which I verified the server > I'm using has. > > I took a quick look at take_snapshot and it looks ok (I didn't look > too closely at the rhnServer.snapshot_server stored proc yet. Part of > me is also assuming that if there was a bug in taking the snapshot > we'd notice a lot more snapshot bugs than we have open (I could be > wrong on that assumption). > > So I can't figure out why a snapshot wouldn't be triggered for a > configuration file deployment. And I don't have enough python > experience yet to have a solid idea of what to do next to debug it. > > Any advice? I'm looking to "learn to fish" so to speak here, so even > if you come across what the bug is please let me know how you got > there. > > Thanks! > - J > Hey Jason, First thing I would try would be to add print statements right above that if/elif block to display what all those boolean clauses are evaluating too. With Python it's kind of handy that you *can* do this by just editing the queue.py that gets installed on a dev machine, should be in /usr/share/rhn. Mind you this probably isn't the best habit to get into but it makes for a handy quick hack when you're debugging and want to see what's going on. So I would add print("status = %s" % status) etc and get a real clear idea what's going on. Once you do that I don't think you even need to restart services. Those prints should show up in /var/log/rhn/rhn_server_xmlrpc.log (I think, if not it should be somewhere around there) There's also debugging you can crank up and get more info here by modifying levels in /etc/rhn/rhn.conf and /etc/rhn/defaults/. Hope that's of some use, gl! Devan - -- Devan Goodwin <[email protected]> Software Engineer - Spacewalk / RHN Satellite Halifax, Canada 650.567.9039x79267 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAklsiK0ACgkQAyHWaPV9my70qgCePMgctWN/ihR5i0Zmy+knunTg jk8AoNkF7XbEnxUnG6TTPjS7GHkhjy24 =wiWb -----END PGP SIGNATURE----- _______________________________________________ Spacewalk-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-devel
