mcollective fail

Bug #1101821 reported by Israel Calvete
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Unassigned
cloud-init (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Won't Fix
Low
Unassigned

Bug Description

I try to config my ec2 instances using cloud-init, puppet and mcollective.

My ami is ami-c1aaabb5 (ubuntu precise pangolin)

My cloud-init script is:

#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: true
apt_pipelining: False
apt_preserve_sources_list: true
packages:
        - puppet
        - mcollective
        - mcollective-plugins-puppetd
locale: es_ES.UTF-8
locale_configfile: /etc/default/locale
timezone: Europe/Madrid
hostname: puppetagent2-test
fqdn: puppetagent2-test.xxxxxxx.xxxx
manage_etc_hosts: true
output:
        init: "> /var/log/my-cloud-init.log"
        config: [ ">> /tmp/my-cloud-config.out", "> /tmp/my-cloud-config.err" ]
        final:
                output: "| tee /tmp/my-cloud-config.stdout | tee /tmp/my-cloud-config.stdout"
                error: "&1"
puppet:
        conf:
                main:
                        pluginsync: true
                        server: "puppet-test.xxxxxxx.xxxx"
                master:
                        certname: "puppet-test.xxxxxxx.xxxx"
mcollective:
        conf:
                plugin.stomp.host: "puppet-test.xxxxxxx.xxxx"
                plugin.stomp.port: "61613"
                plugin.stomp.user: "guest"
                plugin.stomp.password: "guest"

Puppet config works fine but mcollectice don't

In the error log of cloud-init i can see:

  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/cc_mcollective.py", line 79, in handle
    for o, v in cfg.iteritems():
AttributeError: 'str' object has no attribute 'iteritems'

After see the code, I think that cfg always will be an str.

It seem like if be a bug but i don't know.

i try to trick it with:

mcollective:
        conf:
                plugin.stomp:
                        plugin.stomp.host: "puppet-test..xxxxxxx.xxxx"
                        plugin.stomp.port: "61613"
                        plugin.stomp.user: "guest"
                        plugin.stomp.password: "guest"

but...

  File "/usr/lib/python2.7/ConfigParser.py", line 396, in set
    raise NoSectionError(section)
NoSectionError: No section: 'plugin.stomp'

Revision history for this message
Scott Moser (smoser) wrote :

Can you please verify if this is still a problem against either trunk or quantal or raring?
I suspect it is fixed in all of those.

It should only currently be a problem in 12.04

Revision history for this message
Israel Calvete (icalvete) wrote :

Verified. In Quantal works fine!!!!

Revision history for this message
Israel Calvete (icalvete) wrote :

Easy workarround in precise pangolin.

runcmd:
        - [ntpdate, pool.ntp.or]
        - [sed, -i, /etc/mcollective/server.cfg, -e, 's/plugin.stomp.host= .*/plugin.stomp.host= xxxxxxxxxxx/']
        - [sed, -i, /etc/mcollective/server.cfg, -e, 's/plugin.stomp.password= .*/plugin.stomp.password= xxxxxxxx/']

Scott Moser (smoser)
Changed in cloud-init:
status: New → Fix Released
Changed in cloud-init (Ubuntu):
status: New → Fix Released
Changed in cloud-init (Ubuntu Precise):
status: New → Confirmed
importance: Undecided → Low
Changed in cloud-init:
importance: Undecided → Medium
Changed in cloud-init (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in cloud-init (Ubuntu Precise):
status: Confirmed → Won't Fix
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.