bionic cloud-init 18.2 WARNING Juju's 'runcmd' stanza
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Invalid
|
High
|
Unassigned | ||
2.3 |
Invalid
|
High
|
Unassigned | ||
cloud-init |
Fix Released
|
Medium
|
Scott Moser | ||
cloud-init (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
I haven't quite figured out what is wrong, but I tried bootstrapping bionic with Juju 2.3.6 (proposed) today. I had been successfully bootstrapping on LXD bionic as of last week. This was my first attempt to bootstrap on a MAAS image of bionic.
The cloud init version reported in /var/log/
(It may be that it has been "successfully" bootstrapping, but this error has been in the logs and we just didn't notice it.)
Cloud-init v. 18.2 running 'modules:config' at Mon, 16 Apr 2018 05:51:08 +0000. Up 28.17 seconds.
2018-04-16 05:51:08,730 - util.py[WARNING]: Running module apt-configure (<module 'cloudinit.
2018-04-16 05:51:08,930 - schema.py[WARNING]: Invalid config:
runcmd: ['set -xe', "mkdir -p '/var/lib/
I wasn't able to easily figure out what the schema is for cloud-init, as it seems to be read from a file. I imagine it is available somewhere.
I don't know if we're doing something wrong, or if the schema is incorrectly stating that "runcmd" cannot have the same bit of text twice. I'm guessing its complaining because we pass "set -xe" in 2 different places?
Related branches
- Douglas Jordan: Pending requested
- Chad Smith: Pending requested
-
Diff: 170 lines (+86/-8)2 files modifiedcloudinit/sources/DataSourceAzure.py (+14/-6)
tests/unittests/test_datasource/test_azure.py (+72/-2)
- Server Team CI bot: Approve (continuous-integration)
- Chad Smith: Approve
-
Diff: 177 lines (+82/-7)7 files modifiedcloudinit/config/cc_bootcmd.py (+0/-1)
cloudinit/config/cc_runcmd.py (+0/-1)
cloudinit/config/cc_snap.py (+0/-1)
cloudinit/config/cc_ubuntu_advantage.py (+0/-1)
cloudinit/config/tests/test_snap.py (+36/-0)
tests/unittests/test_handler/test_handler_bootcmd.py (+23/-1)
tests/unittests/test_handler/test_handler_runcmd.py (+23/-2)
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
summary: |
- bionic cloud-init 18.2 refuses Juju's 'runcmd' stanza + bionic cloud-init 18.2 WARNING Juju's 'runcmd' stanza |
Changed in cloud-init: | |
status: | New → In Progress |
assignee: | nobody → Scott Moser (smoser) |
importance: | Undecided → Medium |
Changed in juju: | |
status: | Triaged → Incomplete |
Changed in juju: | |
status: | Incomplete → Invalid |
I think for Juju this is a case where we do different setup on MAAS than on LXD. Specifically w/ the same 2.3.6 and LXD I see: system/ juju-clean- shutdown. service cies=false
Cloud-init v. 18.2 running 'modules:config' at Mon, 16 Apr 2018 06:11:54 +0000. Up 16.00 seconds.
+ install -D -m 644 /dev/null /etc/systemd/
+ printf %s\n
[Unit]
Description=Stop all network interfaces on shutdown
DefaultDependen
After=final.target
[Service] /sbin/ifdown -a -v --force
Type=oneshot
ExecStart=
StandardOutput=tty
StandardError=tty
[Install] final.target
WantedBy=
+ /bin/systemctl enable /etc/systemd/ system/ juju-clean- shutdown. service system/ final.target. wants/juju- clean-shutdown. service → /etc/systemd/ system/ juju-clean- shutdown. service. juju/nonce. txt bootstrap var/lib/ cloud/seed/ nocloud- net][dsmode= net]. Up 17.00 seconds
Created symlink /etc/systemd/
+ install -D -m 644 /dev/null /var/lib/
+ printf %s\n user-admin:
Cloud-init v. 18.2 running 'modules:final' at Mon, 16 Apr 2018 06:11:55 +0000. Up 17.00 seconds.
Cloud-init v. 18.2 finished at Mon, 16 Apr 2018 06:11:55 +0000. Datasource DataSourceNoCloud [seed=/
while on MAAS I had: config. cc_apt_ configure' from '/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_apt_ configure. py'>) failed juju'\ncat > '/var/lib/ juju/MAASmachin e.txt' << 'EOF'\n'hostname: nuc7\n'\nEOF\nchmod 0755 '/var/lib/ juju/MAASmachin e.txt'" , 'set -xe', "install -D -m 644 /dev/null '/etc/systemd/ system/ juju-clean- shutdown. service' ", "printf '%s\\n' '\n[Unit] \nDescription= Stop all network interfaces on shutdown\ nDefaultDepende ncies=false\ nAfter= final.target\ n\n[Service] \nType= oneshot\ nExecStart= /sbin/ifdown -a -v --force\ nStandardOutput =tty\nStandardE rror=tty\ n\n[Install] \nWantedBy= final.target\ n' > '/etc/systemd/ system/ juju-clean- shutdown. service' ", "/bin/systemctl enable '/etc/systemd/ system/ juju-clean- shutdown. service' ", "install -D -m 644 /dev/null '/var/lib/ juju/nonce. txt'", "printf '%s\\n' 'user-admin: bootstrap' > '/var/lib/ juju/nonce. txt'"] has non-unique elements archive. ubuntu. com/ubuntu bionic InRelease archive. ubuntu. com/ubuntu bionic-updates InRelease archive. ubuntu. com/ubuntu bionic-backports InRelease archive. ubuntu. com/ubuntu bionic-security InRelease archive. ubuntu. com/ubuntu bionic/main Translation-en [516 kB] archive. ubuntu. com/ubuntu bionic/restricted Translation-en [3452 B] archive. ubuntu. com/ubuntu bionic/universe Translation-en [4942 kB] archive. ubuntu. com/ubuntu bionic/multiverse Translation-en [108 kB]
Cloud-init v. 18.2 running 'modules:config' at Mon, 16 Apr 2018 05:51:08 +0000. Up 28.17 seconds.
2018-04-16 05:51:08,730 - util.py[WARNING]: Running module apt-configure (<module 'cloudinit.
2018-04-16 05:51:08,930 - schema.py[WARNING]: Invalid config:
runcmd: ['set -xe', "mkdir -p '/var/lib/
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Fetched 5570 kB in 3s (2055 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
ifupdown
The following NEW packages will be installed:
bridge-utils
0 upgraded, 1 newly installed, 0 to remove and 1 not ...