-
Notifications
You must be signed in to change notification settings - Fork 112
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
Catalog deletion failure returns as success #696
Comments
Thanks for this clear report. |
Were you able to replicate? |
Reproduced by using this sequence of events:
The destruction operation succeeds, but the catalog (and its item) remain in place. |
dataclouder
pushed a commit
to dataclouder/terraform-provider-vcd
that referenced
this issue
Jul 28, 2021
* Fix Issue vmware#648 adding a storage profile requires the vdc to be replaced * Fix Issue vmware#696 Catalog deletion failure returns as success Signed-off-by: Giuseppe Maxia <gmaxia@vmware.com>
The behavior is fixed in PR #698.
|
dataclouder
added a commit
that referenced
this issue
Aug 6, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
The scenario where the bug occurs is when I create a vcd_catalog and upload a local ovf file using vcd_catalog_item. Lets say for whatever reason, kernel dies or you manually (ctrl + c). The file is still uploading. Currently my script calls
terraform destroy
before any actions to remove any existing code.So if the file is still uploading, the terraform destroy call will try to delete the catalog. VCD will fail in deleting that catalog as there is a pending template upload, but terraform will return it as deleted. So, now the catalog still exists in VCD, but it no longer exists in terraform .tfstate. Therefore, we would have to manually go and delete the catalog.
The only way to work around this is to let the file upload finish. Should terraform not fail to delete the catalog too?
Terraform Version
Terraform v1.0.2
Affected Resource(s)
Please list the resources as a list, for example:
Expected Behavior
Terraform should have returned
failed to delete catalog
Actual Behavior
Terraform succeeded in deleting catalog, but in actuality, VCD denied the request as there was a pending ovf file uploading within the catalog
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
ctrl + c
terraform destroy
before OVF file has finished uploadingThe text was updated successfully, but these errors were encountered: