Set up an experiment for Fail Compute

This page explains how to set up a new experiment template for Fail Compute fault. This fault lets you fail compute resources for individual VMs or entire Managed Instance Groups (MIGs) of VMs.

Before proceeding, you must have the following:

  • The roles/faulttesting.operator role.

To create a new experiment template, do the following:

  1. Open the Google Cloud console.
  2. Navigate to the Fault Injection Testing Overview page.
  3. Select Create experiment template.
    • Alternatively, from the Fault Injection Testing Overview page, click Experiment templates on the left navigation bar, and click Create Template.
  4. In the Fault Type section, select Fail Compute, then the GCE option.
  5. In the Target section:
    1. Choose a target type.
      • Individual VMs. Isolates specified virtual machine instances. Individually specified VMs cannot be part of a Managed Instance Group (MIG).
      • All VMs with a given secure tag. Targets VMs based on a specified secure tag and GCE region.
        • You must apply the tag outside of the Fault Injection Testing interface before the experiment is created.
        • Tagged VMs cannot be part of a MIG, and any tagged VMs outside of the experiment's region will be excluded from the test.
        • Ensure that the Cloud Asset API is enabled. Fault Injection Testing uses this API to discover tagged VMs.
        • The firewall policy used to block traffic won't reference this tag directly. Targeted VMs will be bound to a new, experiment-specific tag for the duration of the experiment.
      • All VMs in a zonal MIG. Targets VMs within a specified zonal MIG. Autoscaling and autohealing for the MIG will be disabled for the duration of the test.
      • All VMs in a regional MIG. Targets VMs within a specified regional MIG. Autoscaling and autohealing for the MIG will be disabled for the duration of the test.
      • All VMs in a zone. Targets all non-MIG VMs and zonal MIGs in the specified zone.
        • Regional MIGs won't be included, even if they have components in that zone.
        • Affected zonal MIGs will have autoscaling and autohealing disabled for the duration of the test.
        • Ensure that the Cloud Asset API is enabled because Fault Injection Testing uses the API to discover MIGs and VMs in the specified zone.
      • All VMs in a region. Targets all non-MIG VMs and all MIGs (both zonal and regional) within the selected region.
        • Autoscaling and autohealing will be disabled for all affected MIGs for the duration of the test.
  6. Ensure that the CAIS API is enabled because Fault Injection Testing uses the API to discover MIGs and VMs in the specified region.
  7. Set the Duration to how long the experiment should run.
  8. In the Template name section, provide a clear and descriptive name for the template. Optionally provide details in the description.
  9. In the Verify section:
    1. See a recap of the settings you selected.
    2. Wait for the automated dry run to finish.
    3. 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.
  10. 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.

For details on how the Fail Compute fault behaves, see the Fail Compute fault reference.

What's next

Run an experiment using the experiment template you created.