hashicorp / nomad-driver-virt

Mozilla Public License 2.0
8 stars 1 forks source link

compute: attempt to destroy the VM when network setup fails. #60

Closed jrasell closed 3 weeks ago

jrasell commented 3 weeks ago

When the Nomad client calls start task and an error is returned, it will not call stop task as there is, from its view, no task to stop.

The driver needs to attempt to rollback any work conducted when starting a task, if a partial failure occurs. In this case it is the network setup that fails, so we must try and destroy the already running VM. Without this, we leak VMs in partial failure modes.