This repository has been archived by the owner on Dec 5, 2020. It is now read-only.
if failure with timeout for creating rancher_stack while stack is in activating state, retrying causes "notunique" error #26
Labels
Terraform Version v0.10.0-rc1-dev
Rancher Provider v0.1.1
Rancher Server 1.6
Affected Resource(s)
rancher_stack
Terraform Configuration Files
Mainly need start_on_create to be true and "io.rancher.container.pull_image: "always" as label in docker-compose file and something to cause timeout (large docker image, many images in stack, slow network, etc).
Expected Behavior
Should be able to run script again after first failure and not fail due to stack already existing
Actual Behavior
Failed with "NotUnique" error for stack 'name' field
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
rancher_stack.microservices: Error waiting for stack (1st257) to be created: timeout while waiting for state to become 'active' (last state: 'activating', timeout: 10m0s)
terraform apply
againmodule.utilities.rancher_stack.microservices: Creating...
rancher_stack.microservices: Bad response statusCode [422]. Status [422 ???]. Body: [code=NotUnique, fieldName=name, baseType=error] from [......]
Important Factoids
Issue seems to be that even though the stack was created the state file assumes it was not because it did not get to active state. I can think of a few possibilities:
I favor number 3.
Side note: would love to be able to override timeout on rancher items such as rancher_stack. Can open another issue if you think this is valid request.
The text was updated successfully, but these errors were encountered: