Only setup iptables for metadata if using nova-net
As discussed in the bug report, we setup iptables rules for the metadata
service even if we're using neutron (which routes to metadata in a
different way). This is because of the split-brain behaviour of the
network driver interface versus the network API interface.
Instead, only setup iptables if we are _not_ using neutron.
Change-Id: I43df9200aba1018d2c7cd2f118864326af15fd42
Closes-Bug: #1687187
(cherry picked from commit b7cb3b7523
)
This commit is contained in:
parent
ae45c4a72a
commit
3d889bbfce
@ -16,6 +16,7 @@
|
||||
|
||||
from nova import manager
|
||||
from nova.network import driver
|
||||
from nova import utils
|
||||
|
||||
|
||||
class MetadataManager(manager.Manager):
|
||||
@ -26,5 +27,10 @@ class MetadataManager(manager.Manager):
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(MetadataManager, self).__init__(*args, **kwargs)
|
||||
self.network_driver = driver.load_network_driver()
|
||||
self.network_driver.metadata_accept()
|
||||
|
||||
if not utils.is_neutron():
|
||||
# NOTE(mikal): we only add iptables rules if we're running
|
||||
# under nova-network. This code should go away when the
|
||||
# deprecation of nova-network is complete.
|
||||
self.network_driver = driver.load_network_driver()
|
||||
self.network_driver.metadata_accept()
|
||||
|
Loading…
Reference in New Issue
Block a user