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

Changes to support sync replication for Powerstore #348

Merged
merged 5 commits into from
Sep 30, 2024

Conversation

rajendraindukuri
Copy link
Contributor

@rajendraindukuri rajendraindukuri commented Sep 26, 2024

Description

  • Added changes to enable sync replication and related validations
  • Added unit test coverage for sync replication

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 maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

  • Ran unit tests and the results look good
    image

  • Ran sanity to check Sync replication is working as expected. ensured the following scenarios

    • Volumegroup is getting created as expected with the corresponding ProtectionPolicy and rule
    • Made sure IsWriteOrderConsitent is set to true will allow the ProtectionPolicy with sync rule to be applied to Volume group
    • Replication session is created as expected
      Details with screenshots are captured and attached as part of 28497

Copy link
Contributor

@santhoshatdell santhoshatdell left a comment

Choose a reason for hiding this comment

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

Please address lint errors.

pkg/controller/controller.go Show resolved Hide resolved
pkg/controller/controller.go Outdated Show resolved Hide resolved
@rajendraindukuri
Copy link
Contributor Author

Please address lint errors.

Addressed

HarishH-DELL
HarishH-DELL previously approved these changes Sep 30, 2024
Copy link
Contributor

@adarsh-dell adarsh-dell left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -302,15 +318,24 @@ func (s *Service) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest
if apiError, ok := err.(gopowerstore.APIError); ok && apiError.NotFound() {
log.Infof("Volume group with name %s not found, creating it", vgName)

// Attribute that indicates whether snapshot sets of the volumegroup will be write-order consistent.
isWriteOrderConsistent := false
Copy link
Contributor

Choose a reason for hiding this comment

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

This will make write-order-consistent to be false for ASYNC mode while the API/UI's enables it by default for volume group creation.
CC @alankar-verma

Copy link
Contributor

Choose a reason for hiding this comment

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

How about enabling it (sending true) irrespective of the mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @santhoshatdell Currently for async we are not passing is-write-consistent ... so by default the value is going as false due to boolean default value (though from API perspective by default it is true ). For Sync, it should be true always so used this variable to pass as true.. Can we discuss on this and handle as part of upcoming PR s ?

// Zero indicates value zero for RPO
Zero = "Zero"
// Metro indicates Metro mode
Metro = "METRO"
Copy link
Contributor

Choose a reason for hiding this comment

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

'MetroMode' - to be consistent with other mode names? Or an enum that defines the modes.

lukeatdell
lukeatdell previously approved these changes Sep 30, 2024
@lukeatdell lukeatdell self-requested a review September 30, 2024 15:12
@lukeatdell lukeatdell dismissed their stale review September 30, 2024 15:13

please address comments by @santhoshatdell

Copy link
Contributor

@AkshaySainiDell AkshaySainiDell left a comment

Choose a reason for hiding this comment

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

LGTM

@rajendraindukuri rajendraindukuri merged commit d445d01 into main Sep 30, 2024
5 checks passed
@santhoshatdell santhoshatdell deleted the support-sync-replication-changes branch October 10, 2024 17:58
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.

6 participants