B #5171: Check if NIC is really absent after detach on KVM

This commit is contained in:
Vlastimil Holer committed 2017-05-25 23:13:04 +02:00
1 parent 8488320e4c
commit 3a0ff50e79
1 file changed
+7
+7
View File
@@ -26,3 +26,10 @@ DETACH_ARGS="--domain $DOMAIN --type bridge --mac $MAC"
exec_and_log "virsh --connect $LIBVIRT_URI detach-interface $DETACH_ARGS" \
"Could not detach NIC ($MAC) from $DOMAIN"
virsh --connect $LIBVIRT_URI domiflist $DOMAIN | grep $MAC > /dev/null 2>&1
if [ $? -eq 0 ] ; then
error_message "Could not detach NIC ($MAC) from $DOMAIN"
exit -1
fi