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

S3 sync will exit when a broken symlink are present #487

Closed
ddarbyson opened this issue Nov 15, 2013 · 4 comments
Closed

S3 sync will exit when a broken symlink are present #487

ddarbyson opened this issue Nov 15, 2013 · 4 comments
Assignees
Labels
bug This issue is a bug.

Comments

@ddarbyson
Copy link

When transferring files to S3, broken symlinks will cause the sync to exit abruptly. There should be a better way to handle symbolic links...

@alexanderAtGEn
Copy link

@ddarbyson This looks like a dupe of #425.

@ddarbyson
Copy link
Author

Furthermore, I can confirm that on error

2013-11-20 19:40:12,754 - awscli.customizations.s3.s3handler - ERROR - Exception caught during task
xecution: [Errno 2] No such file or directory: '/my/path/to/broken/symlink'

produces an exit status of 0, where it should be 1.

This causes a false positive and questions the integrity of my backup scripts when s3 sync exits abruptly.

Looking forward to seeing a patch for this issue.

@jamesls
Copy link
Member

jamesls commented Nov 21, 2013

Thanks for the bug report, taking a look.

@ghost ghost assigned jamesls Nov 21, 2013
jamesls added a commit to jamesls/aws-cli that referenced this issue Nov 25, 2013
You will now see an error message shown as well as a non zero
RC:

  $ aws s3 sync anotherdir/ s3://jamesls-test-sync/
  [Errno 2] No such file or directory: '/private/tmp/symlnk/anotherdir/z-badsylmink'

  $ echo $?
  1

There is potential to add something like a ``--skip-bad-symlinks``
option, but the default behavior is to let the user know that we've hit
a bad symlink.  Fies aws#425 and aws#487.
jamesls added a commit to jamesls/aws-cli that referenced this issue Nov 26, 2013
You will now see an error message shown as well as a non zero
RC:

  $ aws s3 sync anotherdir/ s3://jamesls-test-sync/
  [Errno 2] No such file or directory: '/private/tmp/symlnk/anotherdir/z-badsylmink'

  $ echo $?
  1

There is potential to add something like a ``--skip-bad-symlinks``
option, but the default behavior is to let the user know that we've hit
a bad symlink.  Fies aws#425 and aws#487.
@ddarbyson
Copy link
Author

Thanks for fixing.

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

No branches or pull requests

3 participants