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

minioclient cp doesn't return with error in a special case #5047

Closed
mosonyi opened this issue Sep 27, 2024 · 1 comment
Closed

minioclient cp doesn't return with error in a special case #5047

mosonyi opened this issue Sep 27, 2024 · 1 comment

Comments

@mosonyi
Copy link

mosonyi commented Sep 27, 2024

Expected Behavior

Expect an stderr

Current Behavior

Return is 0

Steps to Reproduce (for bugs)

  1. Create a bucket (ex: backups)
  2. Inside a bucket upload an empty file (for ex: database)
    image
  3. call the copy command: minioclient --debug cp 20240927-globals.sql $MINIO_ALIAS/backups/database/20240927-globals.sql
  4. The file is not uploaded, but no error
# echo $?
0
  1. debug log:
Host: **********:9000
User-Agent: MinIO (linux; amd64) minio-go/v7.0.76 minioclient/RELEASE.2024-09-16T17-43-14Z
Content-Length: 14817
Accept-Encoding: zstd,gzip
Authorization: AWS4-HMAC-SHA256 Credential=backup/20240927/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=**REDACTED**
Content-Type: application/x-sql
X-Amz-Content-Sha256: STREAMING-AWS4-HMAC-SHA256-PAYLOAD
X-Amz-Date: 20240927T084944Z
X-Amz-Decoded-Content-Length: 14642

minioclient: <DEBUG> HTTP/1.1 200 OK
Content-Length: 0
Accept-Ranges: bytes
Content-Type: text/plain; charset=utf-8
Date: Fri, 27 Sep 2024 08:49:44 GMT
Etag: "62431fa2eaca3c544dc645bbbbc54fbb"
Server: MinIO
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Id-2: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8
X-Amz-Request-Id: 17F90DB0A17010AD
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
  1. If I delete the empty 'database' file, it starts to work again.

Your Environment

  • Version: minio-go/v7.0.76, minioclient version RELEASE.2024-09-16T17-43-14Z
  • Server setup and configuration: Everything runs in Kubernetes
  • Operating System and version (uname -a): Linux backup-cronjob-manual-7gm-zq8qr 5.15.0-122-generic Move from fmt.Errorf to errors.New #132-Ubuntu SMP Thu Aug 29 13:45:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
@harshavardhana harshavardhana transferred this issue from minio/minio Sep 27, 2024
@harshavardhana
Copy link
Member

you have an object named database if you upload an object as a conflicting object there actually no real error returned on purpose since that is undefined.

https://min.io/docs/minio/linux/operations/concepts/thresholds.html#conflicting-objects read about them here.

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

No branches or pull requests

2 participants