diff --git a/manila/network/linux/interface.py b/manila/network/linux/interface.py index b5a7f8012c..03d580c126 100644 --- a/manila/network/linux/interface.py +++ b/manila/network/linux/interface.py @@ -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) diff --git a/manila/share/drivers/generic.py b/manila/share/drivers/generic.py index 949599ddc6..e2bcd8f052 100644 --- a/manila/share/drivers/generic.py +++ b/manila/share/drivers/generic.py @@ -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: diff --git a/manila/share/drivers/service_instance.py b/manila/share/drivers/service_instance.py index 0369173a81..6d4347bf63 100644 --- a/manila/share/drivers/service_instance.py +++ b/manila/share/drivers/service_instance.py @@ -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']: diff --git a/manila/utils.py b/manila/utils.py index 1a38a4a71c..05792dbaf1 100644 --- a/manila/utils.py +++ b/manila/utils.py @@ -30,6 +30,7 @@ import tempfile import time from eventlet import pools +import logging import netaddr from oslo_concurrency import lockutils from oslo_concurrency import processutils @@ -93,6 +94,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)