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

fixes #712 : destroy container fails "500 CT not running" #728

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

btorresgil
Copy link
Contributor

Fixes #712

Previous behavior

Destroy attempts to stop VM even if it's currently stopped. API return HTTP status 500 (see below) which is returned to provider causing it to error out.

HTTP/1.1 500 CT 110 not running
Connection: close
Content-Length: 13
Cache-Control: max-age=0
Content-Type: application/json;charset=UTF-8
Date: Wed, 22 Mar 2023 21:55:11 GMT
Expires: Wed, 22 Mar 2023 21:55:11 GMT
Pragma: no-cache
Server: pve-api-daemon/3.0

{"data":null}

New behavior

Destroy checks if VM is running or stopped and only attempts to stop the VM if status is currently running.

@btorresgil
Copy link
Contributor Author

Note: much easier to read diff with 'Hide whitespace' enabled. Very few lines actually changed, but indentation changed on several lines to accommodate new behavior.

@mleone87
Copy link
Collaborator

nice spot, thanks

@mleone87 mleone87 merged commit 6447d43 into Telmate:master Mar 30, 2023
@coaxial
Copy link

coaxial commented May 18, 2023

Thanks. Any idea when this will be released to the Terraform registry?

@maxkratz
Copy link

Any schedule to release a new version of the provider to include this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Destroy container fails with "500 CT not running" error
4 participants