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

Error when deleting a VM that was not created properly #91

Closed
mueller-tobias opened this issue Sep 4, 2023 · 1 comment
Closed

Error when deleting a VM that was not created properly #91

mueller-tobias opened this issue Sep 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mueller-tobias
Copy link

Description

If the creation of a VM fails because of a missing configuration before it is created in the DCD, then deleting the machine CRD fails because the driver tries to delete a NIC that has never been created.

Don't know whats the best solution, but i think you should check if the resources exists before removal. If it's not existing the code shouln't run in an error.

Expected behavior

A VM that can't created properly should be removed without to remove finalizers on the Machine CRD.

Environment

Docker Machine Driver Ionos Cloud version:

7.0.

How to Reproduce

  • Create a Cluster with a false configuration. For example an Image that dosn't exists.
  • The Job with the Node Driver will fail (no VM or NIC is created in the DCD), and when rancher tries do delete the VM the Job with the Docker Machine Driver fails, because he tries to remove a NIC that wasn't yet created. Maybe the same error will happen to the VM if you fix the bug with the nic removal. And it will try to remove a VM thats not created due to an configuration error.

Error and Debug Output

Downloading driver from https://rancher.kogo4ic.de/assets/docker-machine-driver-ionoscloud
2023-09-04T06:40:48.003989777Z Doing /etc/rancher/ssl
docker-machine-driver-ionoscloud
docker-machine-driver-ionoscloud: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
About to remove ionos-driver-test-pool1-2e27aa9d-b52jt
WARNING: This action will delete both local reference and remote instance.
2023-09-04T06:40:50.449098409Z (ionos-driver-test-pool1-2e27aa9d-b52jt) NOTICE: Please check IONOS Cloud Console/CLI to ensure there are no leftover resources.
2023-09-04T06:40:50.449134111Z (ionos-driver-test-pool1-2e27aa9d-b52jt) Starting deleting resources...
Error removing host "ionos-driver-test-pool1-2e27aa9d-b52jt": 3 errors occurred:
2023-09-04T06:40:50.648391866Z 	* error deleting NIC: Resource does not exist
	* error removing volume: Http method 'DELETE' not allowed. Expected one of [POST,GET,OPTIONS]
2023-09-04T06:40:50.648416983Z 	* error deleting server: Http method 'DELETE' not allowed. Expected one of [POST,GET,OPTIONS]
@rmocanu-ionos
Copy link
Contributor

Hello,
This should be fixed in the new release, v7.0.2
https://github.com/ionos-cloud/docker-machine-driver/releases/tag/v7.0.2

Please let us know if the problem persists.

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.

3 participants