Skip to content
This repository was archived by the owner on Sep 26, 2019. It is now read-only.

Commit 1b76cef

Browse files
committed
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
1 parent 216b7a5 commit 1b76cef

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: nova_lxd/nova/virt/lxd/config.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,15 @@ def create_network(self, instance_name, instance, network_info):
224224

225225
for vifaddr in network_info:
226226
cfg = self.vif_driver.get_config(instance, vifaddr)
227-
network_devices[str(cfg['bridge'])] = \
227+
key = str(cfg['bridge'])
228+
network_devices[key] = \
228229
{'nictype': 'bridged',
229230
'hwaddr': str(cfg['mac_address']),
230-
'parent': str(cfg['bridge']),
231+
'parent': key,
231232
'type': 'nic'}
233+
host_device = self.vif_driver.get_vif_devname(vifaddr)
234+
if host_device:
235+
network_devices[key]['host_name'] = host_device
232236
return network_devices
233237
except Exception as ex:
234238
with excutils.save_and_reraise_exception():

Diff for: setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = nova-lxd
33
summary = native lxd driver for openstack
44
description-file =
55
README.md
6-
version = 13.2.0
76
author = OpenStack
87
author-email = openstack-dev@lists.openstack.org
98
home-page = http://www.openstack.org/

0 commit comments

Comments
 (0)