cap 2.x, rails app, log dirs

25 views
Skip to first unread message

Jonathan Rochkind

unread,
Mar 20, 2014, 9:56:35 AM3/20/14
to capis...@googlegroups.com
I know cap 2.x isn't really supported by maintainers anymore, but I'm
thinking there might be people on the list with an answer anyway (if
not, I'll resort to stackoverflow!).

I deploy a Rails app with capistrano 2.15.5.

In the past, I believe that the capistrano deployed rails apps such that
individual app logs/ directories were symlinks to ./shared/logs. I do
have a ./shared/logs providing further evidence I'm not just imagining this!

However, at the moment, none of the logs directories are symlinks, each
release really does have it's own logs/ directory.

I noticed this when I wound up using up all my disk space, as my log
cleaning cronjob cleaned logs in shared/logs where I expected em to be,
but didn't clean any of the actual log files in the releases.

Anyone have any ideas for what might have caused this change, and how to
put it back? Or tips for how I'd go about debugging it?

Lee Hambley

unread,
Mar 20, 2014, 10:11:04 AM3/20/14
to capistrano
Anyone have any ideas for what might have caused this change, and how to put it back? Or tips for how I'd go about debugging it?

Your shared_children list does not include `./log`


--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/532AF393.7050000%40jhu.edu.
For more options, visit https://groups.google.com/d/optout.

Jonathan Rochkind

unread,
Mar 20, 2014, 10:21:00 AM3/20/14
to capis...@googlegroups.com
Thanks! Can you give me a hint as to what this means or where I look for
it?

"shared_children list" is not a term I've heard before, I'm not sure how
to make sure "./log" gets added to it.

The weird thing is as far as I know, log used to get symlinked on
deploy, and I don't think I've changed any configuration, I'm not sure
why behavior changed.

On 3/20/14 10:11 AM, Lee Hambley wrote:
> Anyone have any ideas for what might have caused this change, and
> how to put it back? Or tips for how I'd go about debugging it?
>
>
> Your shared_children list does not include `./log`
>
> Lee Hambley
> --
> http://lee.hambley.name/
> +49 (0) 170 298 5667
>
>
> On 20 March 2014 14:56, Jonathan Rochkind <roch...@jhu.edu
> <mailto:roch...@jhu.edu>> wrote:
>
> I know cap 2.x isn't really supported by maintainers anymore, but
> I'm thinking there might be people on the list with an answer anyway
> (if not, I'll resort to stackoverflow!).
>
> I deploy a Rails app with capistrano 2.15.5.
>
> In the past, I believe that the capistrano deployed rails apps such
> that individual app logs/ directories were symlinks to
> ./shared/logs. I do have a ./shared/logs providing further evidence
> I'm not just imagining this!
>
> However, at the moment, none of the logs directories are symlinks,
> each release really does have it's own logs/ directory.
>
> I noticed this when I wound up using up all my disk space, as my log
> cleaning cronjob cleaned logs in shared/logs where I expected em to
> be, but didn't clean any of the actual log files in the releases.
>
> Anyone have any ideas for what might have caused this change, and
> how to put it back? Or tips for how I'd go about debugging it?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to capistrano+unsubscribe@__googlegroups.com
> <mailto:capistrano%2Bunsu...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/__msgid/capistrano/532AF393.__7050000%40jhu.edu
> <https://groups.google.com/d/msgid/capistrano/532AF393.7050000%40jhu.edu>.
> For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to capistrano+...@googlegroups.com
> <mailto:capistrano+...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/CAN_%2BVLUQu5OSNbr2gX9zG-T1NnOQMvTfw2yBW5Bi3r%2Bh26DwoA%40mail.gmail.com
> <https://groups.google.com/d/msgid/capistrano/CAN_%2BVLUQu5OSNbr2gX9zG-T1NnOQMvTfw2yBW5Bi3r%2Bh26DwoA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Jonathan Rochkind

unread,
Mar 20, 2014, 10:32:39 AM3/20/14
to capis...@googlegroups.com
Okay, "shared_children" is a cap variable... but I do have "log" in my
"shared_children". With a little debugger use:

fetch(:shared_children)
# => ["public/system", "log", "tmp/pids"]

This is in there by default I guess, I've never done anything to set it.
And yet, the log dir still doesn't seem to be symlinked.

tmp/pids is getting symlinked. as is public/system. And public/assets
for that matter, even though it's not included in shared_children.

Yet for some reason, "log" is not getting symlinked even though it is
included in shared_children. Hmm.

Jonathan Rochkind

unread,
Mar 20, 2014, 10:41:09 AM3/20/14
to capis...@googlegroups.com
Bah, and now log does seem to be a symlink again. I'm not sure what
happened, it is a mystery to me, and not something anyone without access
to my server is likely to have any more of a clue about!

Anyhow, thanks Lee for pointing me in the right direction for debugging,
even though cap 2.x is not supported anymore.

Lee Hambley

unread,
Mar 20, 2014, 10:44:40 AM3/20/14
to capistrano
Reply all
Reply to author
Forward
0 new messages