libvirt: ignore conflict when defining network filters
We have a latent race in the libvirt firewall code when setting
up static filters which is now an error with libvirt>=1.2.7,
which is why we started seeing this in CI failures starting in
newton which run on xenial nodes that have libvirt 1.3.1 (but
didn't see it on trusty nodes with libvirt 1.2.2).
Libvirt commit 46a811db0731cedaea0153fc223faa6096cee5b5 checks
for an existing filter with the same name but a different uuid
when defining network filters and raises an error if found. That
was added in the 1.2.7 release.
This change simply handles the error and ignores it so we don't
fail to boot the instance.
Unfortunately we don't have a specific error code from libvirt
when this happens so the best we can do is compare the error
message from the libvirt error which is only going to work for
English locales because the error message from libvirt is
translated.
Change-Id: I161be26d605351f168e351d3ed3d308234346f6f
Closes-Bug: #1612875
(cherry picked from commit 2ce193e16d7ca5b93671d7f0d2e3b35761f5d386)
Reviewed: https:/ /review. openstack. org/380645 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=c7a9998f982 4e4e9508108429e efa86eadbc9f50
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit c7a9998f9824e4e 9508108429eefa8 6eadbc9f50
Author: Matt Riedemann <email address hidden>
Date: Thu Sep 22 12:41:46 2016 -0400
libvirt: ignore conflict when defining network filters
We have a latent race in the libvirt firewall code when setting
up static filters which is now an error with libvirt>=1.2.7,
which is why we started seeing this in CI failures starting in
newton which run on xenial nodes that have libvirt 1.3.1 (but
didn't see it on trusty nodes with libvirt 1.2.2).
Libvirt commit 46a811db0731ced aea0153fc223faa 6096cee5b5 checks
for an existing filter with the same name but a different uuid
when defining network filters and raises an error if found. That
was added in the 1.2.7 release.
This change simply handles the error and ignores it so we don't
fail to boot the instance.
Unfortunately we don't have a specific error code from libvirt
when this happens so the best we can do is compare the error
message from the libvirt error which is only going to work for
English locales because the error message from libvirt is
translated.
Change-Id: I161be26d605351 f168e351d3ed3d3 08234346f6f 93671d7f0d2e3b3 5761f5d386)
Closes-Bug: #1612875
(cherry picked from commit 2ce193e16d7ca5b