DRPC API Extension: Add TestFailover action#2416
DRPC API Extension: Add TestFailover action#2416am-agrawa wants to merge 7 commits intoRamenDR:mainfrom
Conversation
dbe6a08 to
0b2ae9a
Compare
Signed-off-by: Aman Agrawal <[email protected]>
577b2df to
dcaf8c5
Compare
| } | ||
| } | ||
|
|
||
| func (d *DRPCInstance) convertStateForTestIfNeeded(nextState rmn.DRState) rmn.DRState { |
There was a problem hiding this comment.
Change the function name to be something like adjustPhaseIfTestFailover
| return nextState | ||
| } | ||
|
|
||
| func getTestFailoverPhase(nextState rmn.DRState) rmn.DRState { |
There was a problem hiding this comment.
and how about this one? I would change it to mapPhaseForTestFailover.
In that case, you would get something like:
adjustPhaseIfTestFailover --> mapPhaseForTestFailover
One is conditional, the other one is basically do it
24c4987 to
660c4b6
Compare
| ProgressionDeleting = ProgressionStatus("Deleting") | ||
| ProgressionDeleted = ProgressionStatus("Deleted") | ||
| ProgressionActionPaused = ProgressionStatus("Paused") | ||
| ProgressionTestFailover = ProgressionStatus("TestingFailover") |
There was a problem hiding this comment.
Keep the same patter naming. The progression variable is named as: Progression + progression name.
so use ProgressionTestingFailover instead of ProgressionTestFailover.
7df83e6 to
4e1c0d8
Compare
Signed-off-by: Aman Agrawal <[email protected]>
4e1c0d8 to
74dd6ab
Compare
Signed-off-by: Aman Agrawal <[email protected]>
42b70e4 to
fda537b
Compare
…preserve conditions Signed-off-by: Benamar Mekhissi <[email protected]>
|
@am-agrawa I pushed two commits. One fixes a bug I ran into, and the other adds support for the I tested the following order:
All of them return to the previous action cleanly after an |
Introduce non-destructive TestFailover action to verify secondary cluster readiness without committing to failover. - Add VRGActionTestFailover and update CRD enums/YAML - Implement placement logic, cleanup, and action execution refactor - Exclude test primaries from multi-primary checks - Restore original placement decisions after test failover - Treat TestFailover like Failover for resync and VolSync restore - Skip LastAppDeploymentCluster updates during test failover - Improve comments, readability, and lint compliance Signed-off-by: Benamar Mekhissi <[email protected]>
0b09a0a to
bb49337
Compare
bb49337 to
0b09a0a
Compare
3e3f99c to
bb49337
Compare
Replace the separate ActionTestFailover action type with a simpler attribute-based approach using a DryRun boolean field. This cleaner design separates concerns: - Action Failover indicates the operation to perform - DryRun boolean indicates if the operation should be non-destructive/test mode - Progression status (TestingFailover) continues to indicate test mode Changes: - Remove ActionTestFailover from DRAction and VRGAction enums - Remove TestFailover and TestFailedOver DRState constants - Add DryRun field to DRPlacementControlSpec and VolumeReplicationGroupSpec - Update all references to ActionTestFailover to check DryRun flag instead The progression status ProgressionTestingFailover is retained as it provides a unified indicator of test mode across both DRPC and VRG resources.
bb49337 to
db88f3c
Compare
- Upload continues from the primary managed cluster to S3 stores on both sides - Upload stops from the failoverCluster on both S3 when dryRun is set to True when action is Failover Signed-off-by: Aman Agrawal <[email protected]>
No description provided.