Subject: symlink-problem with before_restart-hook
Hey guys,
I got this deploy hook:
run "ln -nfs #{shared_path}/config/staging.sphinx.conf #{current_path}/config/staging.sphinx.conf"
in my local file
APP_ROOT/config/before_restart.rb
Furthermore, I have the file staging.sphinx.conf on my EY-instance residing under /data/my_app/shared/config.
What I would have expected after a new deployment:
- A symlink named staging.sphinx.conf pointing from current/config to shared/config
What instead happens:
- There is no symlink in current/config - instead there is a file staging.sphinx.conf in current/config
I have no idea, where this file is coming from - staging.sphinx.conf isn't in my SCM.
Looking at the timestamps I can see, that staging.sphinx.conf always seem to be written a little bit after the rest of the files in current/config.
So to me it seems like EY is generating it after a deployment, thus overwriting my previously created symlink?
Is this a bug or a feature or am I missing something totally obvious?
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Alexander Gieche on 28 Dec, 2009 08:30 PM
Ok,
when i transfer the line
run "ln -nfs #{shared_path}/config/staging.sphinx.conf #{current_path}/config/staging.sphinx.conf"
from my /deploy/before_restart.rb to /deploy/after_restart.rb everything works as expected - the symlink is generated correctly.
However, this still leaves this two questions:
1.) Why didn't it work in the first place? I don't see anything wrong with putting the symlink-hooks into before_restart.rb?
2.) Even more important: How could staging.spinx.conf wind up in my config-directory?
Support Staff 3 Posted by Tyler Bird on 28 Dec, 2009 10:31 PM
Test reply,
Maybe now Alexander's reply to this post will show up?
Thanks,
Tyler