saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.14k stars 5.47k forks source link

salt-cloud: Make automatic destruction of VM after create failure optional #46151

Open mark-hyde opened 6 years ago

mark-hyde commented 6 years ago

Description of Issue/Question

If you use salt-cloud -p name_of_vm to create a VM, and during the process of building that VM the salt-cloud is unable to connect to the device, then an exception is raised which deletes the VM.

e.g. https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/openstack.py#L689-L696 https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/nova.py#L998-L1005

The failure may be a consequence of the specific image you are using to build the device, or perhaps an intermittent failure with the underlying infrastructure which needs further investigation.

Given that the device is automatically deleted in these circumstances makes it difficult to investigate the source of the underlying issue, or perform network troubleshooting against the instance since it no longer exists.

It should be possible in these circumstances to disable the automatic destruction of the device

e.g. Have an option in salt-cloud: destroy_vm_on_create_failure: (with a default value of True, but which could be set to False when troubleshooting issues)

Regards Mark

stale[bot] commented 5 years ago

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.

mark-hyde commented 5 years ago

I still think this may be a useful feature.

stale[bot] commented 5 years ago

Thank you for updating this issue. It is no longer marked as stale.

stale[bot] commented 4 years ago

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.

mark-hyde commented 4 years ago

bump

stale[bot] commented 4 years ago

Thank you for updating this issue. It is no longer marked as stale.