Skip to content

Changes to support sync replication for Powerstore#348

Merged
rajendraindukuri merged 5 commits into
mainfrom
support-sync-replication-changes
Sep 30, 2024
Merged

Changes to support sync replication for Powerstore#348
rajendraindukuri merged 5 commits into
mainfrom
support-sync-replication-changes

Conversation

@rajendraindukuri

@rajendraindukuri rajendraindukuri commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

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 #
https://github.com/dell/csm/issues/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

@santhoshatdell santhoshatdell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please address lint errors.

Comment thread pkg/controller/controller.go
Comment thread pkg/controller/controller.go Outdated
@rajendraindukuri

Copy link
Copy Markdown
Contributor Author

Please address lint errors.

Addressed

Comment thread pkg/controller/controller.go Outdated
Comment thread pkg/controller/controller.go
HarishH-DELL
HarishH-DELL previously approved these changes Sep 30, 2024

@adarsh-dell adarsh-dell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 ?

Comment thread pkg/common/common.go
// Zero indicates value zero for RPO
Zero = "Zero"
// Metro indicates Metro mode
Metro = "METRO"

Copy link
Copy Markdown
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

@AkshaySainiDell AkshaySainiDell left a comment

Copy link
Copy Markdown
Contributor

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
@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