xenapi: Fix reboot with hung volumes
xenapi: Fix reboot with hung volumes

If a volume becomes inoperable (e.g. the ISCSI connection is severed)
and the user goes to reboot, the instance may enter a permanently halted
state.

The root cause is that a VBD that points to 'bad' volume prevents VM
operations ('reboot', 'start') from completing under XenServer.

The work around is to detect which volumes are bad, detach in the
virt-layer, retry the operation (or in the case of reboot, just 'start'
the halted instance), and then notify the compute manager via a
callback so it can detach the volume in Cinder.

Fixes bug 1148614

Change-Id: Id4e8e84bb5748cfa267c2a418f9405fd86829e8f

dims/ironic,rdo-management/ironic,SauloAislan/ironic,citrix-openstack-build/ironic,bacaldwell/ironic,emonty/ironic,citrix-openstack-build/ironic,varunarya10/ironic,naterh/ironic,pshchelo/ironic,froyobin/ironic,openstack/ironic-lib,openstack/ironic,faizan-barmawer/elytics,NaohiroTamura/ironic-lib,devananda/ironic,debayanray/ironic_backup,SauloAislan/ironic,supermari0/ironic,ramineni/myironic,NaohiroTamura/ironic,bacaldwell/ironic,faizan-barmawer/ironic-lib,Tehsmash/ironic,dims/ironic,NaohiroTamura/ironic,redhat-openstack/ironic,faizan-barmawer/openstack_ironic,hpproliant/ironic,openstack/ironic,rackerlabs/ironic,ionutbalutoiu/ironic,citrix-openstack-build/ironic-lib,ionutbalutoiu/ironic,Tan0/ironic,naototty/vagrant-lxc-ironic,JioCloud/ironic,naototty/vagrant-lxc-ironic,pshchelo/ironic