diff options
author | James Falcon <james.falcon@canonical.com> | 2021-12-02 22:36:37 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 21:36:37 -0700 |
commit | ffa6fc88249aa080aa31811a45569a45e567418a (patch) | |
tree | 173c86024247ec73e112f1ecbf9ae37ccfa5c3f4 /cloudinit/distros | |
parent | 0fe96a44cde48cc688afe75beb8fd126c8892b8c (diff) | |
download | vyos-cloud-init-ffa6fc88249aa080aa31811a45569a45e567418a.tar.gz vyos-cloud-init-ffa6fc88249aa080aa31811a45569a45e567418a.zip |
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
Diffstat (limited to 'cloudinit/distros')
-rwxr-xr-x | cloudinit/distros/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
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") |