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

Proposed by Ryan Harper
Status: Merged
Approved by: Scott Moser
Approved revision: 8c8d97f0f08daff4e1bc6843627ad1e5714eb00b
Merged at revision: 8c2caad47a958799476f705e42a1fad9ec636233
Proposed branch: ~raharper/cloud-init:azure-network-dont-config-sriov-devices
Merge into: cloud-init:master
Diff against target: 43 lines (+2/-23)
1 file modified
cloudinit/sources/DataSourceAzure.py (+2/-23)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
cloud-init Commiters Pending
Review via email: mp+332075@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:8c8d97f0f08daff4e1bc6843627ad1e5714eb00b
https://jenkins.ubuntu.com/server/job/cloud-init-ci/400/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/400/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
2index 80c2bd1..8c3492d 100644
3--- a/cloudinit/sources/DataSourceAzure.py
4+++ b/cloudinit/sources/DataSourceAzure.py
5@@ -465,10 +465,8 @@ class DataSourceAzure(sources.DataSource):
6
7 1. Probe the drivers of the net-devices present and inject them in
8 the network configuration under params: driver: <driver> value
9- 2. If the driver value is 'mlx4_core', the control mode should be
10- set to manual. The device will be later used to build a bond,
11- for now we want to ensure the device gets named but does not
12- break any network configuration
13+ 2. Generate a fallback network config that does not include any of
14+ the blacklisted devices.
15 """
16 blacklist = ['mlx4_core']
17 if not self._network_config:
18@@ -477,25 +475,6 @@ class DataSourceAzure(sources.DataSource):
19 netconfig = net.generate_fallback_config(
20 blacklist_drivers=blacklist, config_driver=True)
21
22- # if we have any blacklisted devices, update the network_config to
23- # include the device, mac, and driver values, but with no ip
24- # config; this ensures udev rules are generated but won't affect
25- # ip configuration
26- bl_found = 0
27- for bl_dev in [dev for dev in net.get_devicelist()
28- if net.device_driver(dev) in blacklist]:
29- bl_found += 1
30- cfg = {
31- 'type': 'physical',
32- 'name': 'vf%d' % bl_found,
33- 'mac_address': net.get_interface_mac(bl_dev),
34- 'params': {
35- 'driver': net.device_driver(bl_dev),
36- 'device_id': net.device_devid(bl_dev),
37- },
38- }
39- netconfig['config'].append(cfg)
40-
41 self._network_config = netconfig
42
43 return self._network_config

Subscribers

People subscribed via source and target branches