Debugging Conductor
John Eckersberg
jeckersb at redhat.com
Mon Jul 16 18:57:28 UTC 2012
On Mon, 16 Jul 2012 14:35:51 -0400, Greg Blomquist <gblomqui at redhat.com> wrote:
> I recently was trying to track down an issue that jclift was seeing in
> his environment, and really wanted to see what was going on line by
> line. And really _didn't_ want to add a million print statements only
> to have to figure out which of the seven log files I need to monitor to
> see the output.
>
> Enter ruby-debug. First though, I had to be able to run the processes
> in the foreground and not as services.
>
> Preamble
> 0) yum install rubygem-ruby-debug -y
> 1) add "gem ruby-debug" to the default section of
> /usr/share/aeolus-conductor/Gemfile.in
>
> Run Aeolus Conductor in the foreground:
> 0) Create a ~/bin directory
> 1) cp /etc/init.d/aeolus-conductor ~/bin
> 2) reduce the ~/bin/aeolus-conductor file to loading external vars and
> running thin (in debugger mode, and don't daemonize)...something like:
> http://pastebin.test.redhat.com/97293
> 3) chmod 755 ~/bin/aeolus-conductor
> 4) service aeolus-conductor stop
> 5) aeolus-conductor
>
> Run delayed_job in the foreground:
> 0) cd /usr/share/aeolus-conductor
> 1) RAILS_ENV=production rake jobs:work
>
> Now, if you add the word "debugger" (which adds a breakpoint for rdebug)
> to any ruby file under /usr/share/aeolus-conductor/app, you should hit
> the breakpoint in either conductor or delayed_job. Now you can do all
> the fancy debugging that you like.
>
> Hope that helps someone other than me.
>
> ----
> Greg
FWIW, rubygem-ruby-debug is horribly broken on Fedora 17/Ruby 1.9.
There's some 1.9-aware packages in review:
http://lists.fedoraproject.org/pipermail/ruby-sig/2012-May/000999.html
However last time I tried those, they were also horribly broken. YMMV.
This works great on F16/EL6 though :)
More information about the aeolus-devel
mailing list