TRITON-2311: provision failures can leave vms without a server_uuid


Issue Type:Bug
Priority:5 - Low
Created at:2022-06-01T13:06:31.429Z
Updated at:2022-06-01T13:11:18.978Z


Created by:Nick Wilkens
Reported by:Nick Wilkens


Provisioning of a VM failed because sdcadm post-setup underlay-nics ... command was not ran after the server was setup. Now, the vm is stuck 'provisioning', and can not be removed via adminUI.

sdc-vm delete UUID shows the following error: "Cannot delete a VM with no server_uuid".

sdc-vmapi /vms/<UUID> does not contain server_uuid

Steps to reproduce

In an existing Triton environment with fabric networks already configured:

  1. deploy a new CN, but do not run sdcadm post-setup underlay-nics command.
  2. Attempt to deploy a VM to this newly setup CN.

Workaround to remove stuck VM
We set the server_uuid on the VM that is stuck using:
sdc-vmapi /vms/<VM UUID> -X PUT -d '{"server_uuid":"<server_uuid>"}'

We then ask to sync the VM again, and it should mark it as destroyed:
sdc-vmapi /vms/<VM UUID>?sync=true