I’m building some tools into my company’s intranet web app that will allow running VPG failovers and tests of failovers by making calls to the API behind the scenes. It’s clear that I would call the VPG test endpoint to start a test:
But it’s not entirely clear what to call when we want to end the test. It seems like:
Stop VPG test
Might be correct – is it? Is there any more verbose documentation about what processes the stop runs?
Does the stop clean up the scratch disk, is there another process that will trigger that or is there a need for a manual component from our support?
Follow up on this. From what I can tell, I do want to call that endpoint. However, one wrinkle is that it’s not clear how to determine via the API if a failover test is currently running.
The task that I get back after initiating a failoverTest gives me info on when that task is complete. But the failover is still running until it’s stopped either by an API call, Zerto interface or other method. So my app doesn’t know if the test was stopped outside of the app, or how to check. However, if there is any test running, running a failover test from the API will fail.
Great question! You can check if an FailOver test is running by pulling the status of the VPG using the VPG API. It is a bit hidden but if you poll the status it will return, in the very beginning of the response, something like this (if you are using JSON):
"Stage": "String content"
From our documentation you can see that it can have 3 stages:
The current stage of an operation being performed on the VPG.
The operation being performed.
The stage of the running operation:
InTest: The VPG is in a failover test operation.
Starting: The VPG virtual machines in the recovery site are being initialized for a failover test.
Stopping: The recovery site is being cleaned up after a failover test of the VPG.
Hope this helps!