Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consul backend locking not working as expected #17407

Closed
ntrvic opened this issue Feb 21, 2018 · 1 comment · Fixed by #17422
Closed

Consul backend locking not working as expected #17407

ntrvic opened this issue Feb 21, 2018 · 1 comment · Fixed by #17422

Comments

@ntrvic
Copy link

ntrvic commented Feb 21, 2018

I am trying to setup consul as a backend w/ locking.
When I run env CONSUL_HTTP_SSL=true terraform apply -auto-approve=true -lock-timeout=100s -lock=true

and then right after in parallel I run env CONSUL_HTTP_SSL=true terraform apply -auto-approve=true -lock-timeout=100s -lock=true

With instance 2 I see...

Acquiring state lock. This may take a few moments...
data.vsphere_datacenter.datacenter: Refreshing state...
data.vsphere_network.network: Refreshing state...
data.vsphere_datastore.datastore: Refreshing state...
data.vsphere_resource_pool.resource-pool: Refreshing state...
data.vsphere_virtual_machine.template: Refreshing state...
vsphere_virtual_machine.vm: Refreshing state... (ID: 42271ab5-6807-872e-2aab-faf26182bfc2)
Failed to save state: consul CAS failed with transaction errors: [0xc42022c280]

This also occurs with plans and refreshes.

If I try to run again.... I see

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

DEBUG logs

2018-02-21T15:07:21.143-0500 [DEBUG] plugin.terraform-provider-vsphere_v1.1.0_x4: 2018/02/21 15:07:21 [DEBUG] Cloning virtual machine "/DA3/vm/provtest-001.blah.net"
2018/02/21 15:07:21 [ERROR] root.provtest-001: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* vsphere_virtual_machine.vm: error cloning virtual machine: The name 'provtest-001.blah.net' already exists.
2018/02/21 15:07:21 [ERROR] root.provtest-001: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* vsphere_virtual_machine.vm: error cloning virtual machine: The name 'provtest-001.blah.net' already exists.
Failed to save state: consul CAS failed with transaction errors: [0xc420454800]


2018/02/21 15:07:21 [DEBUG] plugin: waiting for all plugin processes to complete...
@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants