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

Skip replication enabled SC with PowerStore Metro mode in replicator sidecar #156

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

santhoshatdell
Copy link
Contributor

@santhoshatdell santhoshatdell commented Aug 27, 2024

Description

Skip replication enabled StorageClass with PowerStore Metro mode in replicator sidecar.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1443

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

How Has This Been Tested?

Unit test coverage for dell-csi-replicator increased from 80.1% to 80.5%
Changes are minimal. Changes follow same as PowerMax Metro. Unit test covered it.

Comment on lines +42 to +51
// Check for PowerMax SRDF Metro and skip since it is only supported at the driver level
if value, ok := class.Parameters["replication.storage.dell.com/RdfMode"]; ok && strings.ToUpper(value) == "METRO" {
log.V(common.InfoLevel).Info("Metro replication is not supported by Dell CSI Replication Controllers")
return false
}

// Check for PowerStore Metro and skip since it is only supported at the driver level
if value, ok := class.Parameters["replication.storage.dell.com/mode"]; ok && strings.ToUpper(value) == "METRO" {
log.V(common.InfoLevel).Info("Metro replication is not supported by Dell CSI Replication Controllers")
return false

Choose a reason for hiding this comment

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

Suggested change
// Check for PowerMax SRDF Metro and skip since it is only supported at the driver level
if value, ok := class.Parameters["replication.storage.dell.com/RdfMode"]; ok && strings.ToUpper(value) == "METRO" {
log.V(common.InfoLevel).Info("Metro replication is not supported by Dell CSI Replication Controllers")
return false
}
// Check for PowerStore Metro and skip since it is only supported at the driver level
if value, ok := class.Parameters["replication.storage.dell.com/mode"]; ok && strings.ToUpper(value) == "METRO" {
log.V(common.InfoLevel).Info("Metro replication is not supported by Dell CSI Replication Controllers")
return false
// Check for Metro and skip since it is only supported at the driver level
if value, ok := class.Parameters["replication.storage.dell.com/RdfMode"]; (ok && strings.ToUpper(value) == "METRO") ||
(value, ok = class.Parameters["replication.storage.dell.com/mode"]; ok && strings.ToUpper(value) == "METRO") {
log.V(common.InfoLevel).Info("Metro replication is not supported by Dell CSI Replication Controllers")
return false
}

@santhoshatdell santhoshatdell dismissed satyakonduri’s stale review September 3, 2024 18:48

I don't see much performance improvement with this. BTW, did the suggested change work?

@santhoshatdell santhoshatdell marked this pull request as ready for review September 3, 2024 18:48
Comment on lines +42 to +51
// Check for PowerMax SRDF Metro and skip since it is only supported at the driver level
if value, ok := class.Parameters["replication.storage.dell.com/RdfMode"]; ok && strings.ToUpper(value) == "METRO" {
log.V(common.InfoLevel).Info("Metro replication is not supported by Dell CSI Replication Controllers")
return false
}

// Check for PowerStore Metro and skip since it is only supported at the driver level
if value, ok := class.Parameters["replication.storage.dell.com/mode"]; ok && strings.ToUpper(value) == "METRO" {
log.V(common.InfoLevel).Info("Metro replication is not supported by Dell CSI Replication Controllers")
return false
Copy link
Contributor

Choose a reason for hiding this comment

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

We seem to be relying on assuming a minimum version of Replication for the driver. What could go wrong if they changed to use an older Replication version. What about pods changing during an upgrade/downgrade? Is there any danger of DU/DL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Driver and replicator side car runs in the same pod. Old pod with older versions will be servicing the request till the new one comes fully up and running. I don't think there will be any issue here.
It is recommended to use published versions for all drivers/modules in a CSM release. I cannot recollect the document location though.

@@ -62,7 +62,7 @@ func (m *mockIdentity) GetMigrationCapabilities(_ context.Context) (MigrationCap

func getSupportedActions() (ReplicationCapabilitySet, []*replication.SupportedActions) {
capResponse := &replication.GetReplicationCapabilityResponse{}
for i := 0; i < 3; i++ {
for i := int32(0); i < 3; i++ {
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this flagged by the new linter? Seems to break a popular idiom.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it was complained recently.

test/e2e-framework/utils/utils.go Show resolved Hide resolved
@santhoshatdell santhoshatdell merged commit bc543b9 into main Sep 3, 2024
8 checks passed
@santhoshatdell santhoshatdell deleted the powerstore-metro branch September 3, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants