Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc_chef fails when using 'gems' installer because Ruby 1.8 no longer available #2670

Open
ubuntu-server-builder opened this issue May 10, 2023 · 3 comments
Labels
bug Something isn't working correctly launchpad Migrated from Launchpad priority Fix soon

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1583841

Launchpad details
affected_projects = ['cloud-init (Ubuntu)']
assignee = jgrimm
assignee_name = Jon Grimm
date_closed = None
date_created = 2016-05-19T23:46:13.140887+00:00
date_fix_committed = None
date_fix_released = None
id = 1583841
importance = high
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1583841
milestone = None
owner = signe
owner_name = Katherine Rossiter
private = False
status = confirmed
submitter = signe
submitter_name = Katherine Rossiter
tags = ['chef', 'ruby']
duplicates = []

Launchpad user Katherine Rossiter(signe) wrote on 2016-05-19T23:46:13.140887+00:00

Ubuntu 16.04

dpkg -l | grep cloud-init

ii cloud-init 0.7.7~bzr1212-0ubuntu1 all Init scripts for cloud instances
ii cloud-initramfs-copymods 0.27ubuntu1 all copy initramfs modules into root filesystem for later use
ii cloud-initramfs-dyn-netconf 0.27ubuntu1 all write a network interface file in /run for BOOTIF

Minimum Ruby version supported in Ubuntu 16.04 is Ruby 2.3.

Syslog output:

May 19 23:41:38 ubuntu [CLOUDINIT] util.py[DEBUG]: apt-update [eatmydata apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet update] took 20.50
1 seconds
May 19 23:41:38 ubuntu [CLOUDINIT] util.py[DEBUG]: Running command ['eatmydata', 'apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--qui
et', 'install', 'ruby1.8', 'ruby1.8-dev', 'libopenssl-ruby1.8', 'rubygems1.8'] with allowed return codes [0] (shell=False, capture=False)
May 19 23:41:39 ubuntu [CLOUDINIT] util.py[DEBUG]: apt-install [eatmydata apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet install ruby1.8 r
uby1.8-dev libopenssl-ruby1.8 rubygems1.8] took 0.295 seconds
May 19 23:41:39 ubuntu [CLOUDINIT] handlers.py[DEBUG]: finish: modules-config/config-chef: FAIL: running config-chef with frequency once-per-instance
May 19 23:41:39 ubuntu [CLOUDINIT] util.py[WARNING]: Running module chef (<module 'cloudinit.config.cc_chef' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_chef.py'>) failed
May 19 23:41:39 ubuntu [CLOUDINIT] util.py[DEBUG]: Running module chef (<module 'cloudinit.config.cc_chef' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_chef.py'>) failed#012Traceback (most rec
ent call last):#12 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 739, in _run_modules#012 freq=freq)#12 File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 70, in run#0
12 return self._runners.run(name, functor, args, freq, clear_on_fail)#12 File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 199, in run#012 results = functor(*args)#12 File "/usr/l
ib/python3/dist-packages/cloudinit/config/cc_chef.py", line 257, in handle#012 run = install_chef(cloud, chef_cfg, log)#12 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_chef.py", line 296,
in install_chef#012 install_chef_from_gems(ruby_version, chef_version, cloud.distro)#12 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_chef.py", line 330, in install_chef_from_gems#012
distro.install_packages(get_ruby_packages(ruby_version))#12 File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 75, in install_packages#012 self.package_command('install', pkgs=pk
glist)#12 File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 176, in package_command#012 args=(cmd,), kwargs={'env': e, 'capture': False})#12 File "/usr/lib/python3/dist-packag
es/cloudinit/util.py", line 2040, in log_time#012 ret = func(*args, **kwargs)#12 File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1704, in subp#012 cmd=args)#012cloudinit.util.Process
ExecutionError: Unexpected error while running command.#012Command: ['eatmydata', 'apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--qu
iet', 'install', 'ruby1.8', 'ruby1.8-dev', 'libopenssl-ruby1.8', 'rubygems1.8']#012Exit code: 100#012Reason: -#012Stdout: ''#012Stderr: ''

apt-cache policy ruby

ruby:
Installed: (none)
Candidate: 1:2.3.0+1
Version table:
1:2.3.0+1 500
500 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

apt-cache search ^ruby

rake - ruby make-like utility
ruby - Interpreter of object-oriented scripting language Ruby (default version)
ruby-all-dev - Ruby development environment (all versions supported in Debian)
ruby-dev - Header files for compiling extension modules for Ruby (default version)
ruby-did-you-mean - smart error messages for Ruby > 2.3
ruby-minitest - Ruby test tools supporting TDD, BDD, mocking, and benchmarking
ruby-net-telnet - telnet client library
ruby-power-assert - library showing values of variables and method calls in an expression
ruby-rrd - time-series data storage and display system (Ruby interfaces)
ruby-test-unit - unit testing framework for Ruby
ruby2.3 - Interpreter of object-oriented scripting language Ruby
ruby2.3-dev - Header files for compiling extension modules for the Ruby 2.3
ruby2.3-doc - Documentation for Ruby 2.3

@ubuntu-server-builder ubuntu-server-builder added bug Something isn't working correctly launchpad Migrated from Launchpad priority Fix soon labels May 10, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Jon Grimm(jgrimm) wrote on 2017-03-31T13:23:32.141864+00:00

Reproduced. Unfortunately, there's probably not a workaround in setting just setting (undocumented) 'ruby_version' in the config, as it seems to now require 'gcc' and possibly make as additional packages. I'd like to find someway to make this a bit less fragile to breaking, it would also be nice to make this work on debian and fedoras, but that'll probably have to wait for another day as I'd like to get things back to working state.

@aciba90
Copy link
Contributor

aciba90 commented Jun 6, 2023

Closing this, as it is an Ubuntu downstream issue, and Ubuntu 16.04 is in extended support mode (only security updates).

@aciba90 aciba90 closed this as completed Jun 6, 2023
@TheRealFalcon TheRealFalcon changed the title cc_chef fails when using 'gems' installer because Ubuntu 16.04 no longer includes Ruby 1.8 cc_chef fails when using 'gems' installer because Ruby 1.8 no longer available Jun 6, 2023
@TheRealFalcon TheRealFalcon reopened this Jun 6, 2023
@TheRealFalcon
Copy link
Member

TheRealFalcon commented Jun 6, 2023

This was filed against Ubuntu 16.04, but this same error still happens in 23.04 and is a problem we need to fix upstream in a more generic manner. I changed the title accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly launchpad Migrated from Launchpad priority Fix soon
Projects
None yet
Development

No branches or pull requests

3 participants