Chef gem installer fails on ubuntu 14.04

Bug #1553345 reported by ryan vanniekerk
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Unassigned
cloud-init (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Running the "gem" version of the chef install fails on the latest Ubuntu server 14.04 LTS AMI (ami-fce3c696).

Here is part of my user-data for cloud init:

bootcmd:
  - apt-get update && apt-get upgrade cloud-init
  - apt-get install build-essential
  - apt-get install -q -y <%= find_in_map("SoftwarePropertiesPackage", ref("LCOSVersion"), "PackageName") %>
  - apt-add-repository -y ppa:brightbox/ruby-ng
  - echo "Updating package lists..."
  - apt-get update -qq
  - echo "Installing ruby..."
  - apt-get install -q -y ruby<%= find_in_map("RubyVersionToPackageInfo", ref("AppRubyVersion"), "Version") %>
  - apt-get install -q -y ruby<%= find_in_map("RubyVersionToPackageInfo", ref("AppRubyVersion"), "Version") %>-dev
  - update-alternatives --set ruby /usr/bin/ruby<%= find_in_map("RubyVersionToPackageInfo", ref("AppRubyVersion"), "Version") %>
  - update-alternatives --set gem /usr/bin/gem<%= find_in_map("RubyVersionToPackageInfo", ref("AppRubyVersion"), "Version") %>
  - echo "Updating rubygems to latest version..."
  - gem update --system --no-rdoc --no-ri
chef:
  install_type: gems
  version: <%= ref("ChefVersion") %>
.......

Here is the output from cloud-init

Mar 4 18:00:04 ip-xxxxxxx[CLOUDINIT] util.py[DEBUG]: Running chef (<module 'cloudinit.config.cc_chef' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_chef.pyc'>) failed#012Traceback (most recent call last):#012 File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 658, in _run_modules#012 cc.run(run_name, mod.handle, func_args, freq=freq)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/cloud.py", line 63, in run#012 return self._runners.run(name, functor, args, freq, clear_on_fail)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/helpers.py", line 197, in run#012 results = functor(*args)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_chef.py", line 99, in handle#012 install_chef_from_gems(cloud.distro, ruby_version, chef_version)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_chef.py", line 128, in install_chef_from_gems#012 distro.install_packages(get_ruby_packages(ruby_version))#012AttributeError: 'str' object has no attribute 'install_packages'

Tags: chef

Related branches

tags: added: chef
Scott Moser (smoser)
Changed in cloud-init:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

fixed in trunk at 1197

Changed in cloud-init (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
cloud-init (0.7.7~bzr1200-0ubuntu1) xenial; urgency=medium

  * New upstream snapshot.
    - fix adding of users when no group is specified (LP: #1562918)
    - fix write_files with compressed content (LP: #1565638)
    - systemd: do not specify After of obsolete syslog.target (LP: #1536964)
    - chef: fix chef installation from gems (LP: #1553345)
    - disk_setup: correctly send force to mkfs on block devices (LP: #1548772)
    - locale: list unsupported environment settings in warning (LP: #1558069)
    - fix NoCloud and other datasources if no datasource config (LP: #1514407)

 -- Scott Moser <email address hidden> Wed, 06 Apr 2016 13:07:27 -0400

Changed in cloud-init (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

This is fixed in cloud-init 0.7.7

Changed in cloud-init:
status: Fix Committed → Fix Released
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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