sailesh1993 / rpms / cloud-init

Forked from rpms/cloud-init a year ago
Clone
18322d
From bb7f0106264091ea4e0753f2a5c1276e9020045c Mon Sep 17 00:00:00 2001
18322d
From: Eduardo Otubo <otubo@redhat.com>
18322d
Date: Wed, 19 Feb 2020 13:32:55 +0100
18322d
Subject: [PATCH 2/3] net: skip bond interfaces in get_interfaces
18322d
18322d
RH-Author: Eduardo Otubo <otubo@redhat.com>
18322d
Message-id: <20200219133256.9544-2-otubo@redhat.com>
18322d
Patchwork-id: 93936
18322d
O-Subject: [RHEL-7.9 cloud-init PATCHv2 1/2] net: skip bond interfaces in get_interfaces
18322d
Bugzilla: 1768770
18322d
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
18322d
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
18322d
18322d
commit e5f542132568a8da63823f478cea52bfb28ac655
18322d
Author: Stanislav Makar <stas.makar@gmail.com>
18322d
Date:   Mon Jul 15 20:12:31 2019 +0000
18322d
18322d
    net: skip bond interfaces in get_interfaces
18322d
18322d
    bonds may inherit mac address from a physical interface
18322d
18322d
    LP: #1812857
18322d
18322d
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
18322d
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
18322d
---
18322d
 cloudinit/net/__init__.py | 2 ++
18322d
 1 file changed, 2 insertions(+)
18322d
18322d
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
18322d
index 3642fb1..e758006 100644
18322d
--- a/cloudinit/net/__init__.py
18322d
+++ b/cloudinit/net/__init__.py
18322d
@@ -622,6 +622,8 @@ def get_interfaces():
18322d
             continue
18322d
         if is_vlan(name):
18322d
             continue
18322d
+        if is_bond(name):
18322d
+            continue
18322d
         mac = get_interface_mac(name)
18322d
         # some devices may not have a mac (tun0)
18322d
         if not mac:
18322d
-- 
18322d
1.8.3.1
18322d