cloud-portal
cloud-portal copied to clipboard
Catch blocking bootstrap scripts
What: Setting a bootstrap script that blocks execution of the provisioning process may result in orphaned VMs, that are not shown in the list of deployes VMs and therefore can't be deleted.
Steps to reproduce: ~~Use sudo in a bootstrap script. When sudo asks interactively for a password the execution will be blocked.~~
Use apt install without the -y flag which blocks until interactive confirmation occurs in a bootstrap script. This is just an example that should block the provisioning. In productions this may occur in a variety of cases with other commands.
Possible Fix: Show VMs in "Still Provisioning" state in the list of VMs and make it possible to open the provisioning log and to cancel provisioning.
The usage of sudo commands should be possible without blocking the script. There must be something else which blocks the execution. Can you add an example script which is not working?
The rollback in such a case could also be quite hard because the Terraform state may be not complete to execute the destroy command.
After rechecking it wasn't a sudo command that blocked provisioning. First comment was updated accordingly.