-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
salt-cloud (digitalocean provider-specific?): multiple providers with the same personal_access_token
gives errors when deleting a VM
#33439
Comments
@jf would you mind posting the error you are seeing when attempting to delete the VM? |
hey @Ch3LL ! It's actually there in my first "quote". I'll reproduce it here again for clarity:
"vm1" is detected as being in 2 different places when it really is only in 1. |
oh sorry, perhaps you meant the actual error. Hang on... I'll need to create, then delete |
ok, here it is:
|
@Ch3LL just to add on: on the cloud provider's side, it may look like everything has been cleaned up (since the VM is gone). However, the VM still lingers on in salt: |
@jf thanks for all of the additional investigation work. Looks like we need to add the ability to handle multiple providers with the same key on digital ocean. |
No prob, @Ch3LL. Thanks for getting back to me! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Description of Issue/Question
(Note that I haven't tested this to see if this affects other providers as well. Will try to do so tomorrow)
The example in the docs for Digital Ocean (https://docs.saltstack.com/en/latest/topics/cloud/config.html#digitalocean) shows an example where the
location
key is specified in the cloud provider config (instead of the VM profile config). To cater for multiple locations, one would be tempted to use multiple providers, with the only difference beinglocation
. This works, and we get no problems when creating VMs, but when you try to delete a VM,salt-cloud
erroneously sees one VM as being connected to 2 providers (the key here is both providers have the samepersonal_access_token
):Setup
cloud.providers.d/do-provider.conf:
cloud.profiles.d/do-profiles.conf:
Steps to Reproduce Issue
salt-cloud -p do-sg-ubuntu vm1; salt-cloud -d vm1
If the token for
do-ny
is changed, so that both providers are using different tokens,salt-cloud -d vm1
will delete the VM properly without any error messages.Versions Report
The text was updated successfully, but these errors were encountered: