From ffa6fc88249aa080aa31811a45569a45e567418a Mon Sep 17 00:00:00 2001 From: James Falcon Date: Thu, 2 Dec 2021 22:36:37 -0600 Subject: Fix exception when no activator found (#1129) Given that there are additional network management tools that we haven't yet supported with activators, we should log a warning and continue without network activation here, especially since this was a no-op for years. LP: #1948681 --- cloudinit/distros/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cloudinit/distros/__init__.py') diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index cf6aad14..fe44f20e 100755 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -228,7 +228,12 @@ class Distro(persistence.CloudInitPickleMixin, metaclass=abc.ABCMeta): # Now try to bring them up if bring_up: LOG.debug('Bringing up newly configured network interfaces') - network_activator = activators.select_activator() + try: + network_activator = activators.select_activator() + except activators.NoActivatorException: + LOG.warning("No network activator found, not bringing up " + "network interfaces") + return True network_activator.bring_up_all_interfaces(network_state) else: LOG.debug("Not bringing up newly configured network interfaces") -- cgit v1.2.3