Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem width deploys after update to 2.2.0 #7

Open
ghost opened this issue Nov 10, 2010 · 18 comments
Open

Problem width deploys after update to 2.2.0 #7

ghost opened this issue Nov 10, 2010 · 18 comments

Comments

@ghost
Copy link

ghost commented Nov 10, 2010

After updating to 2.2.0 deploys no longer update app to latest code in repository. I have reverted to 2.1.0 for now as the only way to resolve is to manually clear the scm directory on the server that you are deploying to.

Any ideas?

Kind regards,

Jamie

@ktheory
Copy link
Collaborator

ktheory commented Nov 10, 2010

Hi Jamie,

Sorry you're having trouble. Can you post some more info, like the output of running;

rake -t vlad:update

Feel free to scrub private info or message me directly.

@ghost
Copy link
Author

ghost commented Nov 10, 2010

Running rake -t vlad:update gives the following (sensitive data removed):

ssh username@123.45.67.89 'if cd /home/thedomain.com/scm/repo && git rev-parse master && git remote -v | grep -q git@git.domain.com:projects/myproject.git && cd -; then exit 0; else exit 1; fi &>/dev/null'

@ghost
Copy link
Author

ghost commented Nov 10, 2010

A bit more info:

** Invoke vlad:update (first_time)
** Execute vlad:update
ssh username@123.45.67.89 'if cd /home/domain.com/scm/repo && git rev-parse master && git remote -v | grep -q git@git.iqdev.co.uk:projects/domain.com.git && cd -; then exit 0; else exit 1; fi &>/dev/null'
ssh username@123.45.67.89 'cd /home/domain.com/scm && cd /home/domain.com/scm/repo && git checkout -q origin && git fetch && git reset --hard master && git submodule init && git submodule update && git branch -f deployed-master master && git checkout deployed-master && cd - && mkdir -p /home/domain.com/releases/20101110205403 && cd repo && git archive --format=tar deployed-master | (cd /home/domain.com/releases/20101110205403 && tar xf -) && git submodule foreach 'git archive --format=tar $sha1 | (cd /home/domain.com/releases/20101110205403/$path && tar xf -)' && cd - && cd .. && chmod -R g+w /home/domain.com/releases/20101110205403 && rm -rf /home/domain.com/releases/20101110205403/public/system /home/domain.com/releases/20101110205403/log /home/domain.com/releases/20101110205403/tmp/pids && mkdir -p /home/domain.com/releases/20101110205403/tmp /home/domain.com/releases/20101110205403/db'
HEAD is now at 78e3d54 Added date to iOS feed
Switched to branch 'deployed-master'
/home/domain.com/scm
/home/domain.com/scm
** Invoke vlad:update_symlinks (first_time)
** Execute vlad:update_symlinks
ssh username@123.45.67.89 'ln -s /home/domain.com/shared/system /home/domain.com/releases/20101110205403/public/system && ln -s /home/domain.com/shared/log /home/domain.com/releases/20101110205403/log && ln -s /home/domain.com/shared/pids /home/domain.com/releases/20101110205403/tmp/pids'
ssh username@123.45.67.89 'if ! [ -d /home/domain.com/shared/assets ] ; then mkdir -p /home/domain.com/shared/assets ; fi && if ! [ -d /home/domain.com/shared/public/assets ] ; then mkdir -p /home/domain.com/shared/public/assets ; fi && if ! [ -d /home/domain.com/shared/members/assets ] ; then mkdir -p /home/domain.com/shared/members/assets ; fi && rm -rf /home/domain.com/releases/20101110205403/assets && rm -rf /home/domain.com/releases/20101110205403/public/assets && rm -rf /home/domain.com/releases/20101110205403/members/assets && ln -s /home/domain.com/shared/assets /home/domain.com/releases/20101110205403/assets && ln -s /home/domain.com/shared/public/assets /home/domain.com/releases/20101110205403/public/assets && ln -s /home/domain.com/shared/members/assets /home/domain.com/releases/20101110205403/members/assets'
ssh username@123.45.67.89 'rm -f /home/domain.com/current && ln -s /home/domain.com/releases/20101110205403 /home/domain.com/current'
ssh username@123.45.67.89 'echo 201011102054.13 $USER master 20101110205403 >> /home/domain.com//revisions.log'

@ghost
Copy link
Author

ghost commented Nov 11, 2010

I actually have this happening with 2.1.0 now which is very odd as I've been using it for over a year with no problems. The only way to get a new release up there now it to delete revisions.log, scm/* and releases/* before doing a deploy?? Any pointers would be greatly appreciated.

@ktheory
Copy link
Collaborator

ktheory commented Nov 11, 2010

Hi there,

vlad-git version 2.1.0 had a bug where code would be exported before it was updated. Old code would be deployed the first time, but deploying a second time would export the correct code. See https://github.com/jbarnette/vlad-git/issues/closed#issue/3

