[SRU] all network devices aren't added to instance profile

Bug #1675386 reported by todd on 2017-03-23
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Medium
Unassigned
Mitaka
Medium
Unassigned
nova-lxd
Medium
Unassigned
nova-lxd (Ubuntu)
High
Unassigned
Xenial
Medium
Unassigned

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]
Manual test with devstack to ensure no regressions. Manual check to verify that container gets multiple net devices.

[Regression Potential]
Low, as virtually all openstack deployments with containers tend to only have one network device.

todd (togofish) on 2017-03-27
description: updated
James Page (james-page) wrote :

This bug impacts mitaka and newton branches only; the code was refactored @ ocata and now does the right thing with regards to building the entire dict of network data.

Changed in nova-lxd (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in nova-lxd:
status: New → Triaged
importance: Undecided → High
Changed in nova-lxd (Ubuntu):
status: Confirmed → Fix Released
Changed in nova-lxd (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → High
importance: High → Medium
Changed in nova-lxd:
importance: High → Medium
James Page (james-page) wrote :

@todd we'll get this fixed for mitaka and newton releases, however I would recommend using newer openstack releases for nova-lxd based deployments; they incorporate numerous improvements and new features such as the ability to be able to present ceph based cinder volumes to lxd containers @ pike.

Alex Kavanagh (ajkavanagh) wrote :

Newton is now eol; however, it still needs a fix for mitaka.

summary: - all network devices aren't added to instance profile
+ [SRU] all network devices aren't added to instance profile
Changed in cloud-archive:
status: New → Fix Released
importance: Undecided → Medium
description: updated
description: updated
description: updated
Alex Kavanagh (ajkavanagh) wrote :

stable/mitaka patch as a diff file that fixes the bug.

Note this is only a debian patch diff file; the stable/mitaka source has not been altered.

Alex Kavanagh (ajkavanagh) wrote :

Updated stable/mitaka patch which includes changelog update.

Corey Bryant (corey.bryant) wrote :

Thanks Alex. I've uploaded the new version of the package to the xenial unapproved queue [1] where it is awaiting review by the SRU team.

[1] https://launchpad.net/ubuntu/xenial/+queue?queue_state=1&queue_text=

Hello todd, or anyone else affected,

Accepted nova-lxd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nova-lxd/13.3.0-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nova-lxd (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-xenial
Corey Bryant (corey.bryant) wrote :

Hello todd, or anyone else affected,

Accepted nova-lxd into mitaka-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:mitaka-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-mitaka-needed to verification-mitaka-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-mitaka-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-mitaka-needed
Corey Bryant (corey.bryant) wrote :

Alex, would you be able to verify this bug is fixed? Thanks.

Alex Kavanagh (ajkavanagh) wrote :

I've confirmed that this function with mitaka/xenial using the amulet test associated with lxd.

tags: added: verification-done verification-mitaka-done verification-xenial-done
removed: verification-mitaka-needed verification-needed verification-needed-xenial

Thank you for taking the time to verify this stable release fix. We have noticed that you have used the verification-done tag for marking the bug as verified and would like to point out that due to a recent change in SRU bug verification policy fixes now have to be marked with per-release tags (i.e. verification-done-$RELEASE). Please remove the verification-done tag and add one for the release you have tested the package in. Thank you!

https://wiki.ubuntu.com/StableReleaseUpdates#Verification

Alex Kavanagh (ajkavanagh) wrote :

Thanks Brian for the help with this; apologies for getting the tags wrong! I'll fix them now.

tags: added: verification-needed
removed: verification-done
tags: added: verification-done-xenial
removed: verification-xenial-done
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nova-lxd - 13.3.0-0ubuntu2

---------------
nova-lxd (13.3.0-0ubuntu2) xenial; urgency=medium

  * d/p/01_bug-1675386-ensure-all-net-devices-added.diff:
    Returns all network devices to container (LP: #1675386)

 -- Alex Kavanagh <email address hidden> Thu, 31 May 2018 17:21:55 +0100

Changed in nova-lxd (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for nova-lxd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for nova-lxd has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package nova-lxd - 13.3.0-0ubuntu2~cloud0
---------------

 nova-lxd (13.3.0-0ubuntu2~cloud0) trusty-mitaka; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 nova-lxd (13.3.0-0ubuntu2) xenial; urgency=medium
 .
   * d/p/01_bug-1675386-ensure-all-net-devices-added.diff:
     Returns all network devices to container (LP: #1675386)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers