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

Pinned Erlang fails to install from Bintray on Ubuntu #525

devsibwarra opened this issue Apr 26, 2019 · 1 comment · Fixed by #526


Copy link

commented Apr 26, 2019

I'm using the erlang packages distributed by RabbitMQ on bintray. The Chef run is successful if I choose the latest version in that repo. If I choose an older Erlang release, the Chef run fails.

Cookbook Version: 5.8.0
OS Info: Ubuntu Xenial
Chef Client: 14.10.9

Node configs

  'rabbitmq' => {
    'erlang' => {
      'enabled' => true,
      'version' => '1:21.3.3-1',
      'apt' => {
        'components' => ['erlang-21.x'],

Chef run error

apt_package[rabbitmq_erlang-erlang-base] (/tmp/cookbooks/rabbitmq/providers/erlang_package_from_bintray.rb line 37) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of ["apt-get", "-q", "-y", "--allow-downgrades", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "--fix-missing", "install", "erlang-base=1:21.3.3-1"] ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 erlang-crypto : Depends: erlang-base (= 1:21.3.7-1) but 1:21.3.3-1 is to be installed or
                          erlang-base-hipe (= 1:21.3.7-1) but it is not going to be installed
STDERR: E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
---- End output of ["apt-get", "-q", "-y", "--allow-downgrades", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "--fix-missing", "install", "erlang-base=1:21.3.3-1"] ----
Ran ["apt-get", "-q", "-y", "--allow-downgrades", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "--fix-missing", "install", "erlang-base=1:21.3.3-1"] returned 100

Resource Declaration:
# In /tmp/cookbooks/rabbitmq/recipes/erlang_package.rb

 42:   rabbitmq_erlang_package_from_bintray 'rabbitmq_erlang' do
 43:     use_hipe node['rabbitmq']['erlang']['hipe']
 44:     version erlang_version unless erlang_version.nil?
 46:     options node['rabbitmq']['erlang']['apt']['install_options'] unless node['rabbitmq']['erlang']['apt']['install_options'].nil?
 47:     retry_delay node['rabbitmq']['erlang']['retry_delay'] unless node['rabbitmq']['erlang']['retry_delay'].nil?
 48:   end
 49: end

Compiled Resource:
# Declared in /tmp/cookbooks/rabbitmq/recipes/erlang_package.rb:42:in `from_file'

rabbitmq_erlang_package_from_bintray("rabbitmq_erlang") do
  action [:install]
  default_guard_interpreter :default
  declared_type :rabbitmq_erlang_package_from_bintray
  cookbook_name "rabbitmq"
  recipe_name "erlang_package"
  use_hipe false
  version "1:21.3.3-1"
  options ["--fix-missing"]
  retry_delay 10

System Info:
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]

I think the correct fix for this would be to prepend base_pkg string to the DEBIAN_PACKAGES constant in providers/erlang_package_from_bintray.rb, then get rid of the resources that interact with just base_pkg

@devsibwarra devsibwarra referenced this issue Apr 26, 2019
3 of 11 tasks complete
@michaelklishin michaelklishin added this to the 5.8.1 milestone Apr 29, 2019
@michaelklishin michaelklishin added the bug label Apr 29, 2019

This comment has been minimized.

Copy link

commented Apr 29, 2019

Good find, thank you for #526!

@michaelklishin michaelklishin changed the title Erlang Install Issue on Ubuntu Pinned Erlang fails to install from Bintray on Ubuntu Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.