diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py index a9c8f913346b..e0887e61ff95 100644 --- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -37,7 +37,6 @@ import six import nova.conf from nova import exception from nova.i18n import _ -from nova.network import linux_utils as linux_net_utils from nova import objects from nova.pci import utils as pci_utils import nova.privsep.linux_net @@ -1671,7 +1670,7 @@ class LinuxOVSInterfaceDriver(LinuxNetInterfaceDriver): 'external-ids:attached-mac=%s' % mac_address]) _execute('ip', 'link', 'set', dev, 'address', mac_address, run_as_root=True) - linux_net_utils.set_device_mtu(dev, network.get('mtu')) + nova.privsep.linux_net.set_device_mtu(dev, network.get('mtu')) _execute('ip', 'link', 'set', dev, 'up', run_as_root=True) if not gateway: # If we weren't instructed to act as a gateway then add the diff --git a/nova/network/manager.py b/nova/network/manager.py index d0a832aefb19..a801093a72b6 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -31,6 +31,7 @@ import math import re import netaddr +from oslo_concurrency import processutils from oslo_log import log as logging import oslo_messaging as messaging from oslo_service import periodic_task @@ -67,7 +68,7 @@ CONF = nova.conf.CONF def get_my_linklocal(interface): try: - if_str = utils.execute( + if_str = processutils.execute( 'ip', '-f', 'inet6', '-o', 'addr', 'show', interface) condition = '\s+inet6\s+([0-9a-f:]+)/\d+\s+scope\s+link' links = [re.search(condition, x) for x in if_str[0].split('\n')]