From 7ffc162ea8a8f1bbaebfddd06ebbeb4e3ba5d076 Mon Sep 17 00:00:00 2001 From: Poorna Date: Tue, 30 Jan 2024 10:43:58 -0800 Subject: [PATCH] exclude veeam virtual objects from replication (#18918) Fixes: #18916 --- cmd/bucket-replication.go | 3 +++ cmd/veeam-sos-api.go | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index 782adfa3e..7602f574d 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -3213,6 +3213,9 @@ func queueReplicationHeal(ctx context.Context, bucket string, oi ObjectInfo, rcf return roi } + if isVeeamSOSAPIObject(oi.Name) { + return roi + } if rcfg.Config == nil || rcfg.remotes == nil { return roi } diff --git a/cmd/veeam-sos-api.go b/cmd/veeam-sos-api.go index 6eb2766da..61f5f38a4 100644 --- a/cmd/veeam-sos-api.go +++ b/cmd/veeam-sos-api.go @@ -117,6 +117,15 @@ const ( capacityXMLObject = ".system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/capacity.xml" ) +func isVeeamSOSAPIObject(object string) bool { + switch object { + case systemXMLObject, capacityXMLObject: + return true + default: + return false + } +} + func veeamSOSAPIHeadObject(ctx context.Context, bucket, object string, opts ObjectOptions) (ObjectInfo, error) { gr, err := veeamSOSAPIGetObject(ctx, bucket, object, nil, opts) if gr != nil {