group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #24046
[Bug 1675386] Re: [SRU] all network devices aren't added to instance profile
** Summary changed:
- all network devices aren't added to instance profile
+ [SRU] all network devices aren't added to instance profile
** Also affects: cloud-archive
Importance: Undecided
Status: New
** Also affects: cloud-archive/mitaka
Importance: Undecided
Status: New
** Changed in: cloud-archive
Status: New => Fix Released
** Changed in: cloud-archive
Importance: Undecided => Medium
** Changed in: cloud-archive/mitaka
Importance: Undecided => Medium
** Changed in: cloud-archive/mitaka
Status: New => Triaged
** Description changed:
RELEASE: nova-compute-lxd 13.3.0-0ubuntu1
DESCRIPTION:
In config.py the network_devices object should be returned after the
'for vifaddr in network_info:' loop to ensure the network_devices object
includes all network devices.
CURRENT CODE (annotated area of interest with >>>>):
def create_network(self, instance_name, instance, network_info):
"""Create the LXD container network on the host
:param instance_name: nova instance name
:param instance: nova instance object
:param network_info: instance network configuration object
:return:network configuration dictionary
"""
LOG.debug('create_network called for instance', instance=instance)
try:
network_devices = {}
if not network_info:
return
for vifaddr in network_info:
cfg = self.vif_driver.get_config(instance, vifaddr)
key = str(cfg['bridge'])
network_devices[key] = {'nictype': 'bridged', 'hwaddr': str(cfg['mac_address']), 'parent': key, 'type': 'nic'}
host_device = self.vif_driver.get_vif_devname(vifaddr)
if host_device:
network_devices[key]['host_name'] = host_device
>>>> return network_devices
except Exception as ex:
with excutils.save_and_reraise_exception():
LOG.error(
_LE('Fail to configure network for %(instance)s: %(ex)s'),
{'instance': instance_name, 'ex': ex}, instance=instance)
PROPOSED CHANGE (annotated area of interest with >>>>):
def create_network(self, instance_name, instance, network_info):
"""Create the LXD container network on the host
:param instance_name: nova instance name
:param instance: nova instance object
:param network_info: instance network configuration object
:return:network configuration dictionary
"""
LOG.debug('create_network called for instance', instance=instance)
try:
network_devices = {}
if not network_info:
return
for vifaddr in network_info:
cfg = self.vif_driver.get_config(instance, vifaddr)
key = str(cfg['bridge'])
network_devices[key] = {'nictype': 'bridged', 'hwaddr': str(cfg['mac_address']), 'parent': key, 'type': 'nic'}
host_device = self.vif_driver.get_vif_devname(vifaddr)
if host_device:
network_devices[key]['host_name'] = host_device
>>>> return network_devices
except Exception as ex:
with excutils.save_and_reraise_exception():
LOG.error(
_LE('Fail to configure network for %(instance)s: %(ex)s'),
{'instance': instance_name, 'ex': ex}, instance=instance)
+
+
+ Adding fields for Ubuntu SRU template:
+
+ [Impact]
+ See Description above.
+
+ [Test Case]
+ TBD
+
+ [Regression Potential]
+ TBD
** Description changed:
RELEASE: nova-compute-lxd 13.3.0-0ubuntu1
DESCRIPTION:
In config.py the network_devices object should be returned after the
'for vifaddr in network_info:' loop to ensure the network_devices object
includes all network devices.
CURRENT CODE (annotated area of interest with >>>>):
def create_network(self, instance_name, instance, network_info):
"""Create the LXD container network on the host
:param instance_name: nova instance name
:param instance: nova instance object
:param network_info: instance network configuration object
:return:network configuration dictionary
"""
LOG.debug('create_network called for instance', instance=instance)
try:
network_devices = {}
if not network_info:
return
for vifaddr in network_info:
cfg = self.vif_driver.get_config(instance, vifaddr)
key = str(cfg['bridge'])
network_devices[key] = {'nictype': 'bridged', 'hwaddr': str(cfg['mac_address']), 'parent': key, 'type': 'nic'}
host_device = self.vif_driver.get_vif_devname(vifaddr)
if host_device:
network_devices[key]['host_name'] = host_device
>>>> return network_devices
except Exception as ex:
with excutils.save_and_reraise_exception():
LOG.error(
_LE('Fail to configure network for %(instance)s: %(ex)s'),
{'instance': instance_name, 'ex': ex}, instance=instance)
PROPOSED CHANGE (annotated area of interest with >>>>):
def create_network(self, instance_name, instance, network_info):
"""Create the LXD container network on the host
:param instance_name: nova instance name
:param instance: nova instance object
:param network_info: instance network configuration object
:return:network configuration dictionary
"""
LOG.debug('create_network called for instance', instance=instance)
try:
network_devices = {}
if not network_info:
return
for vifaddr in network_info:
cfg = self.vif_driver.get_config(instance, vifaddr)
key = str(cfg['bridge'])
network_devices[key] = {'nictype': 'bridged', 'hwaddr': str(cfg['mac_address']), 'parent': key, 'type': 'nic'}
host_device = self.vif_driver.get_vif_devname(vifaddr)
if host_device:
network_devices[key]['host_name'] = host_device
>>>> return network_devices
except Exception as ex:
with excutils.save_and_reraise_exception():
LOG.error(
_LE('Fail to configure network for %(instance)s: %(ex)s'),
{'instance': instance_name, 'ex': ex}, instance=instance)
+ ------------------------------------------------------------
+
+
Adding fields for Ubuntu SRU template:
[Impact]
See Description above.
[Test Case]
TBD
[Regression Potential]
TBD
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1675386
Title:
[SRU] all network devices aren't added to instance profile
Status in Ubuntu Cloud Archive:
Fix Released
Status in Ubuntu Cloud Archive mitaka series:
Triaged
Status in nova-lxd:
Triaged
Status in nova-lxd package in Ubuntu:
Fix Released
Status in nova-lxd source package in Xenial:
Triaged
Bug description:
RELEASE: nova-compute-lxd 13.3.0-0ubuntu1
DESCRIPTION:
In config.py the network_devices object should be returned after the
'for vifaddr in network_info:' loop to ensure the network_devices
object includes all network devices.
CURRENT CODE (annotated area of interest with >>>>):
def create_network(self, instance_name, instance, network_info):
"""Create the LXD container network on the host
:param instance_name: nova instance name
:param instance: nova instance object
:param network_info: instance network configuration object
:return:network configuration dictionary
"""
LOG.debug('create_network called for instance', instance=instance)
try:
network_devices = {}
if not network_info:
return
for vifaddr in network_info:
cfg = self.vif_driver.get_config(instance, vifaddr)
key = str(cfg['bridge'])
network_devices[key] = {'nictype': 'bridged', 'hwaddr': str(cfg['mac_address']), 'parent': key, 'type': 'nic'}
host_device = self.vif_driver.get_vif_devname(vifaddr)
if host_device:
network_devices[key]['host_name'] = host_device
>>>> return network_devices
except Exception as ex:
with excutils.save_and_reraise_exception():
LOG.error(
_LE('Fail to configure network for %(instance)s: %(ex)s'),
{'instance': instance_name, 'ex': ex}, instance=instance)
PROPOSED CHANGE (annotated area of interest with >>>>):
def create_network(self, instance_name, instance, network_info):
"""Create the LXD container network on the host
:param instance_name: nova instance name
:param instance: nova instance object
:param network_info: instance network configuration object
:return:network configuration dictionary
"""
LOG.debug('create_network called for instance', instance=instance)
try:
network_devices = {}
if not network_info:
return
for vifaddr in network_info:
cfg = self.vif_driver.get_config(instance, vifaddr)
key = str(cfg['bridge'])
network_devices[key] = {'nictype': 'bridged', 'hwaddr': str(cfg['mac_address']), 'parent': key, 'type': 'nic'}
host_device = self.vif_driver.get_vif_devname(vifaddr)
if host_device:
network_devices[key]['host_name'] = host_device
>>>> return network_devices
except Exception as ex:
with excutils.save_and_reraise_exception():
LOG.error(
_LE('Fail to configure network for %(instance)s: %(ex)s'),
{'instance': instance_name, 'ex': ex}, instance=instance)
------------------------------------------------------------
Adding fields for Ubuntu SRU template:
[Impact]
See Description above.
[Test Case]
TBD
[Regression Potential]
TBD
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1675386/+subscriptions