virt: Do not restrict VIR_ERR_NO_DOMAIN to qemu.
Consider it sufficent that a libvirt.VIR_ERR_NO_DOMAIN was reported without concerning ourselves over who reported it.
This commit is contained in:
committed by
Vinzenz Feenstra
parent
984270ebe1
commit
2216c8dc1c
@@ -359,7 +359,7 @@ func (obj *VirtRes) CheckApply(apply bool) (bool, error) {
|
||||
dom, err := obj.conn.LookupDomainByName(obj.GetName())
|
||||
if err == nil {
|
||||
// pass
|
||||
} else if virErr, ok := err.(libvirt.VirError); ok && virErr.Domain == libvirt.VIR_FROM_QEMU && virErr.Code == libvirt.VIR_ERR_NO_DOMAIN {
|
||||
} else if virErr, ok := err.(libvirt.VirError); ok && virErr.Code == libvirt.VIR_ERR_NO_DOMAIN {
|
||||
// domain not found
|
||||
if obj.absent {
|
||||
obj.isStateOK = true
|
||||
|
||||
Reference in New Issue
Block a user