← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1597699] Re: cc_mcollective.py fails on Ubuntu16.04

 

This bug was fixed in the package cloud-init -
0.7.7~bzr1256-0ubuntu1~16.04.1

---------------
cloud-init (0.7.7~bzr1256-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

  * New upstream snapshot.
    - distros/debian.py: fix eni renderer to not render .link files
    - fixes for execution in python2.6.
    - ConfigDrive: fix writing of 'injected' files and legacy networking
      (LP: #1602373)
    - improvements to /etc/network/interfaces rendering including rendering
      of 'lo' devices and sorting attributes within a interface section.
    - fix mcollective module that was completely broken if using python3
      (LP: #1597699)

 -- Scott Moser <smoser@xxxxxxxxxx>  Fri, 15 Jul 2016 13:27:04 -0400

** Changed in: cloud-init (Ubuntu Xenial)
       Status: Fix Committed => 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/1597699

Title:
  cc_mcollective.py fails on Ubuntu16.04

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

Bug description:
  ---- Begin SRU Template ----
  [Impact]
  mcollective usage via cloud-init is not possible.

  [Test Case]
  launch instance with cloud-config containing 'mcollective' entry.

  $ cat >user-data <<"EOF"
  #cloud-config
  mcollective:
    conf:
      main_collective: mcollective
      collectives: mcollective
      libdir: /usr/share/mcollective/plugins
      logfile: /var/log/mcollective.log
      loglevel: debug
      daemonize: 1
      direct_addressing: 1
      ttl: 4294957
      securityprovider: psk
      plugin.psk: unset
      identity: 2

      connector: rabbitmq
      plugin.rabbitmq.vhost: mcollective
      plugin.rabbitmq.pool.size: 1
      plugin.rabbitmq.pool.1.host: 10.10.0.2
      plugin.rabbitmq.pool.1.port: 61613
      plugin.rabbitmq.pool.1.user: mcollective
      plugin.rabbitmq.pool.1.password: ScwpVo8egrZ0OmT6sRmp9zEA
      plugin.rabbitmq.heartbeat_interval: 30

      factsource: yaml
      plugin.yaml: /etc/mcollective/facts.yaml
  EOF

  $ keyname=brickies; image=$image;
  $ openstack server create \
     --key-name=$keyname --flavor=m1.small \
     --image=$image --user-data=user-data mcollective-test0

  # then ssh in and
  a.) verify mcollective package is installed
  $ dpkg-query --show mcollective
  mcollective 2.6.0+dfsg-2.1

  b.) verify mcollective service is running
  $ systemctl status mcollective

  c.) grep WARN /var/log/cloud-init.log && echo FAIL

  [Regression Potential]
  low to none.  This has been unfortunately broken since wily.

  [Other Info]
  ---- End SRU Template ----

  How to reproduce:

  #cat /etc/issue.net
  Ubuntu 16.04 LTS
  #( cd /var/lib/cloud/ && rm -rf * )
  #cloud-init -d init

  #grep ^mcollective: -A25 instance/user-data.txt
  mcollective:
    conf:
      main_collective: mcollective
      collectives: mcollective
      libdir: /usr/share/mcollective/plugins
      logfile: /var/log/mcollective.log
      loglevel: debug
      daemonize: 1
      direct_addressing: 1
      ttl: 4294957
      securityprovider: psk
      plugin.psk: unset
      identity: 2

      connector: rabbitmq
      plugin.rabbitmq.vhost: mcollective
      plugin.rabbitmq.pool.size: 1
      plugin.rabbitmq.pool.1.host: 10.10.0.2
      plugin.rabbitmq.pool.1.port: 61613
      plugin.rabbitmq.pool.1.user: mcollective
      plugin.rabbitmq.pool.1.password: ScwpVo8egrZ0OmT6sRmp9zEA
      plugin.rabbitmq.heartbeat_interval: 30

      factsource: yaml
      plugin.yaml: /etc/mcollective/facts.yaml

  #cloud-init -d single --name mcollective

  The log will contain

  Jun 30 08:26:43 node-2 [CLOUDINIT] util.py[DEBUG]: Running module
  mcollective (<module 'cloudinit.config.cc_mcollective' from
  '/usr/lib/python3/dist-packages/cloudinit/config/cc_mcollective.py'>)
  failed#012Traceback (most recent 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#012    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/lib/python3/dist-
  packages/cloudinit/config/cc_mcollective.py", line 83, in handle#012
  mcollective_config.write(contents)#012  File "/usr/lib/python3/dist-
  packages/configobj.py", line 2126, in write#012
  outfile.write(output_bytes)#012TypeError: string argument expected,
  got 'bytes'

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


References