← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~raharper/cloud-init:azure-network-dont-config-sriov-devices into cloud-init:master

 

Ryan Harper has proposed merging ~raharper/cloud-init:azure-network-dont-config-sriov-devices into cloud-init:master.

Requested reviews:
  cloud-init commiters (cloud-init-dev)
Related bugs:
  Bug #1721579 in cloud-init: "azure: remove sriov device configuration"
  https://bugs.launchpad.net/cloud-init/+bug/1721579

For more details, see:
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/332075

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
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~raharper/cloud-init:azure-network-dont-config-sriov-devices into cloud-init:master.
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 80c2bd1..8c3492d 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

Follow ups