(bump) still really keen if someone has any info on this one (see below)

2009/2/10 Greg Hauptmann <[email protected]>

> Still stuck on this.  I made sure I wasn't in the "current" directory when
> I did the call to "reaper" and I still get the same result, i.e. whilst the
> process restarts it does not restart with the latest application updates
> (made available via the new application being put in a new "releases"
> directory, and then capistrano change the sym link for "current" to this new
> directory).
>
> Question - Is a "reaper" restart action supposed to update an application?
>   That is, is the out-of-the box Capistrano command
> "/u/apps/equity/current/script/process/reaper" really supposed to update any
> changes to an application (via a "cap deploy")?
>
>
> *** BEFORE CALLING REAPER ****
> [r...@home equity]# ps ax | grep -i ruby
> 12857 ?        S      0:02 ruby
> /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails start -d
> -a 0.0.0.0 -p 3001 -P 
> /u/apps/equity/releases/20090209112325/tmp/pids/dispatch.3001.pid
> -e production -c /u/apps/equity/releases/20090209112325 -l
> /u/apps/equity/releases/20090209112325/log/mongrel.log
> 13036 pts/1    R+     0:00 grep -i ruby
> [r...@home equity]# cat current/tmp/pids/dispatch.3001.pid
> 12857[r...@home equity]# ls -l
> total 2
> lrwxrwxrwx   1 root root   38 Feb 10 21:10 current ->
> /u/apps/equity/releases/20090210111005
> drwxrwxr-x  24 root root 1024 Feb 10 21:10 releases
> drwxrwxr-x   6 root root 1024 Feb  8 20:46 shared
>
> *** CALL REAPER ***
> [r...@home equity]# /u/apps/equity/current/script/process/reaper
> Restarting 12857
>
>
> *** AFTER CALLING REAPER ***
> [r...@home equity]# ps ax | grep -i ruby
> 13043 ?        S      0:02 ruby
> /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails start -d
> -a 0.0.0.0 -p 3001 -P 
> /u/apps/equity/releases/20090209112325/tmp/pids/dispatch.3001.pid
> -e production -c /u/apps/equity/releases/20090209112325 -l
> /u/apps/equity/releases/20090209112325/log/mongrel.log
> 13048 pts/1    R+     0:00 grep -i ruby
> [r...@home equity]# ls -l
> total 2
> lrwxrwxrwx   1 root root   38 Feb 10 21:10 current ->
> /u/apps/equity/releases/20090210111005
> drwxrwxr-x  24 root root 1024 Feb 10 21:10 releases
> drwxrwxr-x   6 root root 1024 Feb  8 20:46 shared
> [r...@home equity]# cat current/tmp/pids/dispatch.3001.pid
> 13043[r...@home equity]#
> [r...@home equity]#
>
>
> Regards
> Greg
>
>
> 2009/2/9 Greg Hauptmann <[email protected]>
>
> I think I see what you're getting at - this is actually the result of
>> running the out of the box capistrano script - here's the cap deploy output
>> for example (I just wanted to make it simpler re my post)
>> Macintosh-2:equity greg$ cap deploy -n
>>   * executing `deploy'
>>   * executing `deploy:update'
>>  ** transaction: start
>>   * executing `deploy:update_code'
>>     updating the cached checkout on all servers
>>     executing locally: "git ls-remote /Users/greg/source/equity/.git HEAD"
>>   * executing "if [ -d /u/apps/equity/shared/cached-copy ]; then cd
>> /u/apps/equity/shared/cached-copy && git fetch -q origin && git reset -q
>> --hard 43f8b3df4d8f1f6358b803fbb41f38fcb1a9ddc4; else git clone -q
>> [email protected]:/Users/greg/source/equity/.git
>> /u/apps/equity/shared/cached-copy && cd /u/apps/equity/shared/cached-copy &&
>> git checkout -q -b deploy 43f8b3df4d8f1f6358b803fbb41f38fcb1a9ddc4; fi"
>>     copying the cached version to /u/apps/equity/releases/20090209085535
>>   * executing "cp -RPp /u/apps/equity/shared/cached-copy
>> /u/apps/equity/releases/20090209085535 && (echo
>> 43f8b3df4d8f1f6358b803fbb41f38fcb1a9ddc4 >
>> /u/apps/equity/releases/20090209085535/REVISION)"
>>   * executing `deploy:finalize_update'
>>   * executing "chmod -R g+w /u/apps/equity/releases/20090209085535"
>>   * executing "rm -rf /u/apps/equity/releases/20090209085535/log
>> /u/apps/equity/releases/20090209085535/public/system
>> /u/apps/equity/releases/20090209085535/tmp/pids &&\\\n      mkdir -p
>> /u/apps/equity/releases/20090209085535/public &&\\\n      mkdir -p
>> /u/apps/equity/releases/20090209085535/tmp &&\\\n      ln -s
>> /u/apps/equity/shared/log /u/apps/equity/releases/20090209085535/log &&\\\n
>>      ln -s /u/apps/equity/shared/system
>> /u/apps/equity/releases/20090209085535/public/system &&\\\n      ln -s
>> /u/apps/equity/shared/pids /u/apps/equity/releases/20090209085535/tmp/pids"
>>   * executing "find /u/apps/equity/releases/20090209085535/public/images
>> /u/apps/equity/releases/20090209085535/public/stylesheets
>> /u/apps/equity/releases/20090209085535/public/javascripts -exec touch -t
>> 200902090855.35 {} ';'; true"
>>   * executing `deploy:symlink'
>>   * executing "rm -f /u/apps/equity/current && ln -s
>> /u/apps/equity/releases/20090209085535 /u/apps/equity/current"
>>  ** transaction: commit
>>   * executing `deploy:restart'
>>   * executing "/u/apps/equity/current/script/process/reaper"
>> Macintosh-2:equity greg$
>>
>>
>>
>> 2009/2/9 MaD <[email protected]>
>>
>>
>>> i really don't know about reaper (as i'm not using it), but i guess
>>> your problem is with the symlink "current". you are calling reaper
>>> from that directory (in  your example: /u/apps/equity/releases/
>>> 20090209050120) and it does never leave it. as it seems you need to
>>> add some code/script to leave the current directory and reenter
>>> "current" after the symlink is updated.
>>>
>>> from the top of my head i' think about solving this with a simple
>>> rake- or capistrano-task.
>>> >>>
>>>
>>
>>
>> --
>> Greg
>> http://blog.gregnet.org/
>>
>>
>>
>
>
> --
> Greg
> http://blog.gregnet.org/
>
>
>


-- 
Greg
http://blog.gregnet.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to