Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider: send vrcs with fixed replication schedule #2905

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

rewantsoni
Copy link
Member

@rewantsoni rewantsoni commented Nov 21, 2024

Send the entire spec of VRC that includes schedule, provisioner, clusterID from provider

Sending a VRC with a fixed schedule is temporary for feature freeze, we will work on moving it to dynamic schedules after feature freeze

controllers/util/storageclass.go Outdated Show resolved Hide resolved
@@ -814,24 +816,36 @@ func (s *OCSProviderServer) GetStorageClaimConfig(ctx context.Context, req *pb.S
}),
Labels: getExternalResourceLabels("VolumeGroupSnapshotClass", mirroringEnabled, false, replicationID, storageID)},
&pb.ExternalResource{
Name: "ceph-rbd",
Name: req.StorageClaimName,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like all other classes, our VRCs should have a fixed name and not one that depends on the request

}),
Labels: getExternalResourceLabels("VolumeReplicationClass", mirroringEnabled, false, replicationID, storageID),
Annotations: map[string]string{
"replication.storage.openshift.io/is-default-class": "true",
},
},
&pb.ExternalResource{
Name: "ceph-rbd-flatten",
Name: fmt.Sprintf("%s-flatten", req.StorageClaimName),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like all other classes, our VRCs should have a fixed name and not one that depends on the request

@@ -658,12 +661,17 @@ func TestOCSProviderServerGetStorageClaimConfig(t *testing.T) {
"ramendr.openshift.io/storageID": "8d40b6be71600457b5dec219d2ce2d4c",
},
},
"ceph-rbd-volumereplicationclass": {
Name: "ceph-rbd",
"block-pool-claim-volumereplicationclass": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the original name which is the name of the VRC

Copy link
Contributor

@leelavg leelavg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either expand the existing comment on why this is temporary or the PR description, ie, a bit of technical details.

@@ -731,6 +731,8 @@ func (s *OCSProviderServer) GetStorageClaimConfig(ctx context.Context, req *pb.S
replicationEnabled := len(scp.Items) > 0
replicationID := req.StorageClaimName

clientProfile := util.CalculateMD5Hash(req.StorageClaimName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could become problematic when we refactor the responsibility of provider & client side code, better be consistent and let client-op set this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was already decided that we are going to set clusterID from the provider

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2024
Copy link
Contributor

openshift-ci bot commented Nov 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iamniting, leelavg, rewantsoni

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 0d54af2 into red-hat-storage:main Nov 22, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants