Re-define libvirt domain on "not found" exception
Re-define libvirt domain on "not found" exception

Fixes bug 1039891

If for any reason a libvirt-based VM becomes unregistered, there is
currently no mechanism for recovering without administrative
intervention. Discussing this with Vish, we agreed it was prudent to
validate and accordingly define domains with libvirt on hard_reboot or
hypervisor reboot.

This patch will allow hard_reboot to re-define a domain in the event
that a "domain not found" exception is returned from libvirt.  The
same approach is also applied to resume_state_on_host_boot.

Change-Id: Ic0cd59087d3d84787173fdd9eefdb77b67c33995

j-carpentier/nova,edulramirez/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,maoy/zknova,mmnelemane/nova,cloudbase/nova,orbitfp7/nova,houshengbo/nova_vmware_compute_driver,klmitch/nova,CloudServer/nova,citrix-openstack-build/nova,CEG-FYP-OpenStack/scheduler,adelina-t/nova,affo/nova,isyippee/nova,apporc/nova,shootstar/novatest,ruslanloman/nova,vmturbo/nova,mahak/nova,savi-dev/nova,maheshp/novatest,akash1808/nova_test_latest,zzicewind/nova,houshengbo/nova_vmware_compute_driver,petrutlucian94/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,Juniper/nova,vmturbo/nova,jianghuaw/nova,akash1808/nova,openstack/nova,alexandrucoman/vbox-nova-driver,felixma/nova,takeshineshiro/nova,TwinkleChawla/nova,silenceli/nova,joker946/nova,Metaswitch/calico-nova,Juniper/nova,rahulunair/nova,rajalokan/nova,projectcalico/calico-nova,cloudbase/nova-virtualbox,eonpatapon/nova,JianyuWang/nova,CCI-MOC/nova,vladikr/nova_drafts,rajalokan/nova,angdraug/nova,klmitch/nova,gooddata/openstack-nova,blueboxgroup/nova,CloudServer/nova,double12gzh/nova,ntt-sic/nova,rrader/nova-docker-plugin,ted-gould/nova,devendermishrajio/nova,angdraug/nova,bclau/nova,yatinkumbhare/openstack-nova,shootstar/novatest,NewpTone/stacklab-nova,rahulunair/nova,paulmathews/nova,shail2810/nova,spring-week-topos/nova-week,vladikr/nova_drafts,akash1808/nova,virtualopensystems/nova,JianyuWang/nova,klmitch/nova,MountainWei/nova,blueboxgroup/nova,bclau/nova,openstack/nova,fnordahl/nova,LoHChina/nova,affo/nova,tianweizhang/nova,zhimin711/nova,imsplitbit/nova,sacharya/nova,dims/nova,paulmathews/nova,cyx1231st/nova,ted-gould/nova,sridevikoushik31/nova,imsplitbit/nova,badock/nova,hanlind/nova,NeCTAR-RC/nova,jianghuaw/nova,fajoy/nova,scripnichenko/nova,ewindisch/nova,rickerc/nova_audit,bgxavier/nova,TieWei/nova,gooddata/openstack-nova,OpenAcademy-OpenStack/nova-scheduler,ewindisch/nova,jianghuaw/nova,JioCloud/nova_test_latest,tealover/nova,watonyweng/nova,Stavitsky/nova,sridevikoushik31/nova,sridevikoushik31/openstack,savi-dev/nova,adelina-t/nova,thomasem/nova,maoy/zknova,sebrandon1/nova,nikesh-mahalka/nova,NeCTAR-RC/nova,apporc/nova,JioCloud/nova_test_latest,gspilio/nova,devoid/nova,zzicewind/nova,kimjaejoong/nova,SUSE-Cloud/nova,aristanetworks/arista-ovs-nova,SUSE-Cloud/nova,dawnpower/nova,iuliat/nova,takeshineshiro/nova,JioCloud/nova,luogangyi/bcec-nova,gspilio/nova,paulmathews/nova,tealover/nova,shahar-stratoscale/nova,dstroppa/openstack-smartos-nova-grizzly,raildo/nova,bigswitch/nova,mandeepdhami/nova,ntt-sic/nova,yrobla/nova,petrutlucian94/nova,redhat-openstack/nova,qwefi/nova,dstroppa/openstack-smartos-nova-grizzly,yrobla/nova,projectcalico/calico-nova,phenoxim/nova,gooddata/openstack-nova,alaski/nova,eharney/nova,rahulunair/nova,qwefi/nova,tanglei528/nova,cloudbase/nova,CiscoSystems/nova,varunarya10/nova_test_latest,JioCloud/nova,shahar-stratoscale/nova,BeyondTheClouds/nova,gspilio/nova,isyippee/nova,virtualopensystems/nova,jianghuaw/nova,eayunstack/nova,thomasem/nova,tangfeixiong/nova,tudorvio/nova,houshengbo/nova_vmware_compute_driver,mahak/nova,sridevikoushik31/nova,Triv90/Nova,Tehsmash/nova,redhat-openstack/nova,cernops/nova,bgxavier/nova,noironetworks/nova,shail2810/nova,badock/nova,zhimin711/nova,tudorvio/nova,klmitch/nova,cloudbau/nova,CiscoSystems/nova,zaina/nova,cernops/nova,cloudbau/nova,Juniper/nova,alvarolopez/nova,cyx1231st/nova,vmturbo/nova,jeffrey4l/nova,spring-week-topos/nova-week,usc-isi/nova,cernops/nova,felixma/nova,DirectXMan12/nova-hacking,leilihh/novaha,whitepages/nova,tanglei528/nova,maelnor/nova,Francis-Liu/animated-broccoli,rickerc/nova_audit,aristanetworks/arista-ovs-nova,cloudbase/nova-virtualbox,Metaswitch/calico-nova,watonyweng/nova,maheshp/novatest,TwinkleChawla/nova,berrange/nova,sridevikoushik31/openstack,hanlind/nova,devendermishrajio/nova_test_latest,berrange/nova,Triv90/Nova,tangfeixiong/nova,NewpTone/stacklab-nova,maelnor/nova,sebrandon1/nova,belmiromoreira/nova,eharney/nova,Yuriy-Leonov/nova,yatinkumbhare/openstack-nova,Yuriy-Leonov/nova,CCI-MOC/nova,devendermishrajio/nova,OpenAcademy-OpenStack/nova-scheduler,plumgrid/plumgrid-nova,CEG-FYP-OpenStack/scheduler,petrutlucian94/nova_dev,mikalstill/nova,orbitfp7/nova,barnsnake351/nova,Triv90/Nova,double12gzh/nova,noironetworks/nova,leilihh/nova,sridevikoushik31/nova,barnsnake351/nova,aristanetworks/arista-ovs-nova,bigswitch/nova,iuliat/nova,alvarolopez/nova,citrix-openstack-build/nova,whitepages/nova,joker946/nova,NewpTone/stacklab-nova,fajoy/nova,sridevikoushik31/openstack,saleemjaveds/https-github.com-openstack-nova,DirectXMan12/nova-hacking,fnordahl/nova,mgagne/nova,ruslanloman/nova,akash1808/nova_test_latest,openstack/nova,fajoy/nova,yosshy/nova,yrobla/nova,MountainWei/nova,j-carpentier/nova,kimjaejoong/nova,LoHChina/nova,rajalokan/nova,Stavitsky/nova,leilihh/nova,viggates/nova,Francis-Liu/animated-broccoli,yosshy/nova,maheshp/novatest,mandeepdhami/nova,devendermishrajio/nova_test_latest,viggates/nova,plumgrid/plumgrid-nova,eonpatapon/nova,saleemjaveds/https-github.com-openstack-nova,Tehsmash/nova,mgagne/nova,vmturbo/nova,dims/nova,Juniper/nova,DirectXMan12/nova-hacking,mikalstill/nova,BeyondTheClouds/nova,hanlind/nova,dstroppa/openstack-smartos-nova-grizzly,zaina/nova,belmiromoreira/nova,sacharya/nova,phenoxim/nova,Yusuke1987/openstack_template,rajalokan/nova,leilihh/novaha,TieWei/nova,Yusuke1987/openstack_template,gooddata/openstack-nova,BeyondTheClouds/nova,sebrandon1/nova,silenceli/nova,alaski/nova,petrutlucian94/nova_dev,savi-dev/nova,eayunstack/nova,scripnichenko/nova,mikalstill/nova,devoid/nova,mmnelemane/nova,alexandrucoman/vbox-nova-driver,tianweizhang/nova,nikesh-mahalka/nova,rrader/nova-docker-plugin,mahak/nova,usc-isi/nova,jeffrey4l/nova,maoy/zknova,cloudbase/nova,varunarya10/nova_test_latest,luogangyi/bcec-nova,dawnpower/nova,edulramirez/nova,raildo/nova,usc-isi/nova