Specify tags in options while selecting replication targets (#14126)

When the replication rule is based on tag matches, the replication process
should pick up targets matching the tags specified in the replication
rule.

Fixing regression due to #12880
This commit is contained in:
Poorna 2022-01-19 10:45:42 -08:00 committed by GitHub
parent f22e745514
commit 288e276abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -861,8 +861,9 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje
return return
} }
tgtArns := cfg.FilterTargetArns(replication.ObjectOpts{ tgtArns := cfg.FilterTargetArns(replication.ObjectOpts{
Name: object, Name: object,
SSEC: crypto.SSEC.IsEncrypted(objInfo.UserDefined), SSEC: crypto.SSEC.IsEncrypted(objInfo.UserDefined),
UserTags: objInfo.UserTags,
}) })
// Lock the object name before starting replication. // Lock the object name before starting replication.
// Use separate lock that doesn't collide with regular objects. // Use separate lock that doesn't collide with regular objects.