]> xenbits.xensource.com Git - libvirt.git/commit
conf: avoid looking up network port that doesn't exist
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 12 Sep 2019 13:21:21 +0000 (14:21 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 12 Sep 2019 15:06:57 +0000 (16:06 +0100)
commitfb0239ff304d8cb1e0e029a8494ae8b1c3f4d8e3
tree01f55bec127e346440360136a47e01b7a95133d5
parent2e3e942f99f29483c328f5ddafda37782bc2d43e
conf: avoid looking up network port that doesn't exist

If the hypervisor driver has not yet created the network port, the
portid field will be "00000000-0000-0000-0000-000000000000".

If a failure occurs during early VM startup, the hypervisor driver may
none the less try to release the network port, resulting in an
undesirable warning:

2019-09-12 13:17:42.349+0000: 16544: error :
virNetworkObjLookupPort:1679 : network port not found: Network port with
UUID 00000000-0000-0000-0000-000000000000 does not exist

By checking if the portid UUID is valid, we can avoid polluting the logs
in this way.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/domain_conf.c