** Also affects: cloud-init (Ubuntu Yakkety) Importance: Undecided Status: New
** Also affects: cloud-init (Ubuntu Xenial) Importance: Undecided Status: New ** 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 changed: + === 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://example.com/" + validation_name: "my-validation-name" + EOF + ) + + $ lxc launch ubuntu-daily:zesty z1 "--config=user.user-data=$mycfg" + $ sleep 10 + $ lxc file pull z1/var/log/cloud-init.log - | grep WARN + 2017-03-13 18:17:20,193 - util.py[WARNING]: Running module chef (<module 'cloudinit.config.cc_chef' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_chef.py'>) failed + + After the fix, we do not see any WARN in the log and also + $ lxc file pull z1/var/log/cloud-init-output.log - | grep -i Setting + + [Regression Potential] + Low, was completely broken before (no chef installed) + + [Other Info] + Upstream commit: + https://git.launchpad.net/cloud-init/commit/?id=482b2746b591923 + + === End SRU Template === + ~ + Ubuntu 16.04 # dpkg -l | grep cloud-init ii cloud-init 0.7.7~bzr1212-0ubuntu1 all Init scripts for cloud instances ii cloud-initramfs-copymods 0.27ubuntu1 all copy initramfs modules into root filesystem for later use ii cloud-initramfs-dyn-netconf 0.27ubuntu1 all write a network interface file in /run for BOOTIF 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.config.cc_chef' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_chef.py'>) failed#012Traceback (most rec ent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 739, in _run_modules#012 freq=freq)#012 File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 70, in run#0 12 return self._runners.run(name, functor, args, freq, clear_on_fail)#012 File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 199, in run#012 results = functor(*args)#012 File "/usr/l ib/python3/dist-packages/cloudinit/config/cc_chef.py", line 257, in handle#012 run = install_chef(cloud, chef_cfg, log)#012 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_chef.py", line 313, - in install_chef#012 util.write_file(tmpf, content, mode=0o700)#012 File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1643, in write_file#012 content = encode_text(content)#012 File "/ + in install_chef#012 util.write_file(tmpf, content, mode=0o700)#012 File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1643, in write_file#012 content = encode_text(content)#012 File "/ usr/lib/python3/dist-packages/cloudinit/util.py", line 97, in encode_text#012 return text.encode(encoding)#012AttributeError: 'UrlResponse' object has no attribute 'encode' -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583837 Title: cc_chef fails when using omnibus installer because UrlResponse doesn't have an 'encode' method To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1583837/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs