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.
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.