Improve service instance module debug logging
Change-Id: Ib3a9bebe362609d7198e053afebc6004f3d94baf
(cherry picked from commit 2117632c50
)
This commit is contained in:
parent
8919db0186
commit
bb6256b5e8
@ -143,7 +143,7 @@ class OVSInterfaceDriver(LinuxInterfaceDriver):
|
||||
|
||||
if not ip_lib.device_exists(device_name,
|
||||
namespace=namespace):
|
||||
|
||||
LOG.info("Device %s does not exist - creating ....", device_name)
|
||||
tap_name = self._get_tap_name(device_name)
|
||||
self._ovs_add_port(bridge, tap_name, port_id, mac_address)
|
||||
ns_dev.link.set_address(mac_address)
|
||||
@ -154,7 +154,7 @@ class OVSInterfaceDriver(LinuxInterfaceDriver):
|
||||
namespace_obj.add_device_to_namespace(ns_dev)
|
||||
|
||||
else:
|
||||
LOG.warning("Device %s already exists.", device_name)
|
||||
LOG.info("Device %s already exists.", device_name)
|
||||
if ns_dev.link.address != mac_address:
|
||||
LOG.warning("Reset mac address to %s", mac_address)
|
||||
ns_dev.link.set_address(mac_address)
|
||||
|
@ -141,6 +141,8 @@ class GenericShareDriver(driver.ExecuteMixin, driver.ShareDriver):
|
||||
driver_config=self.configuration))
|
||||
|
||||
def _ssh_exec(self, server, command, check_exit_code=True):
|
||||
LOG.debug("_ssh_exec - server: %s, command: %s, check_exit_code: %s",
|
||||
server, command, check_exit_code)
|
||||
connection = self.ssh_connections.get(server['instance_id'])
|
||||
ssh_conn_timeout = self.configuration.ssh_conn_timeout
|
||||
if not connection:
|
||||
|
@ -949,6 +949,8 @@ class NeutronNetworkHelper(BaseNetworkhelper):
|
||||
and setting up required network devices.
|
||||
"""
|
||||
if self.use_service_network:
|
||||
LOG.debug("Plugging service instance into service network %s.",
|
||||
self.service_network_id)
|
||||
port = self._get_service_port(
|
||||
self.service_network_id, None, 'manila-share')
|
||||
port = self._add_fixed_ips_to_service_port(port)
|
||||
@ -957,6 +959,8 @@ class NeutronNetworkHelper(BaseNetworkhelper):
|
||||
self._plug_interface_in_host(interface_name, device, port)
|
||||
|
||||
if self.use_admin_port:
|
||||
LOG.debug("Plugging service instance into admin network %s.",
|
||||
self.admin_network_id)
|
||||
port = self._get_service_port(
|
||||
self.admin_network_id, self.admin_subnet_id,
|
||||
'manila-admin-share')
|
||||
@ -971,6 +975,8 @@ class NeutronNetworkHelper(BaseNetworkhelper):
|
||||
external=True)
|
||||
def _plug_interface_in_host(self, interface_name, device, port):
|
||||
|
||||
LOG.debug("Plug interface into host - interface_name: %s, "
|
||||
"device: %s, port: %s", interface_name, device, port)
|
||||
self.vif_driver.plug(interface_name, port['id'], port['mac_address'])
|
||||
ip_cidrs = []
|
||||
for fixed_ip in port['fixed_ips']:
|
||||
|
@ -31,6 +31,7 @@ import tempfile
|
||||
import time
|
||||
|
||||
from eventlet import pools
|
||||
import logging
|
||||
import netaddr
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_concurrency import processutils
|
||||
@ -94,6 +95,8 @@ def execute(*cmd, **kwargs):
|
||||
"""Convenience wrapper around oslo's execute() function."""
|
||||
if 'run_as_root' in kwargs and 'root_helper' not in kwargs:
|
||||
kwargs['root_helper'] = _get_root_helper()
|
||||
if hasattr('CONF', 'debug') and CONF.debug:
|
||||
kwargs['loglevel'] = logging.DEBUG
|
||||
return processutils.execute(*cmd, **kwargs)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user