This is fixed in vlad-git 2.2.0.

Try uninstalling all versions of vlad and vlad-git, and then re-installing just the latest versions:
gem uninstall vlad
gem uninstall vlad-git

gem install vlad
gem install vlad-git

For good measure, delete the /path/to/deploy/scm directory on your remote hosts.

Re-deploy once (which will do a full clone). Then make a trivial code change and deploy again. This second deployment should correctly update your code with a fast checkout.

Cheers,
Aaron

@ghost
Copy link
Author

ghost commented Nov 28, 2010

Hi Aaron,

Sorry for the slow response, I've had a few rush projects on.

I have just tried this and it doesn't deploy the new version. Reverting to vlad-git 2.1.0 however works fine and deploys the changes, here is what I did:

On vlad-git 2.2.0

rake vlad:deploy

No sign of changes on server so add some text to a file.

git commit -am "Added some text to a file"
rake vlad:deploy

Changes not still deployed.

gem uninstall vlad-git
gem install vlad-git -v2.1.0
rake vlad:deploy

All deployed fine.

Any ideas?

Many thanks,

Jamie

@ktheory
Copy link
Collaborator

ktheory commented Nov 29, 2010

Hey Jamie, thanks for the info. I'll try to figure out what's going on.

-Aaron

@ktheory
Copy link
Collaborator

ktheory commented Dec 4, 2010

Hey Jamie,

I'm still not able to re-create the bug. I only have easy access to rather new version of git (>1.7). Which version of git are you using?

-Aaron

@ghost
Copy link
Author

ghost commented Dec 4, 2010

Hi Aaron,

It's git version 1.7.3.2.

Jamie

@rbq
Copy link

rbq commented Apr 15, 2011

Same here. After some heavy rewriting/rebasing I did a git push -f www production:master, triggered the deploy and wondered why those changes didn't make it into the running app. Nothing helped but removing ./scm/repo on the host. I have a couple of apps deployed via Vlad and never experienced this before.

Local: Git 1.7.4.3, vlad 2.2.0, vlad-git 2.2.0, Ruby 1.9.2-p180
Remote (Debian 5): Git 1.5.6.5, vlad 2.2.0, vlad-git 2.2.0, Ruby 1.8.7-p72

@rbq
Copy link

rbq commented Apr 15, 2011

Switching back and forth to find a working combination that checks out the latest revision ...

$ rvm use 1.8.7

vlad 2.2.0, vlad-git 2.0.0: OK
vlad 2.2.0, vlad-git 2.1.0: OK
vlad 2.2.0, vlad-git 2.2.0: nope

$ rvm use 1.9.2

vlad 2.2.0, vlad-git 2.0.0: nope
vlad 2.2.0, vlad-git 2.1.0: nope

$ rvm use 1.8.7

vlad 2.2.0, vlad-git 2.2.0: nope
vlad 2.2.0, vlad-git 2.1.0: nope O_o
vlad 2.2.0, vlad-git 2.0.0: nope =(

$ gem uninstall vlad-git

vlad 2.2.0, vlad-git 2.0.0: OK (hm, even though I'm using Bundler, other versions somehow interfere)

$ rvm use 1.9.2
$ gem uninstall vlad-git

vlad 2.2.0, vlad-git 2.0.0: OK (so both Ruby versions work)

I guess I'll stick to the last configuration for now.

@ghost
Copy link
Author

ghost commented Sep 25, 2011

This still isn't working for me, any ideas?

@rbq
Copy link

rbq commented Sep 26, 2011

None of us who ran into this problem were able to give a description of how to reliably reproduce this bug, so I guess there is no chance to have it solved in the near future.

Anyway, because of the incompatibility to current Rake versions I finally decided to switch to Capistrano and this was one of the best decisions I ever made. It just works.

@ghost
Copy link
Author

ghost commented Sep 26, 2011

Capistrano always seemed a bit bloated to me but if it's the only option I might give it a try. I've tried to track down the bug myself without much luck.

@ghost
Copy link
Author

ghost commented Sep 26, 2011

For the record, if I empty the scm directory between deploy all works. Does this shed any light on things?

@rbq
Copy link

rbq commented Sep 26, 2011

I mentioned that in this ticket as a workaround but it didn't help to identify the source of the problem.

@robertbeal
Copy link

I suffer from this issue too.

I'm using
ruby 2.0.0
vlad 2.5.0

I have git version 1.8.1 installed, and am working on Ubuntu 13.04

When I use vlad-git 2.2.0 and do a rake vlad:update, it doesn't pull through the latest changes.

I just switched to vlad-git 2.1.0 and now the changes come through when I rake vlad:update.

@Kyrremann
Copy link

Just want to bump/confirm that this is still a problem.
Using:

  • Ruby 1.9.3p551
  • vlad 2.6.5
  • vlad-git 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants