Merge "NSXv: improve logging for metadata setup"
This commit is contained in:
commit
8ab57e9d9d
@ -113,6 +113,8 @@ def get_db_internal_edge_ips(context, az_name):
|
|||||||
class NsxVMetadataProxyHandler(object):
|
class NsxVMetadataProxyHandler(object):
|
||||||
"""A metadata proxy handler for a specific availability zone"""
|
"""A metadata proxy handler for a specific availability zone"""
|
||||||
def __init__(self, nsxv_plugin, availability_zone):
|
def __init__(self, nsxv_plugin, availability_zone):
|
||||||
|
LOG.debug('Initializing metadata for availability zone %s',
|
||||||
|
availability_zone.name)
|
||||||
self.nsxv_plugin = nsxv_plugin
|
self.nsxv_plugin = nsxv_plugin
|
||||||
context = neutron_context.get_admin_context()
|
context = neutron_context.get_admin_context()
|
||||||
self.az = availability_zone
|
self.az = availability_zone
|
||||||
@ -135,7 +137,15 @@ class NsxVMetadataProxyHandler(object):
|
|||||||
self.internal_net, self.internal_subnet = (
|
self.internal_net, self.internal_subnet = (
|
||||||
self._get_internal_network_and_subnet(context))
|
self._get_internal_network_and_subnet(context))
|
||||||
|
|
||||||
|
LOG.debug('Metadata internal net for AZ %(az)s is %(net)s, '
|
||||||
|
'subnet is %(sub)s',
|
||||||
|
{'az': availability_zone.name,
|
||||||
|
'net': self.internal_net,
|
||||||
|
'sub': self.internal_subnet})
|
||||||
self.proxy_edge_ips = self._get_proxy_edges(context)
|
self.proxy_edge_ips = self._get_proxy_edges(context)
|
||||||
|
LOG.debug('Metadata proxy internal IPs for AZ %(az)s is '
|
||||||
|
'%(addresses)s', {'az': availability_zone.name,
|
||||||
|
'addresses': self.proxy_edge_ips})
|
||||||
|
|
||||||
def _create_metadata_internal_network(self, context, cidr):
|
def _create_metadata_internal_network(self, context, cidr):
|
||||||
# Neutron requires a network to have some tenant_id
|
# Neutron requires a network to have some tenant_id
|
||||||
@ -704,6 +714,7 @@ class NsxVMetadataProxyHandler(object):
|
|||||||
lb_obj.submit_to_backend(self.nsxv_plugin.nsx_v.vcns, edge_id)
|
lb_obj.submit_to_backend(self.nsxv_plugin.nsx_v.vcns, edge_id)
|
||||||
|
|
||||||
def configure_router_edge(self, context, rtr_id):
|
def configure_router_edge(self, context, rtr_id):
|
||||||
|
LOG.debug('Configuring metadata infrastructure for %s', rtr_id)
|
||||||
ctx = neutron_context.get_admin_context()
|
ctx = neutron_context.get_admin_context()
|
||||||
# Connect router interface to inter-edge network
|
# Connect router interface to inter-edge network
|
||||||
port_data = {
|
port_data = {
|
||||||
|
@ -410,6 +410,10 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
self.metadata_proxy_handler[az.name] = (
|
self.metadata_proxy_handler[az.name] = (
|
||||||
nsx_v_md_proxy.NsxVMetadataProxyHandler(
|
nsx_v_md_proxy.NsxVMetadataProxyHandler(
|
||||||
self, az))
|
self, az))
|
||||||
|
LOG.debug('Metadata is configured for AZs %s',
|
||||||
|
self.metadata_proxy_handler.keys())
|
||||||
|
else:
|
||||||
|
LOG.debug('No metadata configuration available!')
|
||||||
|
|
||||||
self.housekeeper = housekeeper.NsxHousekeeper(
|
self.housekeeper = housekeeper.NsxHousekeeper(
|
||||||
hk_ns='vmware_nsx.neutron.nsxv.housekeeper.jobs',
|
hk_ns='vmware_nsx.neutron.nsxv.housekeeper.jobs',
|
||||||
|
@ -27,6 +27,7 @@ from neutron_lib import context as q_context
|
|||||||
from neutron_lib import exceptions as n_exc
|
from neutron_lib import exceptions as n_exc
|
||||||
from neutron_lib.exceptions import l3 as l3_exc
|
from neutron_lib.exceptions import l3 as l3_exc
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
from oslo_log import helpers as log_helpers
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from oslo_utils import excutils
|
from oslo_utils import excutils
|
||||||
@ -2577,6 +2578,7 @@ class NsxVCallbacks(object):
|
|||||||
else:
|
else:
|
||||||
self._vcm = None
|
self._vcm = None
|
||||||
|
|
||||||
|
@log_helpers.log_method_call
|
||||||
def complete_edge_creation(self, context, edge_id, name, router_id, dist,
|
def complete_edge_creation(self, context, edge_id, name, router_id, dist,
|
||||||
deploy_successful, availability_zone=None,
|
deploy_successful, availability_zone=None,
|
||||||
deploy_metadata=False):
|
deploy_metadata=False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user