** Description changed:

  ---- 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.) verifiy 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'

** Also affects: cloud-init (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Xenial)
   Importance: Undecided
       Status: New

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

** Changed in: cloud-init (Ubuntu)
   Importance: Undecided => High

** Changed in: cloud-init (Ubuntu Xenial)
       Status: New => Confirmed

** Changed in: cloud-init (Ubuntu Xenial)
   Importance: Undecided => High

** Changed in: cloud-init
       Status: Confirmed => Fix Committed

-- 
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:
  Confirmed

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.) verifiy 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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to