This page explains how to set up a new experiment template for Failover Cloud SQL.
This fault lets you failover from a primary to a replica instance of HA Cloud SQL.
Before proceeding, you must have the following:
- Permission to view Cloud SQL instances in the project.
- Fault Injection Testing API enabled for the project.
- The
roles/faulttesting.operatorrole.
To create a new experiment template, do the following:
- Open the Google Cloud console.
- Navigate to the Fault Injection Testing Overview page.
- Select Create experiment template.
- Alternatively, from the Fault Injection Testing Overview page, click Experiment templates on the left navigation bar, and click Create Template.
- In the Fault Type section, select the Failover Cloud SQL option.
- In the Target section, use the filters and select a single instance. NOTE: For Cloud SQL, when an experiment is stopped, the database will continue to run in the secondary zone and it will not automatically revert to running in the initial primary zone. If you want to fail back the instance, you can do so manually or by running another experiment targeting the newly failed-over instance.
- The duration field in the Duration section is non-editable, and set to 3 minutes.
- In the Template name section, provide a clear and descriptive name for the template. Optionally provide details in the description.
- In the Verify section:
- See a recap of the settings you selected.
- Wait for the automated dry run to finish.
- After the dry run is complete, the list of resources that will receive the fault injection appears. If there are errors with the targeted resources, they will also appear here.
- Create the experiment template. A confirmation message indicating that the template has been created appears, and the new template shows up in the list of templates.
What's next
Run an experiment using the experiment template you created.