1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Merge pull request #314 from vholer/bug-5171

B #5171: Check if NIC is really absent after detach on KVM
This commit is contained in:
Javi Fontan 2017-05-26 10:18:11 +02:00 committed by GitHub
commit c0a0ff5c33

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