← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1583837] Re: cc_chef fails when using omnibus installer because UrlResponse doesn't have an 'encode' method

 

This bug was fixed in the package cloud-init -
0.7.9-66-g5beecdf8-0ubuntu1

---------------
cloud-init (0.7.9-66-g5beecdf8-0ubuntu1) zesty; urgency=medium

  * New upstream snapshot.
    - net: add renderers for automatically selecting the renderer.
    - doc: fix config drive doc with regard to unpartitioned disks.
      (LP: #1673818)
    - test: Adding integratiron test for password as list [Joshua Powers]
    - render_network_state: switch arguments around, do not require target
    - support 'loopback' as a device type.
    - Integration Testing: improve testcase subclassing [Wesley Wiedenmeier]
    - gitignore: adding doc/rtd_html [Joshua Powers]
    - doc: add instructions for running integration tests via tox.
      [Joshua Powers]
    - test: avoid differences in 'date' output due to daylight savings.
    - Fix chef config module in omnibus install. [Jeremy Melvin] (LP: #1583837)
    - Add feature flags to cloudinit.version. [Wesley Wiedenmeier]
    - tox: add a citest environment
    - Support chpasswd/list being a list in addition to a string.
      [Sergio Lystopad] (LP: #1665694)
    - doc: Fix configuration example for cc_set_passwords module.
      [Sergio Lystopad] (LP: #1665773)
    - net: support both ipv4 and ipv6 gateways in sysconfig.
      [Lars Kellogg-Stedman] (LP: #1669504)
    - net: do not raise exception for > 3 nameservers
      [Lars Kellogg-Stedman] (LP: #1670052)

 -- Scott Moser <smoser@xxxxxxxxxx>  Fri, 17 Mar 2017 21:41:40 -0400

** Changed in: cloud-init (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1583837

Title:
  cc_chef fails when using omnibus installer because UrlResponse doesn't
  have an 'encode' method

Status in cloud-init:
  Fix Committed
Status in cloud-init package in Ubuntu:
  Fix Released

Bug description:
  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 "/
  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'

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1583837/+subscriptions


References