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

[Bug]: equinix_metal_device loses track of existing devices when provisioning fails #793

Open
ctreatma opened this issue Oct 3, 2024 · 0 comments · May be fixed by #792
Open

[Bug]: equinix_metal_device loses track of existing devices when provisioning fails #793

ctreatma opened this issue Oct 3, 2024 · 0 comments · May be fixed by #792
Labels
bug Something isn't working

Comments

@ctreatma
Copy link
Contributor

ctreatma commented Oct 3, 2024

Terraform Version

any

Equinix Provider Version

any

Effected Terraform Resources

equinix_metal_device

Terraform Config Files

No response

Debug Output

No response

Panic Output

No response

Expected Behavior

While provisioning some devices on hardware reservations using next-available, I ran into hard-to-resolve deployment failures:

  1. The initial deployment timed out while the device was provisioning, causing the Equinix TF provider to explicitly remove the device from state
  2. The second terraform run attempted to deploy a completely new device, but did not destroy the device from step 1 because it didn't know about that device
  3. The second terraform run failed because I had no more reservations available

Terraform should keep a device in state when provisioning fails so that it can be cleaned up automatically on the next terraform run.

Actual Behavior

To resolve this, I had to go into the Metal console and manually delete the old servers to free up the reservations.

Steps to Reproduce

This is tricky to reproduce because it requires a deployment to run longer than the default 30-minute provisioning wait timer for equinix_metal_device. If you can figure out how to reliably trigger such a deployment, you can deploy a Metal device using next-available hardware reservation over and over until you run out of reservations.

@ctreatma ctreatma added the bug Something isn't working label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant