Skip to content

Commit

Permalink
Merge pull request #2903 from rewantsoni/replicationID
Browse files Browse the repository at this point in the history
provider: update replicationID to be storageClass name
  • Loading branch information
openshift-merge-bot[bot] authored Nov 21, 2024
2 parents 2e7cf01 + 68a4570 commit b0323a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions services/provider/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,7 @@ func (s *OCSProviderServer) GetStorageClaimConfig(ctx context.Context, req *pb.S
return nil, status.Errorf(codes.Internal, "failed to get StorageClusterPeerList. %v", err)
}
replicationEnabled := len(scp.Items) > 0
var replicationID string
if replicationEnabled {
replicationID = util.CalculateMD5Hash(req.StorageClaimName)
}
replicationID := req.StorageClaimName

var extR []*pb.ExternalResource

Expand Down
4 changes: 2 additions & 2 deletions services/provider/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ func TestOCSProviderServerGetStorageClaimConfig(t *testing.T) {
"mirroringMode": "snapshot",
},
Labels: map[string]string{
"ramendr.openshift.io/replicationid": "",
"ramendr.openshift.io/replicationid": "block-pool-claim",
"ramendr.openshift.io/storageID": "8d40b6be71600457b5dec219d2ce2d4c",
},
Annotations: map[string]string{
Expand All @@ -683,7 +683,7 @@ func TestOCSProviderServerGetStorageClaimConfig(t *testing.T) {
},
Labels: map[string]string{
"replication.storage.openshift.io/flatten-mode": "force",
"ramendr.openshift.io/replicationid": "",
"ramendr.openshift.io/replicationid": "block-pool-claim",
"ramendr.openshift.io/storageID": "8d40b6be71600457b5dec219d2ce2d4c",
},
Annotations: map[string]string{},
Expand Down

0 comments on commit b0323a9

Please sign in to comment.