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

Disk replacement not detected #42

Open
martin-huber opened this issue May 11, 2022 · 2 comments
Open

Disk replacement not detected #42

martin-huber opened this issue May 11, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@martin-huber
Copy link

Bug report

Description

  • set up a VM "test_vm" with a disk "disk_of_test_vm" from terraform; this disk will have "initial_uuid"
  • create a new disk "disk_of_test_vm" in the Web UI (for example as the result of a recovered snapshot), with "new_uuid"
  • poweroff the VM in the Web UI
  • unmount the currently mounted "disk_of_test_vm" and mount/attach the newly created "disk_of_test_vm" to it
  • start the VM in the Web UI
  • do a terraform plan

In earlier times, in this situation terraform would have reported a change, afair, but it anyways should detect that difference between the local state and the remote situation.
But it says, that everything is in sync.

If we look into the terraform.tfstate json file, we can see, that:

  • the "disk_of_test_vm" with "initial_uuid" is still present, but its state automatically has been changed to "unmounted"
  • the "test_vm" has a "drive" that still is "initial_uuid" .

We even have written a shell script, that supports us, replacing the "initial_uuid" with the "new_uuid" in situations like the described one in the past;
but if we are not warned about the difference, strange things will happen: for example the attempt to increase the disk from terraform would increase the old, unmounted disk, if it still is present.
And what would terraform plan report, if we would delete the drive with "initial_uuid" ? How would the next plan change the local state ?

Terraform Version

Terraform v1.1.9
on windows_amd64
+ provider registry.terraform.io/cloudsigma/cloudsigma v1.10.1

Affected Resource(s)

  • cloudsigma_server
  • cloudsigma_drive

Expected Behavior

terraform plan should notice the difference between local state and remote situation

Actual Behavior

No difference is detected.

Steps to Reproduce

See in Description

!--- Please keep this note for the community --->

Community Note

  • Please vote on this issue by adding a 👍 reaction
    to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@martin-huber martin-huber added the bug Something isn't working label May 11, 2022
@martin-huber
Copy link
Author

martin-huber commented May 31, 2022

@pavel-github - did you already notice this issue and can confirm the problem from your side ?

@pavel-github
Copy link
Collaborator

@martin-huber, we can confirm that the issue exists on our side.
Will be fixed with the next provider release. Sorry for the inconvenience.

@pavel-github pavel-github self-assigned this Jul 22, 2022
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

No branches or pull requests

2 participants