cc_chef fails when using omnibus installer because UrlResponse doesn't have an 'encode' method
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Unassigned | ||
cloud-init (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
Installation of chef via 'omnibus' did not work.
[Test Case]
$ mycfg=$(cat <<EOF
#cloud-config
chef:
install_type: omnibus
server_url: "http://
validation_name: "my-validation-
EOF
)
$ lxc launch ubuntu-daily:zesty z1 "--config=
$ sleep 10
$ lxc file pull z1/var/
2017-03-13 18:17:20,193 - util.py[WARNING]: Running module chef (<module 'cloudinit.
After the fix, we do not see any WARN in the log and also
$ lxc file pull z1/var/
[Regression Potential]
Low, was completely broken before (no chef installed)
[Other Info]
Upstream commit:
https:/
=== End SRU Template ===
~
Ubuntu 16.04
# dpkg -l | grep cloud-init
ii cloud-init 0.7.7~bzr1212-
ii cloud-initramfs
ii cloud-initramfs
util.write_file is trying to UTF-8 encode the text before writing, but UrlResponse doesn't have an "encode" method.
Trace from syslog:
May 19 23:27:09 ubuntu [CLOUDINIT] util.py[DEBUG]: Running module chef (<module 'cloudinit.
ent call last):#012 File "/usr/lib/
12 return self._runners.
ib/python3/
in install_chef#012 util.write_
usr/lib/
Related branches
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 13 lines (+1/-1)1 file modifiedcloudinit/config/cc_chef.py (+1/-1)
tags: | added: omnibus |
Changed in cloud-init (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in cloud-init (Ubuntu): | |
importance: | Medium → High |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
Changed in cloud-init (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Yakkety): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Yakkety): | |
importance: | Undecided → Medium |
description: | updated |
tags: |
added: verification-done-xenial verification-done-yakkety removed: verification-needed |
$ mycfg=$(cat <<EOF example. com/" name"
#cloud-config
chef:
install_type: omnibus
server_url: "http://
validation_name: "my-validation-
EOF
)
$ lxc launch ubuntu-daily:zesty z1 "--config= user.user- data=$mycfg" log/cloud- init.log - | grep WARN config. cc_chef' from '/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_chef. py'>) failed
$ sleep 10
$ lxc file pull z1/var/
2017-03-13 18:17:20,193 - util.py[WARNING]: Running module chef (<module 'cloudinit.
After the fix, we do not see any WARN in the log and also log/cloud- init-output. log - | grep -i Setting
$ lxc file pull z1/var/
Setting up chef (12.19.36-1) ...