Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for registration errors before starting provisioning
Errors in the Provisioning state are assumed to be provisioning errors, which the controller will deal with by deprovisioning the Host. To reduce the incidence of this misclassification, check for registration errors before allowing the Host to move from the Ready state to Provisioning. This ensures that any errors seen in the Provisioning state occurred during provisioning and don't pre-date entry to that state. However, since typical usage of the API is to set an image to provision and toggle the power state on at the same time, do not manage the host power if the host needs provisioning - we don't wish to power the host on if it was off only to have to start the provisioning process (which also needs to manipulate the host power) immediately.
- Loading branch information