bharatviswa504 opened a new pull request #2827: URL: https://github.com/apache/ozone/pull/2827
## What changes were proposed in this pull request? Fix the issue which is causing range reads to fail for keys uploaded through PUT/MPU. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-5964 ## How was this patch tested? Tested it on docker-compose ozone-secure-mr. Added required changes in docker-config to test S3G functionality with this docker env. Also opened HDDS-5968 to enable s3 test suite in this env, to get better test coverage for TDE. Tested manually ``` bash-4.2$ s3api create-multipart-upload --bucket b1234 --key mpu { "Bucket": "b1234", "UploadId": "21e7530c-46a7-4439-b995-627b718d8efc-107255133306552321", "Key": "mpu" } bash-4.2$ dd if=/dev/urandom of=/tmp/part1 bs=1048576 count=5 5+0 records in 5+0 records out 5242880 bytes (5.2 MB) copied, 0.153842 s, 34.1 MB/s bash-4.2$ dd if=/dev/urandom of=/tmp/part2 bs=1048576 count=5 5+0 records in 5+0 records out 5242880 bytes (5.2 MB) copied, 0.158858 s, 33.0 MB/s bash-4.2$ export UPLOAD_ID=21e7530c-46a7-4439-b995-627b718d8efc-107255133306552321 bash-4.2$ s3api upload-part --bucket b1234 --key mpu --part-number 1 --body /tmp/part1 --upload-id=$UPLOAD_ID { "ETag": "/s3v/b1234/mpu-21e7530c-46a7-4439-b995-627b718d8efc-107255133306552321-1" } bash-4.2$ s3api upload-part --bucket b1234 --key mpu --part-number 2 --body /tmp/part2 --upload-id=$UPLOAD_ID { "ETag": "/s3v/b1234/mpu-21e7530c-46a7-4439-b995-627b718d8efc-107255133306552321-2" } bash-4.2$ s3api complete-multipart-upload --upload-id=$UPLOAD_ID --bucket b1234 --key mpu --multipart-upload 'Parts=[{ETag="/s3v/b1234/mpu-21e7530c-46a7-4439-b995-627b718d8efc-107255133306552321-1",PartNumber=1},{ETag="/s3v/b1234/mpu-21e7530c-46a7-4439-b995-627b718d8efc-107255133306552321-2",PartNumber=2}]' { "ETag": "a0a9dacf589e2b364e185673026930e425d93a0fb3603be952ea0b20537a0992", "Bucket": "b1234", "Location": "b1234", "Key": "mpu" } bash-4.2$ s3api get-object --bucket b1234 --key mpu --range bytes=0-10 /tmp/testr { "AcceptRanges": "bytes", "ContentType": "application/octet-stream", "LastModified": "Wed, 10 Nov 2021 22:33:55 GMT", "ContentRange": "bytes 0-10/10485760", "Expires": "Wed, 10 Nov 2021 22:34:09 GMT", "CacheControl": "no-cache", "ContentLength": 11, "Metadata": {} } bash-4.2$ s3api put-object --bucket b1234 --key key1 --body /etc/hadoop/ozone-site.xml bash-4.2$ s3api get-object --bucket b1234 --key key1 --range bytes=0-10 /tmp/ozsite { "AcceptRanges": "bytes", "ContentType": "application/octet-stream", "LastModified": "Wed, 10 Nov 2021 23:12:03 GMT", "ContentRange": "bytes 0-10/3139", "Expires": "Wed, 10 Nov 2021 23:12:13 GMT", "CacheControl": "no-cache", "ContentLength": 11, "Metadata": {} } bash-4.2$ cat /tmp/ozsite <configuratbash-4.2$ bash-4.2$ s3api get-object --bucket b1234 --key key1 --range bytes=10-1012 /tmp/ozsite { "AcceptRanges": "bytes", "ContentType": "application/octet-stream", "LastModified": "Wed, 10 Nov 2021 23:12:03 GMT", "ContentRange": "bytes 10-1012/3139", "Expires": "Wed, 10 Nov 2021 23:16:34 GMT", "CacheControl": "no-cache", "ContentLength": 1003, "Metadata": {} } bash-4.2$ bash-4.2$ cat /tmp/ozsite tion> <property><name>ozone.handler.type</name><value>distributed</value></property> <property><name>hdds.datanode.http.auth.kerberos.keytab</name><value>/etc/security/keytabs/HTTP.keytab</value></property> <property><name>ozone.administrators</name><value>*</value></property> <property><name>ozone.replication</name><value>3</value></property> <property><name>hdds.scm.http.auth.kerberos.principal</name><value>HTTP/[email protected]</value></property> <property><name>hdds.scm.kerberos.keytab.file</name><value>/etc/security/keytabs/scm.keytab</value></property> <property><name>hdds.scmclient.max.retry.timeout</name><value>30s</value></property> <property><name>ozone.om.http.auth.kerberos.keytab</name><value>/etc/security/keytabs/om.keytab</value></property> <property><name>hdds.scm.http.auth.kerberos.keytab</name><value>/etc/security/keytabs/scm.keytab</value></property> <property><name>ozone.scm.container.size</name><value>1GB</value></property> <property><name>hdds.grpc.tls.enabled</name><vbash-4.2$ ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
