From 0c53d860173e98f154ce9fc117725652bd90f840 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 24 Sep 2024 01:03:58 -0700 Subject: [PATCH] remove the list from 'mc stat' from testing via '--no-list' (#20468) avoid 'listing' as it may get incorrect results for these tests, we are only interested in 'mc stat' as in HEAD object here. --- .../replication/setup_3site_replication.sh | 14 ++++---- .../replication/test_del_marker_proxying.sh | 2 +- docs/site-replication/run-multi-site-ldap.sh | 20 ++++++------ .../run-multi-site-minio-idp.sh | 26 ++++++++------- docs/site-replication/run-multi-site-oidc.sh | 16 +++++----- .../run-sse-kms-object-replication.sh | 32 +++++++++---------- ...sec-object-replication-with-compression.sh | 16 +++++----- .../run-ssec-object-replication.sh | 24 +++++++------- 8 files changed, 77 insertions(+), 73 deletions(-) diff --git a/docs/bucket/replication/setup_3site_replication.sh b/docs/bucket/replication/setup_3site_replication.sh index 0b5083777..db8fc7147 100755 --- a/docs/bucket/replication/setup_3site_replication.sh +++ b/docs/bucket/replication/setup_3site_replication.sh @@ -174,20 +174,20 @@ echo "Copying data to source sitea/olockbucket" sleep 1 echo "Verifying the metadata difference between source and target" -if diff -pruN <(./mc stat --json sitea/bucket/hosts | jq .) <(./mc stat --json siteb/bucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then +if diff -pruN <(./mc stat --no-list --json sitea/bucket/hosts | jq .) <(./mc stat --no-list --json siteb/bucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then echo "verified sitea-> COMPLETED, siteb-> REPLICA" fi -if diff -pruN <(./mc stat --json sitea/bucket/hosts | jq .) <(./mc stat --json sitec/bucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then +if diff -pruN <(./mc stat --no-list --json sitea/bucket/hosts | jq .) <(./mc stat --no-list --json sitec/bucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then echo "verified sitea-> COMPLETED, sitec-> REPLICA" fi echo "Verifying the metadata difference between source and target" -if diff -pruN <(./mc stat --json sitea/olockbucket/hosts | jq .) <(./mc stat --json siteb/olockbucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then +if diff -pruN <(./mc stat --no-list --json sitea/olockbucket/hosts | jq .) <(./mc stat --no-list --json siteb/olockbucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then echo "verified sitea-> COMPLETED, siteb-> REPLICA" fi -if diff -pruN <(./mc stat --json sitea/olockbucket/hosts | jq .) <(./mc stat --json sitec/olockbucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then +if diff -pruN <(./mc stat --no-list --json sitea/olockbucket/hosts | jq .) <(./mc stat --no-list --json sitec/olockbucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then echo "verified sitea-> COMPLETED, sitec-> REPLICA" fi @@ -233,9 +233,9 @@ multipart-debug --endpoint 127.0.0.1:9002 --accesskey minio --secretkey minio123 sleep 10 -./mc stat sitea/bucket/new-test-encrypted-object -./mc stat siteb/bucket/new-test-encrypted-object -./mc stat sitec/bucket/new-test-encrypted-object +./mc stat --no-list sitea/bucket/new-test-encrypted-object +./mc stat --no-list siteb/bucket/new-test-encrypted-object +./mc stat --no-list sitec/bucket/new-test-encrypted-object ./mc ls -r sitea/bucket/ ./mc ls -r siteb/bucket/ diff --git a/docs/bucket/replication/test_del_marker_proxying.sh b/docs/bucket/replication/test_del_marker_proxying.sh index c64c9d154..3fc04ee3f 100755 --- a/docs/bucket/replication/test_del_marker_proxying.sh +++ b/docs/bucket/replication/test_del_marker_proxying.sh @@ -62,7 +62,7 @@ while true; do fi echo "Hello World" | ./mc pipe sitea/bucket/obj$loop_count ./mc rm sitea/bucket/obj$loop_count - RESULT=$({ ./mc stat sitea/bucket/obj$loop_count; } 2>&1) + RESULT=$({ ./mc stat --no-list sitea/bucket/obj$loop_count; } 2>&1) if [[ ${RESULT} != *"Object does not exist"* ]]; then echo "BUG: stat should fail. succeeded." exit_1 diff --git a/docs/site-replication/run-multi-site-ldap.sh b/docs/site-replication/run-multi-site-ldap.sh index 46f41503b..351ca92a3 100755 --- a/docs/site-replication/run-multi-site-ldap.sh +++ b/docs/site-replication/run-multi-site-ldap.sh @@ -207,13 +207,13 @@ expected_checksum=$(cat ./lrgfile | md5sum) ./mc mb minio1/bucket2 sleep 5 -./mc stat minio2/newbucket +./mc stat --no-list minio2/newbucket if [ $? -ne 0 ]; then echo "expecting bucket to be present. exiting.." exit_1 fi -./mc stat minio3/newbucket +./mc stat --no-list minio3/newbucket if [ $? -ne 0 ]; then echo "expecting bucket to be present. exiting.." exit_1 @@ -222,20 +222,20 @@ fi ./mc cp README.md minio2/newbucket/ sleep 5 -./mc stat minio1/newbucket/README.md +./mc stat --no-list minio1/newbucket/README.md if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 fi -./mc stat minio3/newbucket/README.md +./mc stat --no-list minio3/newbucket/README.md if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 fi sleep 10 -./mc stat minio3/newbucket/lrgfile +./mc stat --no-list minio3/newbucket/lrgfile if [ $? -ne 0 ]; then echo "expected object to be present, exiting.." exit_1 @@ -254,13 +254,13 @@ if [ $? -ne 0 ]; then fi sleep 5 -./mc stat minio1/newbucket/lrgfile +./mc stat --no-list minio1/newbucket/lrgfile if [ $? -eq 0 ]; then echo "expected object to be deleted permanently after replication, exiting.." exit_1 fi -vID=$(./mc stat minio2/newbucket/README.md --json | jq .versionID) +vID=$(./mc stat --no-list minio2/newbucket/README.md --json | jq .versionID) if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 @@ -279,7 +279,7 @@ if [ $? -ne 0 ]; then fi sleep 5 -replStatus_minio2=$(./mc stat minio2/newbucket/README.md --json | jq -r .replicationStatus) +replStatus_minio2=$(./mc stat --no-list minio2/newbucket/README.md --json | jq -r .replicationStatus) if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 @@ -293,13 +293,13 @@ fi ./mc rm minio3/newbucket/README.md sleep 5 -./mc stat minio2/newbucket/README.md +./mc stat --no-list minio2/newbucket/README.md if [ $? -eq 0 ]; then echo "expected file to be deleted, exiting.." exit_1 fi -./mc stat minio1/newbucket/README.md +./mc stat --no-list minio1/newbucket/README.md if [ $? -eq 0 ]; then echo "expected file to be deleted, exiting.." exit_1 diff --git a/docs/site-replication/run-multi-site-minio-idp.sh b/docs/site-replication/run-multi-site-minio-idp.sh index 408dd3f10..48df4f241 100755 --- a/docs/site-replication/run-multi-site-minio-idp.sh +++ b/docs/site-replication/run-multi-site-minio-idp.sh @@ -223,19 +223,19 @@ expected_checksum=$(cat ./lrgfile | md5sum) ./mc cp ./lrgfile minio1/newbucket sleep 5 -./mc stat minio2/newbucket +./mc stat --no-list minio2/newbucket if [ $? -ne 0 ]; then echo "expecting bucket to be present. exiting.." exit_1 fi -./mc stat minio3/newbucket +./mc stat --no-list minio3/newbucket if [ $? -ne 0 ]; then echo "expecting bucket to be present. exiting.." exit_1 fi -err_minio2=$(./mc stat minio2/newbucket/xxx --json | jq -r .error.cause.message) +err_minio2=$(./mc stat --no-list minio2/newbucket/xxx --json | jq -r .error.cause.message) if [ $? -ne 0 ]; then echo "expecting object to be missing. exiting.." exit_1 @@ -249,20 +249,20 @@ fi ./mc cp README.md minio2/newbucket/ sleep 5 -./mc stat minio1/newbucket/README.md +./mc stat --no-list minio1/newbucket/README.md if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 fi -./mc stat minio3/newbucket/README.md +./mc stat --no-list minio3/newbucket/README.md if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 fi sleep 10 -./mc stat minio3/newbucket/lrgfile +./mc stat --no-list minio3/newbucket/lrgfile if [ $? -ne 0 ]; then echo "expected object to be present, exiting.." exit_1 @@ -282,13 +282,13 @@ if [ $? -ne 0 ]; then fi sleep 5 -./mc stat minio1/newbucket/lrgfile +./mc stat --no-list minio1/newbucket/lrgfile if [ $? -eq 0 ]; then echo "expected object to be deleted permanently after replication, exiting.." exit_1 fi -vID=$(./mc stat minio2/newbucket/README.md --json | jq .versionID) +vID=$(./mc stat --no-list minio2/newbucket/README.md --json | jq .versionID) if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 @@ -311,7 +311,7 @@ if [ $? -ne 0 ]; then fi sleep 5 -replStatus_minio2=$(./mc stat minio2/newbucket/README.md --json | jq -r .replicationStatus) +replStatus_minio2=$(./mc stat --no-list minio2/newbucket/README.md --json | jq -r .replicationStatus) if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 @@ -325,13 +325,13 @@ fi ./mc rm minio3/newbucket/README.md sleep 5 -./mc stat minio2/newbucket/README.md +./mc stat --no-list minio2/newbucket/README.md if [ $? -eq 0 ]; then echo "expected file to be deleted, exiting.." exit_1 fi -./mc stat minio1/newbucket/README.md +./mc stat --no-list minio1/newbucket/README.md if [ $? -eq 0 ]; then echo "expected file to be deleted, exiting.." exit_1 @@ -340,6 +340,8 @@ fi ./mc mb --with-lock minio3/newbucket-olock sleep 5 +set -x + enabled_minio2=$(./mc stat --json minio2/newbucket-olock | jq -r .ObjectLock.enabled) if [ $? -ne 0 ]; then echo "expected bucket to be mirrored with object-lock but not present, exiting..." @@ -362,6 +364,8 @@ if [ "${enabled_minio1}" != "Enabled" ]; then exit_1 fi +set +x + # "Test if most recent tag update is replicated" ./mc tag set minio2/newbucket "key=val1" if [ $? -ne 0 ]; then diff --git a/docs/site-replication/run-multi-site-oidc.sh b/docs/site-replication/run-multi-site-oidc.sh index 68c6ab937..d71a86a4a 100755 --- a/docs/site-replication/run-multi-site-oidc.sh +++ b/docs/site-replication/run-multi-site-oidc.sh @@ -176,13 +176,13 @@ expected_checksum=$(cat ./lrgfile | md5sum) ./mc cp ./lrgfile minio1/newbucket sleep 5 -./mc stat minio2/newbucket +./mc stat --no-list minio2/newbucket if [ $? -ne 0 ]; then echo "expecting bucket to be present. exiting.." exit_1 fi -./mc stat minio3/newbucket +./mc stat --no-list minio3/newbucket if [ $? -ne 0 ]; then echo "expecting bucket to be present. exiting.." exit_1 @@ -191,13 +191,13 @@ fi ./mc cp README.md minio2/newbucket/ sleep 5 -./mc stat minio1/newbucket/README.md +./mc stat --no-list minio1/newbucket/README.md if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 fi -./mc stat minio3/newbucket/README.md +./mc stat --no-list minio3/newbucket/README.md if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." exit_1 @@ -206,20 +206,20 @@ fi ./mc rm minio3/newbucket/README.md sleep 5 -./mc stat minio2/newbucket/README.md +./mc stat --no-list minio2/newbucket/README.md if [ $? -eq 0 ]; then echo "expected file to be deleted, exiting.." exit_1 fi -./mc stat minio1/newbucket/README.md +./mc stat --no-list minio1/newbucket/README.md if [ $? -eq 0 ]; then echo "expected file to be deleted, exiting.." exit_1 fi sleep 10 -./mc stat minio3/newbucket/lrgfile +./mc stat --no-list minio3/newbucket/lrgfile if [ $? -ne 0 ]; then echo "expected object to be present, exiting.." exit_1 @@ -238,7 +238,7 @@ if [ $? -ne 0 ]; then fi sleep 5 -./mc stat minio1/newbucket/lrgfile +./mc stat --no-list minio1/newbucket/lrgfile if [ $? -eq 0 ]; then echo "expected object to be deleted permanently after replication, exiting.." exit_1 diff --git a/docs/site-replication/run-sse-kms-object-replication.sh b/docs/site-replication/run-sse-kms-object-replication.sh index 74879b39f..c44235023 100755 --- a/docs/site-replication/run-sse-kms-object-replication.sh +++ b/docs/site-replication/run-sse-kms-object-replication.sh @@ -139,46 +139,46 @@ fi # Stat the objects from source site echo "Stat minio1/test-bucket/encrypted" -./mc stat minio1/test-bucket/encrypted --insecure --json -stat_out1=$(./mc stat minio1/test-bucket/encrypted --insecure --json) +./mc stat --no-list minio1/test-bucket/encrypted --insecure --json +stat_out1=$(./mc stat --no-list minio1/test-bucket/encrypted --insecure --json) src_obj1_algo=$(echo "${stat_out1}" | jq '.metadata."X-Amz-Server-Side-Encryption"') src_obj1_keyid=$(echo "${stat_out1}" | jq '.metadata."X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"') echo "Stat minio1/test-bucket/defpartsize" -./mc stat minio1/test-bucket/defpartsize --insecure --json -stat_out2=$(./mc stat minio1/test-bucket/defpartsize --insecure --json) +./mc stat --no-list minio1/test-bucket/defpartsize --insecure --json +stat_out2=$(./mc stat --no-list minio1/test-bucket/defpartsize --insecure --json) src_obj2_algo=$(echo "${stat_out2}" | jq '.metadata."X-Amz-Server-Side-Encryption"') src_obj2_keyid=$(echo "${stat_out2}" | jq '.metadata."X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"') echo "Stat minio1/test-bucket/custpartsize" -./mc stat minio1/test-bucket/custpartsize --insecure --json -stat_out3=$(./mc stat minio1/test-bucket/custpartsize --insecure --json) +./mc stat --no-list minio1/test-bucket/custpartsize --insecure --json +stat_out3=$(./mc stat --no-list minio1/test-bucket/custpartsize --insecure --json) src_obj3_algo=$(echo "${stat_out3}" | jq '.metadata."X-Amz-Server-Side-Encryption"') src_obj3_keyid=$(echo "${stat_out3}" | jq '.metadata."X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"') echo "Stat minio1/test-bucket/mpartobj" -./mc stat minio1/test-bucket/mpartobj --enc-c "minio1/test-bucket/mpartobj=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out4=$(./mc stat minio1/test-bucket/mpartobj --enc-c "minio1/test-bucket/mpartobj=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio1/test-bucket/mpartobj --enc-c "minio1/test-bucket/mpartobj=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out4=$(./mc stat --no-list minio1/test-bucket/mpartobj --enc-c "minio1/test-bucket/mpartobj=${TEST_MINIO_ENC_KEY}" --insecure --json) src_obj4_etag=$(echo "${stat_out4}" | jq '.etag') src_obj4_size=$(echo "${stat_out4}" | jq '.size') src_obj4_md5=$(echo "${stat_out4}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') # Stat the objects from replicated site echo "Stat minio2/test-bucket/encrypted" -./mc stat minio2/test-bucket/encrypted --insecure --json -stat_out1_rep=$(./mc stat minio2/test-bucket/encrypted --insecure --json) +./mc stat --no-list minio2/test-bucket/encrypted --insecure --json +stat_out1_rep=$(./mc stat --no-list minio2/test-bucket/encrypted --insecure --json) rep_obj1_algo=$(echo "${stat_out1_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption"') rep_obj1_keyid=$(echo "${stat_out1_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"') echo "Stat minio2/test-bucket/defpartsize" -./mc stat minio2/test-bucket/defpartsize --insecure --json -stat_out2_rep=$(./mc stat minio2/test-bucket/defpartsize --insecure --json) +./mc stat --no-list minio2/test-bucket/defpartsize --insecure --json +stat_out2_rep=$(./mc stat --no-list minio2/test-bucket/defpartsize --insecure --json) rep_obj2_algo=$(echo "${stat_out2_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption"') rep_obj2_keyid=$(echo "${stat_out2_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"') echo "Stat minio2/test-bucket/custpartsize" -./mc stat minio2/test-bucket/custpartsize --insecure --json -stat_out3_rep=$(./mc stat minio2/test-bucket/custpartsize --insecure --json) +./mc stat --no-list minio2/test-bucket/custpartsize --insecure --json +stat_out3_rep=$(./mc stat --no-list minio2/test-bucket/custpartsize --insecure --json) rep_obj3_algo=$(echo "${stat_out3_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption"') rep_obj3_keyid=$(echo "${stat_out3_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"') echo "Stat minio2/test-bucket/mpartobj" -./mc stat minio2/test-bucket/mpartobj --enc-c "minio2/test-bucket/mpartobj=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out4_rep=$(./mc stat minio2/test-bucket/mpartobj --enc-c "minio2/test-bucket/mpartobj=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio2/test-bucket/mpartobj --enc-c "minio2/test-bucket/mpartobj=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out4_rep=$(./mc stat --no-list minio2/test-bucket/mpartobj --enc-c "minio2/test-bucket/mpartobj=${TEST_MINIO_ENC_KEY}" --insecure --json) rep_obj4_etag=$(echo "${stat_out4}" | jq '.etag') rep_obj4_size=$(echo "${stat_out4}" | jq '.size') rep_obj4_md5=$(echo "${stat_out4}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') diff --git a/docs/site-replication/run-ssec-object-replication-with-compression.sh b/docs/site-replication/run-ssec-object-replication-with-compression.sh index 5e93f4369..4f55f7a1b 100755 --- a/docs/site-replication/run-ssec-object-replication-with-compression.sh +++ b/docs/site-replication/run-ssec-object-replication-with-compression.sh @@ -135,28 +135,28 @@ fi # Stat the SSEC objects from source site echo "Stat minio1/test-bucket/encrypted" -./mc stat minio1/test-bucket/encrypted --enc-c "minio1/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out1=$(./mc stat minio1/test-bucket/encrypted --enc-c "minio1/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio1/test-bucket/encrypted --enc-c "minio1/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out1=$(./mc stat --no-list minio1/test-bucket/encrypted --enc-c "minio1/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json) src_obj1_etag=$(echo "${stat_out1}" | jq '.etag') src_obj1_size=$(echo "${stat_out1}" | jq '.size') src_obj1_md5=$(echo "${stat_out1}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') echo "Stat minio1/test-bucket/defpartsize" -./mc stat minio1/test-bucket/defpartsize --enc-c "minio1/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out2=$(./mc stat minio1/test-bucket/defpartsize --enc-c "minio1/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio1/test-bucket/defpartsize --enc-c "minio1/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out2=$(./mc stat --no-list minio1/test-bucket/defpartsize --enc-c "minio1/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) src_obj2_etag=$(echo "${stat_out2}" | jq '.etag') src_obj2_size=$(echo "${stat_out2}" | jq '.size') src_obj2_md5=$(echo "${stat_out2}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') # Stat the SSEC objects from replicated site echo "Stat minio2/test-bucket/encrypted" -./mc stat minio2/test-bucket/encrypted --enc-c "minio2/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out1_rep=$(./mc stat minio2/test-bucket/encrypted --enc-c "minio2/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio2/test-bucket/encrypted --enc-c "minio2/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out1_rep=$(./mc stat --no-list minio2/test-bucket/encrypted --enc-c "minio2/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json) rep_obj1_etag=$(echo "${stat_out1_rep}" | jq '.etag') rep_obj1_size=$(echo "${stat_out1_rep}" | jq '.size') rep_obj1_md5=$(echo "${stat_out1_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') echo "Stat minio2/test-bucket/defpartsize" -./mc stat minio2/test-bucket/defpartsize --enc-c "minio2/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out2_rep=$(./mc stat minio2/test-bucket/defpartsize --enc-c "minio2/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio2/test-bucket/defpartsize --enc-c "minio2/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out2_rep=$(./mc stat --no-list minio2/test-bucket/defpartsize --enc-c "minio2/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) rep_obj2_etag=$(echo "${stat_out2_rep}" | jq '.etag') rep_obj2_size=$(echo "${stat_out2_rep}" | jq '.size') rep_obj2_md5=$(echo "${stat_out2_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') diff --git a/docs/site-replication/run-ssec-object-replication.sh b/docs/site-replication/run-ssec-object-replication.sh index 4fdc786e9..0f50f8345 100755 --- a/docs/site-replication/run-ssec-object-replication.sh +++ b/docs/site-replication/run-ssec-object-replication.sh @@ -137,40 +137,40 @@ fi # Stat the SSEC objects from source site echo "Stat minio1/test-bucket/encrypted" -./mc stat minio1/test-bucket/encrypted --enc-c "minio1/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out1=$(./mc stat minio1/test-bucket/encrypted --enc-c "minio1/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio1/test-bucket/encrypted --enc-c "minio1/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out1=$(./mc stat --no-list minio1/test-bucket/encrypted --enc-c "minio1/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json) src_obj1_etag=$(echo "${stat_out1}" | jq '.etag') src_obj1_size=$(echo "${stat_out1}" | jq '.size') src_obj1_md5=$(echo "${stat_out1}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') echo "Stat minio1/test-bucket/defpartsize" -./mc stat minio1/test-bucket/defpartsize --enc-c "minio1/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out2=$(./mc stat minio1/test-bucket/defpartsize --enc-c "minio1/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio1/test-bucket/defpartsize --enc-c "minio1/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out2=$(./mc stat --no-list minio1/test-bucket/defpartsize --enc-c "minio1/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) src_obj2_etag=$(echo "${stat_out2}" | jq '.etag') src_obj2_size=$(echo "${stat_out2}" | jq '.size') src_obj2_md5=$(echo "${stat_out2}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') echo "Stat minio1/test-bucket/custpartsize" -./mc stat minio1/test-bucket/custpartsize --enc-c "minio1/test-bucket/custpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out3=$(./mc stat minio1/test-bucket/custpartsize --enc-c "minio1/test-bucket/custpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio1/test-bucket/custpartsize --enc-c "minio1/test-bucket/custpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out3=$(./mc stat --no-list minio1/test-bucket/custpartsize --enc-c "minio1/test-bucket/custpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) src_obj3_etag=$(echo "${stat_out3}" | jq '.etag') src_obj3_size=$(echo "${stat_out3}" | jq '.size') src_obj3_md5=$(echo "${stat_out3}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') # Stat the SSEC objects from replicated site echo "Stat minio2/test-bucket/encrypted" -./mc stat minio2/test-bucket/encrypted --enc-c "minio2/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out1_rep=$(./mc stat minio2/test-bucket/encrypted --enc-c "minio2/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio2/test-bucket/encrypted --enc-c "minio2/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out1_rep=$(./mc stat --no-list minio2/test-bucket/encrypted --enc-c "minio2/test-bucket/encrypted=${TEST_MINIO_ENC_KEY}" --insecure --json) rep_obj1_etag=$(echo "${stat_out1_rep}" | jq '.etag') rep_obj1_size=$(echo "${stat_out1_rep}" | jq '.size') rep_obj1_md5=$(echo "${stat_out1_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') echo "Stat minio2/test-bucket/defpartsize" -./mc stat minio2/test-bucket/defpartsize --enc-c "minio2/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out2_rep=$(./mc stat minio2/test-bucket/defpartsize --enc-c "minio2/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio2/test-bucket/defpartsize --enc-c "minio2/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out2_rep=$(./mc stat --no-list minio2/test-bucket/defpartsize --enc-c "minio2/test-bucket/defpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) rep_obj2_etag=$(echo "${stat_out2_rep}" | jq '.etag') rep_obj2_size=$(echo "${stat_out2_rep}" | jq '.size') rep_obj2_md5=$(echo "${stat_out2_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"') echo "Stat minio2/test-bucket/custpartsize" -./mc stat minio2/test-bucket/custpartsize --enc-c "minio2/test-bucket/custpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json -stat_out3_rep=$(./mc stat minio2/test-bucket/custpartsize --enc-c "minio2/test-bucket/custpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) +./mc stat --no-list minio2/test-bucket/custpartsize --enc-c "minio2/test-bucket/custpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json +stat_out3_rep=$(./mc stat --no-list minio2/test-bucket/custpartsize --enc-c "minio2/test-bucket/custpartsize=${TEST_MINIO_ENC_KEY}" --insecure --json) rep_obj3_etag=$(echo "${stat_out3_rep}" | jq '.etag') rep_obj3_size=$(echo "${stat_out3_rep}" | jq '.size') rep_obj3_md5=$(echo "${stat_out3_rep}" | jq '.metadata."X-Amz-Server-Side-Encryption-Customer-Key-Md5"')