cloud-init process fails to configure puppet

Bug #1699282 reported by Marc Methot on 2017-06-20
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Chad Smith

Bug Description

At firstboot when cloud-init is initiated.
The cloud-init process fails to configure puppet, the python script exits with a trace.

1. redhat/tripleo
2. cloud-init-0.7.9-3.el7
3. in the attachment

Related branches

Marc Methot (mb-methot) wrote :
Marc Methot (mb-methot) wrote :

2017-06-15 14:55:05,046 - stages.py[DEBUG]: Running module puppet (<module 'cloudinit.config.cc_puppet' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_puppet.pyc'>) with frequency once-per-instance
2017-06-15 14:55:05,046 - handlers.py[DEBUG]: start: modules-config/config-puppet: running config-puppet with frequency once-per-instance
2017-06-15 14:55:05,046 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/0161553d-9c58-45a7-8de2-eded2b6ea750/sem/config_puppet - wb: [420] 19 bytes
2017-06-15 14:55:05,047 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/0161553d-9c58-45a7-8de2-eded2b6ea750/sem/config_puppet (recursive=False)
2017-06-15 14:55:05,047 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/0161553d-9c58-45a7-8de2-eded2b6ea750/sem/config_puppet (recursive=False)
2017-06-15 14:55:05,047 - helpers.py[DEBUG]: Running config-puppet using lock (<FileLock using file '/var/lib/cloud/instances/0161553d-9c58-45a7-8de2-eded2b6ea750/sem/config_puppet'>)
2017-06-15 14:55:05,048 - cc_puppet.py[DEBUG]: Attempting to install puppet latest,
2017-06-15 14:55:05,048 - util.py[DEBUG]: Running command ['yum', '-t', '-y', 'install', 'puppet'] with allowed return codes [0] (shell=False, capture=False)
2017-06-15 14:55:10,213 - util.py[DEBUG]: Reading from /etc/puppet/puppet.conf (quiet=False)
2017-06-15 14:55:10,215 - util.py[DEBUG]: Read 853 bytes from /etc/puppet/puppet.conf
2017-06-15 14:55:10,232 - util.py[DEBUG]: Renaming /etc/puppet/puppet.conf to /etc/puppet/puppet.conf.old
2017-06-15 14:55:10,232 - handlers.py[DEBUG]: finish: modules-config/config-puppet: FAIL: running config-puppet with frequency once-per-instance
2017-06-15 14:55:10,233 - util.py[WARNING]: Running module puppet (<module 'cloudinit.config.cc_puppet' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_puppet.pyc'>) failed
2017-06-15 14:55:10,233 - util.py[DEBUG]: Running module puppet (<module 'cloudinit.config.cc_puppet' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_puppet.pyc'>) failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 776, in _run_modules
    freq=freq)
  File "/usr/lib/python2.7/site-packages/cloudinit/cloud.py", line 54, in run
    return self._runners.run(name, functor, args, freq, clear_on_fail)
  File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 187, in run
    results = functor(*args)
  File "/usr/lib/python2.7/site-packages/cloudinit/config/cc_puppet.py", line 145, in handle
    util.write_file(PUPPET_CONF_PATH, puppet_config.stringify())
  File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 442, in stringify
    with six.StringIO() as outputstream:
AttributeError: StringIO instance has no attribute '__exit__'

Marc Methot (mb-methot) wrote :

Not sure why, but I couldn't link related branch where I added a potential fix.
~mb-methot/cloud-init:bug/1699282

Scott Moser (smoser) on 2017-07-11
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
Chad Smith (chad.smith) on 2017-08-16
Changed in cloud-init:
assignee: nobody → Chad Smith (chad.smith)
Chad Smith (chad.smith) on 2017-08-23
Changed in cloud-init:
status: Confirmed → Fix Committed

This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers