mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
fix: site replication healing of missing buckets (#15298)
fixes a regression from #15186 - Adding tests to cover healing of buckets. - Also dereference quota in SiteReplicationStatus only when non-nil
This commit is contained in:
@@ -317,7 +317,8 @@ fi
|
||||
kill -9 ${site1_pid}
|
||||
# Update tag on minio2/newbucket when minio1 is down
|
||||
./mc tag set minio2/newbucket "key=val2"
|
||||
|
||||
# create a new bucket on minio2. This should replicate to minio1 after it comes online.
|
||||
./mc mb minio2/newbucket2
|
||||
# Restart minio1 instance
|
||||
minio server --config-dir /tmp/minio-internal --address ":9001" /tmp/minio-internal-idp1/{1...4} >/tmp/minio1_1.log 2>&1 &
|
||||
sleep 15
|
||||
@@ -328,3 +329,9 @@ if [ "${val}" != "val2" ]; then
|
||||
echo "expected bucket tag to have replicated, exiting..."
|
||||
exit_1;
|
||||
fi
|
||||
# Test if bucket created when minio1 is down healed
|
||||
diff -q <(./mc ls minio1 | awk '{print $3}') <(./mc ls minio2 | awk '{print $3}') 1>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "expected bucket to have replicated, exiting..."
|
||||
exit_1;
|
||||
fi
|
||||
Reference in New Issue
Block a user