summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-05-26 09:02:17 -0400
committerScott Moser <smoser@ubuntu.com>2016-05-26 09:02:17 -0400
commit63501f44eff7ef2d6083900c47180faf444662fc (patch)
treecfa2e50e178a77a3c84194a7416d5cbd02d1dc83
parent6115beae5f7b87f2dd684deec422f1b21d3cd4eb (diff)
downloadvyos-cloud-init-63501f44eff7ef2d6083900c47180faf444662fc.tar.gz
vyos-cloud-init-63501f44eff7ef2d6083900c47180faf444662fc.zip
kernel command line: override all local settings
settings on the kernel command line (cc:) were documented to override all local settings, but a bug in implementation meant they would only override those that are in /etc/cloud/cloud.cfg, not any found in /etc/cloud/cloud.cfg.d. LP: #1582323
-rw-r--r--ChangeLog2
-rw-r--r--cloudinit/stages.py10
2 files changed, 7 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6748e8fa..8db29e2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -110,6 +110,8 @@
- Paths: fix instance path if datasource's id has a '/'. (LP: #1575938)
[Robert Jennings]
- Ec2: do not retry requests for user-data path on 404.
+ - settings on the kernel command line (cc:) override all local settings
+ rather than only those in /etc/cloud/cloud.cfg (LP: #1582323)
0.7.6:
- open 0.7.6
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index 62d066de..002e5832 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -794,16 +794,16 @@ class Modules(object):
def fetch_base_config():
base_cfgs = []
default_cfg = util.get_builtin_cfg()
- kern_contents = util.read_cc_from_cmdline()
-
- # Kernel/cmdline parameters override system config
- if kern_contents:
- base_cfgs.append(util.load_yaml(kern_contents, default={}))
# Anything in your conf.d location??
# or the 'default' cloud.cfg location???
base_cfgs.append(util.read_conf_with_confd(CLOUD_CONFIG))
+ # Kernel/cmdline parameters override system config
+ kern_contents = util.read_cc_from_cmdline()
+ if kern_contents:
+ base_cfgs.append(util.load_yaml(kern_contents, default={}))
+
# And finally the default gets to play
if default_cfg:
base_cfgs.append(default_cfg)