LibVirt: Disable hairpin when using Neutron
When hairpinning is enabled, ICMPv6 messages that handle duplicate address detections return to the instance, causing IPv6 SLAAC configuration to fail http://tools.ietf.org/html/rfc4862#section-5.4.3 Closes-Bug: #1251235 Change-Id: I65e1d40d33d6291bfd5558c7c346fc5fbf92cc56
This commit is contained in:
parent
166580d63b
commit
6b9f9e6e9a
@ -5999,6 +5999,7 @@ class LibvirtConnTestCase(test.TestCase):
|
|||||||
Tests that the xml is logged when enabling hairpin mode for the domain
|
Tests that the xml is logged when enabling hairpin mode for the domain
|
||||||
fails.
|
fails.
|
||||||
"""
|
"""
|
||||||
|
utils.reset_is_neutron()
|
||||||
fake_xml = "<test>this is a test</test>"
|
fake_xml = "<test>this is a test</test>"
|
||||||
fake_domain = FakeVirtDomain(fake_xml)
|
fake_domain = FakeVirtDomain(fake_xml)
|
||||||
|
|
||||||
|
@ -3448,12 +3448,14 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||||||
"defined domain with xml: %s") %
|
"defined domain with xml: %s") %
|
||||||
domain.XMLDesc(0))
|
domain.XMLDesc(0))
|
||||||
|
|
||||||
try:
|
if not utils.is_neutron():
|
||||||
self._enable_hairpin(domain.XMLDesc(0))
|
try:
|
||||||
except Exception:
|
self._enable_hairpin(domain.XMLDesc(0))
|
||||||
with excutils.save_and_reraise_exception():
|
except Exception:
|
||||||
LOG.error(_("An error occurred while enabling hairpin mode on "
|
with excutils.save_and_reraise_exception():
|
||||||
"domain with xml: %s") % domain.XMLDesc(0))
|
LOG.error(_("An error occurred while enabling hairpin "
|
||||||
|
"mode on domain with xml: %s")
|
||||||
|
% domain.XMLDesc(0))
|
||||||
|
|
||||||
# NOTE(uni): Now the container is running with its own private mount
|
# NOTE(uni): Now the container is running with its own private mount
|
||||||
# namespace and so there is no need to keep the container rootfs
|
# namespace and so there is no need to keep the container rootfs
|
||||||
|
Loading…
Reference in New Issue
Block a user