From 96cc3852d8126af2dba7cd778473c23bcd883ceb Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 13 Apr 2016 11:48:38 -0400 Subject: 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 --- cloudinit/net/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cloudinit/net/__init__.py') 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: -- cgit v1.2.3