mirror of
https://github.com/minio/minio.git
synced 2025-07-26 00:40:08 -04:00
Disallow delete replication for tag based rules (#14167)
This commit is contained in:
parent
5a9f133491
commit
295730408b
@ -178,6 +178,8 @@ When an object is deleted from the source bucket, the corresponding replica vers
|
|||||||
|
|
||||||
Note that due to this extension behavior, AWS SDK's may not support the extension functionality pertaining to replicating versioned deletes.
|
Note that due to this extension behavior, AWS SDK's may not support the extension functionality pertaining to replicating versioned deletes.
|
||||||
|
|
||||||
|
Note that just like with [AWS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/delete-marker-replication.html), Delete marker replication is disallowed in MinIO when the replication rule has tags.
|
||||||
|
|
||||||
To add a replication rule allowing both delete marker replication, versioned delete replication or both specify the --replicate flag with comma separated values as in the example below.
|
To add a replication rule allowing both delete marker replication, versioned delete replication or both specify the --replicate flag with comma separated values as in the example below.
|
||||||
|
|
||||||
Additional permission of "s3:ReplicateDelete" action would need to be specified on the access key configured for the target cluster if Delete Marker replication or versioned delete replication is enabled.
|
Additional permission of "s3:ReplicateDelete" action would need to be specified on the access key configured for the target cluster if Delete Marker replication or versioned delete replication is enabled.
|
||||||
|
@ -153,6 +153,7 @@ var (
|
|||||||
errDeleteReplicationMissing = Errorf("Delete replication must be specified")
|
errDeleteReplicationMissing = Errorf("Delete replication must be specified")
|
||||||
errInvalidDeleteReplicationStatus = Errorf("Delete replication is either enable|disable")
|
errInvalidDeleteReplicationStatus = Errorf("Delete replication is either enable|disable")
|
||||||
errInvalidExistingObjectReplicationStatus = Errorf("Existing object replication status is invalid")
|
errInvalidExistingObjectReplicationStatus = Errorf("Existing object replication status is invalid")
|
||||||
|
errTagsDeleteMarkerReplicationDisallowed = Errorf("Delete marker replication is not supported if any Tag filter is specified")
|
||||||
)
|
)
|
||||||
|
|
||||||
// validateID - checks if ID is valid or not.
|
// validateID - checks if ID is valid or not.
|
||||||
@ -239,6 +240,9 @@ func (r Rule) Validate(bucket string, sameTarget bool) error {
|
|||||||
if r.Destination.Bucket == bucket && sameTarget {
|
if r.Destination.Bucket == bucket && sameTarget {
|
||||||
return errDestinationSourceIdentical
|
return errDestinationSourceIdentical
|
||||||
}
|
}
|
||||||
|
if !r.Filter.Tag.IsEmpty() && (r.DeleteMarkerReplication.Status == Enabled) {
|
||||||
|
return errTagsDeleteMarkerReplicationDisallowed
|
||||||
|
}
|
||||||
return r.ExistingObjectReplication.Validate()
|
return r.ExistingObjectReplication.Validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user