← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1553345] [NEW] Chef gem installer fails on ubuntu 14.04

 

Public bug reported:

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'

** Affects: cloud-init
     Importance: Undecided
         Status: New


** Tags: chef

** Tags added: chef

-- 
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/1553345

Title:
  Chef gem installer fails on ubuntu 14.04

Status in cloud-init:
  New

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'

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


Follow ups