summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-11-09 16:10:47 -0500
committerScott Moser <smoser@brickies.net>2017-11-09 16:10:47 -0500
commit8c2caad47a958799476f705e42a1fad9ec636233 (patch)
tree00393889afcb45061516c0cbebbc7ff8d2959b54
parent7bb01ea3a04891bcfcdd8ffbbc6c799a923d8fb3 (diff)
downloadvyos-cloud-init-8c2caad47a958799476f705e42a1fad9ec636233.tar.gz
vyos-cloud-init-8c2caad47a958799476f705e42a1fad9ec636233.zip
Azure: don't generate network configuration for SRIOV devices
Azure kernel now configures the SRIOV devices itself so cloud-init does not need to provide any SRIOV device configuration or udev naming rules. LP: #1721579
-rw-r--r--cloudinit/sources/DataSourceAzure.py25
1 files changed, 2 insertions, 23 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 80c2bd12..8c3492d9 100644
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -465,10 +465,8 @@ class DataSourceAzure(sources.DataSource):
1. Probe the drivers of the net-devices present and inject them in
the network configuration under params: driver: <driver> value
- 2. If the driver value is 'mlx4_core', the control mode should be
- set to manual. The device will be later used to build a bond,
- for now we want to ensure the device gets named but does not
- break any network configuration
+ 2. Generate a fallback network config that does not include any of
+ the blacklisted devices.
"""
blacklist = ['mlx4_core']
if not self._network_config:
@@ -477,25 +475,6 @@ class DataSourceAzure(sources.DataSource):
netconfig = net.generate_fallback_config(
blacklist_drivers=blacklist, config_driver=True)
- # if we have any blacklisted devices, update the network_config to
- # include the device, mac, and driver values, but with no ip
- # config; this ensures udev rules are generated but won't affect
- # ip configuration
- bl_found = 0
- for bl_dev in [dev for dev in net.get_devicelist()
- if net.device_driver(dev) in blacklist]:
- bl_found += 1
- cfg = {
- 'type': 'physical',
- 'name': 'vf%d' % bl_found,
- 'mac_address': net.get_interface_mac(bl_dev),
- 'params': {
- 'driver': net.device_driver(bl_dev),
- 'device_id': net.device_devid(bl_dev),
- },
- }
- netconfig['config'].append(cfg)
-
self._network_config = netconfig
return self._network_config