Ubuntu Pastebin

Paste from smoser at Fri, 20 Oct 2017 19:13:03 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
commit 3d3cbed501fb6a62c0a3538fce58505bcd7181bc (HEAD -> fix/tests-command-output-simple-warn)
Author: Scott Moser <smoser@brickies.net>
Date:   Fri Oct 20 15:10:42 2017 -0400

    cc_lxd: do not warn if 'bridge' is not provided in config.
    
    lxd/bridge is not required to be provided, but a warning was being
    logged if it was not.  Avoid the warning when it is not present.

diff --git a/cloudinit/config/cc_lxd.py b/cloudinit/config/cc_lxd.py
index e6262f8c..09374d2e 100644
--- a/cloudinit/config/cc_lxd.py
+++ b/cloudinit/config/cc_lxd.py
@@ -72,7 +72,7 @@ def handle(name, cfg, cloud, log, args):
                  type(init_cfg))
         init_cfg = {}
 
-    bridge_cfg = lxd_cfg.get('bridge')
+    bridge_cfg = lxd_cfg.get('bridge', {})
     if not isinstance(bridge_cfg, dict):
         log.warn("lxd/bridge config must be a dictionary. found a '%s'",
                  type(bridge_cfg))
Download as text