Add new replication parameter 'mode' to storage class#341
Merged
Conversation
lukeatdell
approved these changes
Sep 3, 2024
donatwork
approved these changes
Sep 3, 2024
| case "SYNC", "ASYNC": | ||
| // handle Sync and Async modes | ||
| log.Infof("%s replication mode requested", repMode) | ||
| vgPrefix, ok := params[s.WithRP(KeyReplicationVGPrefix)] |
Contributor
There was a problem hiding this comment.
Are we always using volume groups?
Contributor
Author
There was a problem hiding this comment.
Yes. I made a comment in the Metro section to optimize the volume group calls as we add the metro calls in later PRs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added new replication parameter 'mode' to storage class. The replication mode values can be sync/async/metro.
Default is 'Async' to support backwards compatibility.
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Performed volume creations with just the driver and made sure that the new code works as expected and backward compatibility is not broken.
PV without any replication parameters created successfully.
Driver log:
when invalid mode is specified in the Storage Class
Warning ProvisioningFailed 14s (x7 over 77s) csi-powerstore.dellemc.com_powerstore-controller-567bc8ff4c-8qxmf_3b81a379-e9ec-4831-b6c0-370f1ae08627 failed to provision volume with StorageClass "powerstore-replication-invalid": rpc error: code = InvalidArgument desc = replication enabled but invalid replication mode specified in storage class
when Metro mode is specified in the Storage Class
{"level":"info","msg":"Preparing volume replication","time":"2024-09-03T16:33:42.866888418Z"}
{"level":"info","msg":"Metro replication mode requested","time":"2024-09-03T16:33:42.866908807Z"}
when no mode or Async is specified in the Storage Class
{"level":"info","msg":"Preparing volume replication","time":"2024-09-03T16:43:02.25396221Z"}
{"level":"info","msg":"ASYNC replication mode requested","time":"2024-09-03T16:43:02.253974847Z"}