Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove action when relocate completes
Once relocate completes it is pointless to keep the drpc in "Relocate" phase. Removing the action switch to "Deployed" phase. This solve the annoying error when trying to deploy after relocate completes: drenv.commands.Error: Command failed: command: ('kubectl', 'wait', '--context', 'hub', 'drpc/busybox-drpc', '--for=jsonpath={.status.phase}=Deployed', '--namespace=busybox-sample', '--timeout=60s') exitcode: 1 error: error: timed out waiting for the condition on drplacementcontrols/busybox-drpc Example relocate flow: $ test/basic-test/relocate --cluster dr1 test/envs/regional-dr.yaml 2023-07-09 23:29:48,746 INFO [relocate] Relocate to cluster 'dr1' 2023-07-09 23:29:48,746 INFO [relocate] Waiting until peer is ready 2023-07-09 23:29:48,892 INFO [relocate] Waiting until application is replicated 2023-07-09 23:29:48,942 INFO [relocate] Starting relocate 2023-07-09 23:29:49,017 INFO [relocate] Waiting until application is relocated... 2023-07-09 23:31:30,047 INFO [relocate] Waiting until relocation completes... 2023-07-09 23:31:58,116 INFO [relocate] Ending relocate action 2023-07-09 23:31:58,179 INFO [relocate] Waiting until drpc is deployed 2023-07-09 23:31:58,324 INFO [relocate] Application was relocated to cluster dr1 successfully Example drpc states during this run (redacted): $ kubectl get drpc -n busybox-sample --context hub -o wide -w DESIREDSTATE CURRENTSTATE PROGRESSION START TIME DURATION PEER READY Deployed Completed 2023-07-09T20:26:52Z 2m8.156661282s True Relocate Deployed Completed 2023-07-09T20:26:52Z 2m8.156661282s True Relocate Initiating PreparingFinalSync 2023-07-09T20:29:49Z True Relocate Relocating RunningFinalSync 2023-07-09T20:29:49Z False Relocate Relocating EnsuringVolumesAreSecondary 2023-07-09T20:29:49Z False Relocate Relocating WaitingForResourceRestore 2023-07-09T20:29:49Z False Relocate Relocating WaitingForResourceRestore 2023-07-09T20:29:49Z False Relocate Relocating WaitingForResourceRestore 2023-07-09T20:29:49Z False Relocate Relocated UpdatedPlacement 2023-07-09T20:29:49Z True Relocate Relocated Cleaning Up 2023-07-09T20:29:49Z True Relocate Relocated Completed 2023-07-09T20:29:49Z 2m9.091104326s True Relocated Completed 2023-07-09T20:29:49Z 2m9.091104326s True Deployed Completed 2023-07-09T20:29:49Z 2m9.091104326s True Signed-off-by: Nir Soffer <nsoffer@redhat.com>
- Loading branch information