You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
** Decide on semantics **
- Is salt-cloud (meant to be) idempotent? It currently is not in proxmox.py
- Should salt-cloud fail if a machine exists? It currently does.
- Should salt-cloud fail if the VM ID exists? In proxmox.py it currently does (once we implement this feature, see )
Describe the solution you'd like
Unsure.
Additional context
Calling salt-cloud -p myprofile myguest fails if myguest exists. Is this expected behavior?
The text was updated successfully, but these errors were encountered:
I don't think that salt-cloud in general or rather cloud providers should be idempotent. What should be idempotent is the use of the Cloud Map File in salt-cloud.
Cloud maps let you define a map of your infrastructure and quickly provision any number of VMs. On subsequent runs, any VMs that do not exist are created, and VMs that are already configured are left unmodified.
I did not find such a definition anywhere for the creation of VMs via salt-cloud -p.
So my answers to your questions are:
No, proxmox.py should not be idempotent. Idempotence is handled through Cloud map files.
Yes, trying to create a new machine that already exists via salt-cloud -p should fail.
Yes, trying to create a new machine with an already existing VM ID via salt-cloud -p should fail.
True idempotence likely won't be achieved in the cloud module without changes to the underlying salt-cloud code. Currently, salt-cloud will create any instances where the name is not found in the cloud. If the name is found, it will not be created. If the configuration is changed for a given instance, the instance will need to be destroyed and created again for the change to take effect. Instance configuration cannot be enforced with salt-cloud.
That said, there's no reason that we can't create execution and state modules for idempotent creation and maintenance of cloud instances. There was a push toward this in a recent release of the Azure Extension.
** Decide on semantics **
- Is salt-cloud (meant to be) idempotent? It currently is not in proxmox.py
- Should salt-cloud fail if a machine exists? It currently does.
- Should salt-cloud fail if the VM ID exists? In proxmox.py it currently does (once we implement this feature, see )
Describe the solution you'd like
Unsure.
Additional context
Calling
salt-cloud -p myprofile myguest
fails ifmyguest
exists. Is this expected behavior?The text was updated successfully, but these errors were encountered: