Skip to content
Browse files

Ensure LXD veth host device is named correctly

LXD uses a veth pair to plumb the LXD instance into the bridge
providing access to neutron networking.

In later nova-lxd versions, the host_name parameter is set based
on the neutron configured name for the host part of the pair,
ensuring that neutron iptables firewall rules are correctly
applied to instances.

Update the mitaka version of the driver to populate the LXD
network device configuration to ensure that any firewall
rules are correctly applied.

(also dropped version from setup.cfg, as pbr will automatically
generate the version based on git tags, so its really surplus
to requirements).

Change-Id: Ic5b9ad6944a1ac45cd1983d038431252ff738985
Closes-Bug: 1656847
  • Loading branch information...
javacruft committed Jan 31, 2017
1 parent 216b7a5 commit 1b76cefb92081efa1e88cd8f330253f857028bd2
Showing with 6 additions and 3 deletions.
  1. +6 −2 nova_lxd/nova/virt/lxd/
  2. +0 −1 setup.cfg
@@ -224,11 +224,15 @@ def create_network(self, instance_name, instance, network_info):

for vifaddr in network_info:
cfg = self.vif_driver.get_config(instance, vifaddr)
network_devices[str(cfg['bridge'])] = \
key = str(cfg['bridge'])
network_devices[key] = \
{'nictype': 'bridged',
'hwaddr': str(cfg['mac_address']),
'parent': str(cfg['bridge']),
'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():
@@ -3,7 +3,6 @@ name = nova-lxd
summary = native lxd driver for openstack
description-file =
version = 13.2.0
author = OpenStack
author-email =
home-page =

0 comments on commit 1b76cef

Please sign in to comment.
You can’t perform that action at this time.