Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mc cp with --checksum MD5 doesn't seem to store checksum #5136

@MrCreosote

Description

@MrCreosote

This bug report resulted from a conversation with @marktheunissen in slack.

Expected behavior

When using the --checksum MD5 argument with mc cp, the MD5 checksum should be stored with the object and accessible in a mc stat CLI or HeadObject API call.

Actual behavior

The MD5 checksum is not available. The CRC32, CRC32C, and SHA256 checksums are available if specified (but see "Other notes" below)

Steps to reproduce the behavior

~$ ~/minio/mc/RELEASE/2025-02-08T19-14-21Z/mc cp --checksum MD5 tinyfile.crap local9000/test/tinyfile.md5.crap

~$ ~/minio/mc/RELEASE/2025-02-08T19-14-21Z/mc stat local9000/test/tinyfile.md5.crap
Name      : tinyfile.md5.crap
Date      : 2025-02-12 13:07:32 PST 
Size      : 8 B    
ETag      : 1b9554867d35f0d59e4705f6b2712cd1 
Type      : file 
Metadata  :
  Content-Type: application/octet-stream 

mc --version

~$ ~/minio/mc/RELEASE/2025-02-08T19-14-21Z/mc -v
mc version RELEASE.2025-02-08T19-14-21Z (commit-id=bd925c01a1ccab367993f20c251b7bae9d22f8a5)
Runtime: go1.23.6 linux/amd64
Copyright (c) 2015-2025 MinIO, Inc.
License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
~$ ~/minio/mc/RELEASE/2025-02-08T19-14-21Z/mc admin info local9000
●  localhost:9000
   Uptime: 1 hour 
   Version: 2025-02-07T23:21:09Z
*snip*

System information

Just my laptop

Other notes

It seems that if multiple --checksum arguments are supplied on the command line, they're all ignored except for the last one. I would expect either they're all honored or an error is thrown. If you'd like me to make another issue for this LMK

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions