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

Non zero RC for S3 sync even if file is excluded #1117

Open
jamesls opened this issue Jan 29, 2015 · 7 comments
Open

Non zero RC for S3 sync even if file is excluded #1117

jamesls opened this issue Jan 29, 2015 · 7 comments
Labels
automation-exempt Issue will not be subject to stale-bot bug This issue is a bug. p2 This is a standard priority issue s3filters s3sync s3

Comments

@jamesls
Copy link
Member

jamesls commented Jan 29, 2015

A file that would is --exclude'd should not trigger a non zero RC if we can't read the file. For example:

/tmp $ mkdir demo
/tmp $ mkfifo demo/bad
/tmp $ touch demo/good
/tmp $ aws s3 sync demo/ s3://bucket/demo/ --exclude '*' --dryrun
warning: Skipping file /private/tmp/demo/bad. File is character special device, block special device, FIFO, or socket.
Completed 0 part(s) with ... file(s) remaining
/tmp $ echo $?
2

Given that /tmp/demo/bad was never going to be transferred in the first place (because it's been excluded via --exclude '*', it seems odd that this will trigger a non zero RC. I'd expect the RC to be 0 here.

@ChrisSLT
Copy link

This was reported half a year ago - can you tell us what the delay is in fixing this?

@ianderse
Copy link

Any news on this issue? Thanks!

@deweysasser
Copy link

Perhaps it is time for someone to write a better tool.

@gsmcwhirter
Copy link

I'm also interested in a fix to this issue. Any progress?

@kachkaev
Copy link

Also facing this when trying to backup a docker volume. It contains a couple of sockets and this produces warning: Skipping file /path/to/abcd.socket. File is character special device, block special device, FIFO, or socket. Trying all sorts of values for --exclude did not help, even if I --exclude "*".

Because s3 sync always returns a non-zero exit code, there is no way to use the command in the automation tools like ansible unless executing something insane like aws s3 sync [...args] || true.

@mcblair
Copy link

mcblair commented Jul 1, 2017

I am experiencing this as well - warnings for explicitly excluded files.

This is problematic because s3 sync is exiting with a non-zero exit code.

When automating s3 sync like this: Simple S3 Resource for Concourse CI

We exclude everything and only include the directories we want to sync. The result is that the expected files are uploaded but because of the non-zero exit code - the Concourse CI job using the above resource fails.

@TBeijen
Copy link

TBeijen commented Jul 31, 2017

s3 cp seems to suffer from the same issue:

aws s3 cp --recursive --exclude '*' --include 'binlog.*' /var/lib/mysql/ s3://demo/bucket/
warning: Skipping file /var/lib/mysql/mysql.sock. File is character special device, block special device, FIFO, or socket.
upload: ../var/lib/mysql/binlog.000010 to s3://demo/bucket/binlog.000010

So, does this need additional labels?

As a workaround, in some cases you can probably get away with first copying stuff (without the problem 'files') to /tmp and then running your sync from there.

@kdaily kdaily added the automation-exempt Issue will not be subject to stale-bot label Jul 29, 2020
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
* chore(version): set 0.14.3.dev1 version (aws#1112) (aws#1113)

* Depend on development version of lambda-builders for dev builds (aws#1111)

* Depend on development version of lambda-builders for dev builds

* Adding prod.txt to manifest

* Splitting dev and tool dependencies

* fix(build): Resolve path after .aws-sam is created (aws#1110)

* fix(build): Resolve path after .aws-sam is created

* fix: build (make pr)

* Design and implementation for producing debug build artifacts (aws#1095)

* design: Initial Design for producing debug artifacts

* initial implementation

* Adding unit tests

* Integration test with debug build mode

* Adjust Design doc and add keyword arg to a call

* fix(dotnet): init template fixes (aws#1117)

* chore(version): set 0.15.0 (aws#1125)

* Revert "Depend on development version of lambda-builders for dev builds (aws#1111)" (aws#1128)

This reverts commit 7e9de790e23791ba176faff2030286db4007e503.

* Bumping to Lambda Builders 0.3.0 (aws#1129)

Bumping to Lambda Builders 0.3.0

* fix(func-tests): add dependency manager param (aws#1130)
bugfood added a commit to bugfood/aws-cli that referenced this issue Apr 13, 2022
This catches bug aws#1117 (which is now fixed).
bugfood added a commit to bugfood/aws-cli that referenced this issue Apr 14, 2022
This catches bug aws#1117 (which is now fixed).
bugfood added a commit to bugfood/aws-cli that referenced this issue Apr 14, 2022
This catches bug aws#1117 (which is now fixed).
bugfood added a commit to bugfood/aws-cli that referenced this issue May 12, 2022
This catches bug aws#1117 (which is now fixed).
bugfood added a commit to bugfood/aws-cli that referenced this issue May 12, 2022
This catches bug aws#1117 (which is now fixed).
@tim-finnigan tim-finnigan added the p2 This is a standard priority issue label Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation-exempt Issue will not be subject to stale-bot bug This issue is a bug. p2 This is a standard priority issue s3filters s3sync s3
Projects
None yet
Development

No branches or pull requests