Tips and troubleshooting

The following sections might help you if you run into problems while using Deployment Manager.

Common errors during deployments

The errors that you see in your deployments are in the following format:

- code: ERROR_CODE
  location: /path/to/template
  message: "{"Error message"}"

The types of errors you might commonly see are described in the following sections.

Resource errors (code: RESOURCE_ERROR)

Resource errors are propagated from the underlying APIs for the resources that you are managing with Deployment Manager. For example, if your deployment has a Compute Engine VM instance, and there was an error creating the instance, you see that error as a resource error in Deployment Manager.

In the Deployment Manager response, you can see the error from the underlying API in the message.ResourceErrorCode and message.ResourceErrorMessage fields.

Validation errors (code: CONDITION_NOT_MET)

You get a validation error when a field in your configuration fails validation, such as if it uses a string value when a boolean is expected.

Dependency loops (code: CYCLIC_REFERENCES)

Indicates that your configuration has a dependency loop. For example, if resource A depends on resource B, B depends on C, and C depends on A.

The error message shows the resources that are in the dependency loop.

You might see dependencies in resources in the following scenarios:

  • A reference to a property of another resource. For example, if your deployment has an instance group manager that uses an instance template from the same deployment, the instance group manager implicitly depends on the instance template. Deployment Manager creates the instance template first, then creates the instance group manager.

  • An explicit dependsOn property, which indicates that the current resource must be created after the resource it depends on.

To resolve the error, change the references or dependsOn properties so that the loop is broken.

Errors while expanding your templates

Your templates are limited in the amount of time and resources that Deployment Manager uses to expand the templates into a single configuration.

You might see one of the following errors:

  • MANIFEST_EXPANSION_TOO_MUCH_CPU: Expanding the configuration took too much CPU.
  • MANIFEST_EXPANSION_TOO_MUCH_MEMORY: Expanding the configuration took too much memory.
  • MANIFEST_EXPANSION_TOO_MUCH_WALL_TIME: Expanding the configuration took too much time.
  • MANIFEST_EXPANSION_USER_ERROR: There was an error in your configuration or one of your templates.

MANIFEST_EXPANSION_TOO_MUCH_CPU and MANIFEST_EXPANSION_TOO_MUCH_MEMORY might indicate that your templates might have complex structures involving recursion, or too many loops.

To resolve these errors, consider splitting your templates into smaller templates, or simplifying your templates.