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

Fix SSEC multipart checksum replication #19915

Merged
merged 5 commits into from
Jun 13, 2024

Conversation

klauspost
Copy link
Contributor

Description

  • Multipart SSEC checksums were not transferred.
  • Remove key mismatch logging. This key is user controlled with SSEC.
  • If source is SSEC and destination reports ErrSSEEncryptedObject, assume replication is good.

How to test this PR?

Upload multipart with SSE-C and checksum (used a modified mc)

Verify that the replica has checksum. Again, modified mc:

mc: <DEBUG> HEAD /testbucket/TS40.txt?versionId=636377dc-feb4-4970-804d-46cc907f16e8 HTTP/1.1
Host: 127.0.0.1:9000
User-Agent: MinIO (windows; amd64) minio-go/v7.0.70 mc/DEVELOPMENT.GOGET
Authorization: AWS4-HMAC-SHA256 Credential=minio/20240611/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-checksum-mode;x-amz-content-sha256;x-amz-date;x-amz-server-side-encryption-customer-algorithm;x-amz-server-side-encryption-customer-key;x-amz-server-side-encryption-customer-key-md5, Signature=**REDACTED**
X-Amz-Checksum-Mode: ENABLED
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20240611T171617Z
X-Amz-Server-Side-Encryption-Customer-Algorithm: AES256
X-Amz-Server-Side-Encryption-Customer-Key: 0123456789012345678901234567890123456789010=
X-Amz-Server-Side-Encryption-Customer-Key-Md5: S1cFfu8lZZ98RPbWGV7KwA==

mc: <DEBUG> HTTP/1.1 200 OK
Content-Length: 400000000
Accept-Ranges: bytes
Content-Type: text/plain
Date: Tue, 11 Jun 2024 17:16:17 GMT
Etag: "2f8129e946cc9e960dd5c71e233db75d-24"
Last-Modified: Tue, 11 Jun 2024 17:03:31 GMT
Server: MinIO
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Checksum-Crc32c: nZB0eg==-24
X-Amz-Id-2: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8
X-Amz-Replication-Status: REPLICA
X-Amz-Request-Id: 17D802A7E2839574
X-Amz-Server-Side-Encryption-Customer-Algorithm: AES256
X-Amz-Server-Side-Encryption-Customer-Key-Md5: S1cFfu8lZZ98RPbWGV7KwA==
X-Amz-Version-Id: 636377dc-feb4-4970-804d-46cc907f16e8
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
....

Note replica has X-Amz-Checksum-Crc32c as expected and it is decoded correctly with provided SSEC key.

Types of changes

  • New feature (non-breaking change which adds functionality)

* Multipart SSEC checksums were not transferred.
* Remove key mismatch logging. This key is user controlled with SSEC.
* If source is SSEC and destination reports ErrSSEEncryptedObject, assume replication is good.
@poornas
Copy link
Contributor

poornas commented Jun 12, 2024

your PR made me realize CopyObject SSE-C replication is broken - klauspost#6 is needed in addition to your changes for SSEC replication. would be good to consolidate this change in the same PR

@klauspost
Copy link
Contributor Author

@harshavardhana Did you re-run the "upgrade" as well? If so, it may be triggered by something in the proposal from @poornas

If it fails again, let's revert and debug it separately.

@harshavardhana
Copy link
Member

2024-06-12T14:39:19.1198199Z [26376] Failed to execute script docker-compose
2024-06-12T14:39:19.1198752Z 
2024-06-12T14:39:19.1199178Z ERROR: for upgrade-tests_minio2_1  'ContainerConfig'
2024-06-12T14:39:19.1199683Z 
2024-06-12T14:39:19.1200065Z ERROR: for upgrade-tests_minio3_1  'ContainerConfig'
2024-06-12T14:39:19.1200528Z 
2024-06-12T14:39:19.1200868Z ERROR: for upgrade-tests_minio1_1  'ContainerConfig'
2024-06-12T14:39:19.1201347Z 
2024-06-12T14:39:19.1201710Z ERROR: for upgrade-tests_minio4_1  'ContainerConfig'
2024-06-12T14:39:19.1202185Z 
2024-06-12T14:39:19.1202450Z ERROR: for minio2  'ContainerConfig'
2024-06-12T14:39:19.1202820Z 
2024-06-12T14:39:19.1203060Z ERROR: for minio3  'ContainerConfig'
2024-06-12T14:39:19.1203421Z 
2024-06-12T14:39:19.1203665Z ERROR: for minio1  'ContainerConfig'
2024-06-12T14:39:19.1204012Z 
2024-06-12T14:39:19.1204264Z ERROR: for minio4  'ContainerConfig'
2024-06-12T14:39:19.1204828Z Traceback (most recent call last):
2024-06-12T14:39:19.1205522Z   File "docker-compose", line 3, in <module>
2024-06-12T14:39:19.1206196Z   File "compose/cli/main.py", line 81, in main
2024-06-12T14:39:19.1206950Z   File "compose/cli/main.py", line 203, in perform_command
2024-06-12T14:39:19.1207805Z   File "compose/metrics/decorator.py", line 18, in wrapper
2024-06-12T14:39:19.1208543Z   File "compose/cli/main.py", line 1186, in up
2024-06-12T14:39:19.1209201Z   File "compose/cli/main.py", line 1182, in up
2024-06-12T14:39:19.1209869Z   File "compose/project.py", line 702, in up
2024-06-12T14:39:19.1210616Z   File "compose/parallel.py", line 108, in parallel_execute
2024-06-12T14:39:19.1211413Z   File "compose/parallel.py", line 206, in producer
2024-06-12T14:39:19.1212114Z   File "compose/project.py", line 688, in do
2024-06-12T14:39:19.1212936Z   File "compose/service.py", line 581, in execute_convergence_plan
2024-06-12T14:39:19.1213963Z   File "compose/service.py", line 503, in _execute_convergence_recreate
2024-06-12T14:39:19.1214935Z   File "compose/parallel.py", line 108, in parallel_execute
2024-06-12T14:39:19.1215726Z   File "compose/parallel.py", line 206, in producer
2024-06-12T14:39:19.1216455Z   File "compose/service.py", line 496, in recreate
2024-06-12T14:39:19.1217254Z   File "compose/service.py", line 615, in recreate_container
2024-06-12T14:39:19.1218103Z   File "compose/service.py", line 334, in create_container
2024-06-12T14:39:19.1219047Z   File "compose/service.py", line 922, in _get_container_create_options
2024-06-12T14:39:19.1220512Z   File "compose/service.py", line 962, in _build_container_volume_options
2024-06-12T14:39:19.1221519Z   File "compose/service.py", line 1549, in merge_volume_bindings
2024-06-12T14:39:19.1222492Z   File "compose/service.py", line 1579, in get_container_data_volumes
2024-06-12T14:39:19.1223307Z KeyError: 'ContainerConfig'
2024-06-12T14:39:19.1693803Z ... attempting to add alias 1

Some how recreating the same container images is failing

@harshavardhana
Copy link
Member

it looks like something changed in the GitHub runner environment, testing it with other PRs.

@harshavardhana
Copy link
Member

Okay so this is broken in all PRs, will disable the upgrade tests for now.

@harshavardhana
Copy link
Member

merged #19926 should fix the build issue.

@harshavardhana harshavardhana merged commit ad04afe into minio:master Jun 13, 2024
20 checks passed
@klauspost klauspost deleted the fix-multipart-ssec-checksums branch June 13, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants