summaryrefslogtreecommitdiff
path: root/cloudinit/net/__init__.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-04-13 11:48:38 -0400
committerScott Moser <smoser@ubuntu.com>2016-04-13 11:48:38 -0400
commit96cc3852d8126af2dba7cd778473c23bcd883ceb (patch)
tree394e5e320c7e8d2c9e4d0fe5831a6a23ffd41439 /cloudinit/net/__init__.py
parent03c81fdcf924da8b87fd690761d4ce2fbd47854e (diff)
downloadvyos-cloud-init-96cc3852d8126af2dba7cd778473c23bcd883ceb.tar.gz
vyos-cloud-init-96cc3852d8126af2dba7cd778473c23bcd883ceb.zip
skip bridges when generating fallback networking
It does not make sense to consider bridges when searching for fallback networking. If the system is configured with a bridge, then its probably for some purpose other than to get to a metadata service. Considering the bridge could make cloud-init pick the wrong device on reboot. LP: #1569974
Diffstat (limited to 'cloudinit/net/__init__.py')
-rw-r--r--cloudinit/net/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index 40929c6e..31110292 100644
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -646,6 +646,9 @@ def generate_fallback_config():
connected = []
possibly_connected = []
for interface in potential_interfaces:
+ if os.path.exists(sys_dev_path(interface, "bridge")):
+ # skip any bridges
+ continue
try:
carrier = int(sys_netdev_info(interface, 'carrier'))
if carrier: