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

Change ls options to '-xr' to stop nondeterministic deploy:rollback behavior. #6

Closed
wants to merge 2 commits into from

Conversation

randomcamel
Copy link

Lee:

We use rsync to deploy code, and it leaves the timestamps all screwy for reasons I can't quite figure, so 'ls -xt' doesn't produce correct results, while 'ls -xr' does.

I understand if this patch won't product correct behavior for people who name their releases differently. If that's the case, please reject it, but would it make sense to provide some user-visible setting to alter the ls options? That seems like a more correct choice, but it's more than a 1-character change. =)

Chris


Change ls options from -xt to -xr, which fixes nondeterministic rollback behavior when our releases are named 20110404210241 (YYYYMMDDHHMMSS) but our modification times are unreliable (apparently because of rsync). Best thing would be to have the ls options be user-settable.

…ack behavior when our releases are named 20110404210241 (YYYYMMDDHHMMSS) but our modification times are unreliable (apparently because of rsync). Best thing would be to have the ls options be user-settable.
@leehambley
Copy link
Contributor

Chris,

Thanks - I might make it an option for Rspec users, something like this is
worth having… maybe we look upstream and see if there's a flag for RSync
which would do the same?

  • Lee

On 4 April 2011 23:19, randomcamel <
reply@reply.github.com>wrote:

Lee:

We use rsync to deploy code, and it leaves the timestamps all screwy for
reasons I can't quite figure, so 'ls -xt' doesn't produce correct results,
while 'ls -xr' does.

I understand if this patch won't product correct behavior for people who
name their releases differently. If that's the case, please reject it, but
would it make sense to provide some user-visible setting to alter the ls
options? That seems like a more correct choice, but it's more than a
1-character change. =)

Chris


Change ls options from -xt to -xr, which fixes nondeterministic rollback
behavior when our releases are named 20110404210241 (YYYYMMDDHHMMSS) but our
modification times are unreliable (apparently because of rsync). Best thing
would be to have the ls options be user-settable.

Reply to this email directly or view it on GitHub:
#6

@randomcamel
Copy link
Author

Lee:

I'll be frank, I have no idea how this might be useful to anyone else outside railsless-deploy. :-) It became sort of an urgent thing for me, because without it, deploy:rollback deletes a semi-random release and symlinks back to some other semi-random release. That may or may not be my co-worker's fault with the rsync deploy task we use. It's possible something more general is appropriate, like passing a full Unix command to produce a correctly--ordered list of releases.

Chris

@koenvw
Copy link

koenvw commented Oct 19, 2012

Hi, I came across this also and the nondeterministic behavior has been fixed in capistano by sorting the releases in ruby and not via ls.

See capistrano/capistrano@8638f22#lib/capistrano/recipes/deploy.rb

@plentz
Copy link

plentz commented Mar 11, 2013

+1

@leehambley
Copy link
Contributor

8df668b

@leehambley leehambley closed this Aug 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants