Project

General

Profile

Actions

Bug #7004

closed

foreman-compute on Ubuntu 14.04: nokogiri dependency problems

Added by Mattias Giese almost 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Debian/Ubuntu
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Heya,

trying to install foreman/foreman-proxy on Ubuntu 14.04.
I selected foreman-compute-lbvirt, as i want to manage a hypervisor with foreman.
While running foreman-installer it encounters an error and stops. Looking at the log, it seems to be having issues with the postinst script of ruby-foreman-setup. Here are the things i encountered:

Preparing installation Done                                              
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/foreman-installer.log
root@mgmt:~# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up ruby-foreman-hooks (0.3.4) ...
dpkg: error processing package ruby-foreman-hooks (--configure):
 subprocess installed post-installation script returned error exit status 6
Setting up ruby-foreman-setup (2.0.4) ...
dpkg: error processing package ruby-foreman-setup (--configure):
 subprocess installed post-installation script returned error exit status 6
Setting up ruby-foreman-templates (1.4.0-1) ...
dpkg: error processing package ruby-foreman-templates (--configure):
 subprocess installed post-installation script returned error exit status 7
Errors were encountered while processing:
 ruby-foreman-hooks
 ruby-foreman-setup
 ruby-foreman-templates
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@mgmt:~# apt-get remove ruby-foreman-hooks
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  ruby-foreman-hooks
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 35.8 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 74616 files and directories currently installed.)
Removing ruby-foreman-hooks (0.3.4) ...
Setting up ruby-foreman-setup (2.0.4) ...
dpkg: error processing package ruby-foreman-setup (--configure):
 subprocess installed post-installation script returned error exit status 6
Setting up ruby-foreman-templates (1.4.0-1) ...
dpkg: error processing package ruby-foreman-templates (--configure):
 subprocess installed post-installation script returned error exit status 7
Errors were encountered while processing:
 ruby-foreman-setup
 ruby-foreman-templates
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@mgmt:~# apt-get remove ruby-foreman-templates
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  git git-man liberror-perl
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  ruby-foreman-templates
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 35.8 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 74612 files and directories currently installed.)
Removing ruby-foreman-templates (1.4.0-1) ...
Setting up ruby-foreman-setup (2.0.4) ...
dpkg: error processing package ruby-foreman-setup (--configure):
 subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
 ruby-foreman-setup
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@mgmt:~# bash -x /var/lib/dpkg/info/ruby-foreman-setup.postinst
+ '[' '!' -z '' ']'
+ set -e
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/ruby-foreman-setup.postinst
Use of uninitialized value $action in string eq at /usr/share/debconf/frontend line 27.
^C
root@mgmt:~# DEBUG=1  bash -x /var/lib/dpkg/info/ruby-foreman-setup.postinst
+ '[' '!' -z 1 ']'
+ set -x
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/ruby-foreman-setup.postinst
Use of uninitialized value $action in string eq at /usr/share/debconf/frontend line 27.
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z  ]
+ exec
+ [  ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ LOGFILE=/var/log/foreman-install.log
+ PLUGIN=foreman_bootdisk
+ trap db_stop EXIT
+ cd /usr/share/foreman
+ [ ! -z 1 ]
+ bundle show foreman_bootdisk
+ bundle install
Fetching from: https://rubygems.org/api/v1/dependencies
HTTP Success
Fetching gem metadata from https://rubygems.org/
Query List: ["rails", "json", "rest-client", "audited-activerecord", "will_paginate", "ancestry", "scoped_search", "net-ldap", "uuidtools", "apipie-rails", "rabl", "oauth", "deep_cloneable", "foreigner", "safemode", "ruby_parser", "foreman_bootdisk", "fog", "fog-core", "unf", "pg", "fast_gettext", "gettext_i18n_rails", "gettext_i18n_rails_js", "i18n_data", "foreman_setup", "ruby-libvirt"]
Query Gemcutter Dependency Endpoint API: rails,json,rest-client,audited-activerecord,will_paginate,ancestry,scoped_search,net-ldap,uuidtools,apipie-rails,rabl,oauth,deep_cloneable,foreigner,safemode,ruby_parser,foreman_bootdisk,fog,fog-core,unf,pg,fast_gettext,gettext_i18n_rails,gettext_i18n_rails_js,i18n_data,foreman_setup,ruby-libvirt
Fetching from: https://rubygems.org/api/v1/dependencies?gems=rails,json,rest-client,audited-activerecord,will_paginate,ancestry,scoped_search,net-ldap,uuidtools,apipie-rails,rabl,oauth,deep_cloneable,foreigner,safemode,ruby_parser,foreman_bootdisk,fog,fog-core,unf,pg,fast_gettext,gettext_i18n_rails,gettext_i18n_rails_js,i18n_data,foreman_setup,ruby-libvirt
HTTP Success
Query List: ["jeweler", "activerecord", "appraisal", "sqlite3", "activesupport", "multi_json", "rake", "actionpack", "actionmailer", "actionwebservice", "activeresource", "railties", "bundler", "sprockets-rails", "actionview", "activemodel", "unf_ext", "rake-compiler", "rspec", "launchy", "mime-types", "rdoc", "netrc", "ffi", "sexp_processor", "ParseTree", "hoe", "ruby-hmac", "newgem", "rack", "fog-softlayer", "fog-brightbox", "ipaddress", "nokogiri", "fog-json", "builder", "excon", "formatador", "net-ssh", "named-parameters", "net-scp", "google-api-client", "unicode", "ruby2ruby", "audited", "gettext", "po_to_json", "deface"]
Query Gemcutter Dependency Endpoint API: jeweler,activerecord,appraisal,sqlite3,activesupport,multi_json,rake,actionpack,actionmailer,actionwebservice,activeresource,railties,bundler,sprockets-rails,actionview,activemodel,unf_ext,rake-compiler,rspec,launchy,mime-types,rdoc,netrc,ffi,sexp_processor,ParseTree,hoe,ruby-hmac,newgem,rack,fog-softlayer,fog-brightbox,ipaddress,nokogiri,fog-json,builder,excon,formatador,net-ssh,named-parameters,net-scp,google-api-client,unicode,ruby2ruby,audited,gettext,po_to_json,deface
Fetching from: https://rubygems.org/api/v1/dependencies?gems=jeweler,activerecord,appraisal,sqlite3,activesupport,multi_json,rake,actionpack,actionmailer,actionwebservice,activeresource,railties,bundler,sprockets-rails,actionview,activemodel,unf_ext,rake-compiler,rspec,launchy,mime-types,rdoc,netrc,ffi,sexp_processor,ParseTree,hoe,ruby-hmac,newgem,rack,fog-softlayer,fog-brightbox,ipaddress,nokogiri,fog-json,builder,excon,formatador,net-ssh,named-parameters,net-scp,google-api-client,unicode,ruby2ruby,audited,gettext,po_to_json,deface
HTTP Success
Query List: ["RubyInline", "SexpProcessor", "erubis", "archive-tar-minitar", "rcov", "sprockets", "aruba", "thor", "RedCloth", "syntax", "rubigen", "cucumber", "signet", "addressable", "httpadapter", "extlib", "sinatra", "liquid", "autoparse", "faraday", "jwt", "retriable", "colorize", "spoon", "configuration", "rspec-core", "rspec-expectations", "rspec-mocks", "diff-lcs", "spicycode-rcov", "test-spec", "camping", "fcgi", "memcache-client", "mongrel", "ruby-openid", "thin", "locale", "levenshtein", "text", "minitest", "rubyforge", "gemcutter", "mini_portile", "racc", "tenderlove-frex", "rexical", "weakling", "git", "thoughtbot-shoulda", "mhennemeyer-output_catcher", "rr", "mocha", "redgreen", "peterwald-git", "schacon-git", "github_api", "highline", "bones", "needle", "jruby-pageant", "echoe", "rails-observers", "mail", "text-format", "i18n", "bcrypt-ruby", "arel", "tzinfo", "activerecord-deprecated_finders", "rack-test", "rack-mount", "rack-cache", "journey", "rack-ssl", "thread_safe", "pry-debugger", "fog-xml", "inflecto"]
Query Gemcutter Dependency Endpoint API: RubyInline,SexpProcessor,erubis,archive-tar-minitar,rcov,sprockets,aruba,thor,RedCloth,syntax,rubigen,cucumber,signet,addressable,httpadapter,extlib,sinatra,liquid,autoparse,faraday,jwt,retriable,colorize,spoon,configuration,rspec-core,rspec-expectations,rspec-mocks,diff-lcs,spicycode-rcov,test-spec,camping,fcgi,memcache-client,mongrel,ruby-openid,thin,locale,levenshtein,text,minitest,rubyforge,gemcutter,mini_portile,racc,tenderlove-frex,rexical,weakling,git,thoughtbot-shoulda,mhennemeyer-output_catcher,rr,mocha,redgreen,peterwald-git,schacon-git,github_api,highline,bones,needle,jruby-pageant,echoe,rails-observers,mail,text-format,i18n,bcrypt-ruby,arel,tzinfo,activerecord-deprecated_finders,rack-test,rack-mount,rack-cache,journey,rack-ssl,thread_safe,pry-debugger,fog-xml,inflecto
Fetching from: https://rubygems.org/api/v1/dependencies?gems=RubyInline,SexpProcessor,erubis,archive-tar-minitar,rcov,sprockets,aruba,thor,RedCloth,syntax,rubigen,cucumber,signet,addressable,httpadapter,extlib,sinatra,liquid,autoparse,faraday,jwt,retriable,colorize,spoon,configuration,rspec-core,rspec-expectations,rspec-mocks,diff-lcs,spicycode-rcov,test-spec,camping,fcgi,memcache-client,mongrel,ruby-openid,thin,locale,levenshtein,text,minitest,rubyforge,gemcutter,mini_portile,racc,tenderlove-frex,rexical,weakling,git,thoughtbot-shoulda,mhennemeyer-output_catcher,rr,mocha,redgreen,peterwald-git,schacon-git,github_api,highline,bones,needle,jruby-pageant,echoe,rails-observers,mail,text-format,i18n,bcrypt-ruby,arel,tzinfo,activerecord-deprecated_finders,rack-test,rack-mount,rack-cache,journey,rack-ssl,thread_safe,pry-debugger,fog-xml,inflecto
HTTP Success
Query List: ["text-hyphen", "ZenTest", "termios", "metaclass", "english", "rspec-support", "multipart-post", "tlsmail", "treetop", "daemons", "fastthread", "gem_plugin", "cgi_multipart_eof_fix", "tilt", "shotgun", "rack-protection", "backports", "multimap", "multi_test", "gherkin", "term-ansicolor", "polyglot", "json_pure", "hike", "bcrypt", "ruby-yadis", "childprocess", "background_process", "bcat", "rdiscount", "flexmock", "allison", "abstract", "markaby", "metaid", "mab", "descendants_tracker", "oauth2", "hashie", "eventmachine", "eventmachine-le", "http_parser.rb", "preforker", "little-plugger", "loquacious", "bones-git", "bones-extras", "atomic", "pry", "debugger"]
Query Gemcutter Dependency Endpoint API: text-hyphen,ZenTest,termios,metaclass,english,rspec-support,multipart-post,tlsmail,treetop,daemons,fastthread,gem_plugin,cgi_multipart_eof_fix,tilt,shotgun,rack-protection,backports,multimap,multi_test,gherkin,term-ansicolor,polyglot,json_pure,hike,bcrypt,ruby-yadis,childprocess,background_process,bcat,rdiscount,flexmock,allison,abstract,markaby,metaid,mab,descendants_tracker,oauth2,hashie,eventmachine,eventmachine-le,http_parser.rb,preforker,little-plugger,loquacious,bones-git,bones-extras,atomic,pry,debugger
Fetching from: https://rubygems.org/api/v1/dependencies?gems=text-hyphen,ZenTest,termios,metaclass,english,rspec-support,multipart-post,tlsmail,treetop,daemons,fastthread,gem_plugin,cgi_multipart_eof_fix,tilt,shotgun,rack-protection,backports,multimap,multi_test,gherkin,term-ansicolor,polyglot,json_pure,hike,bcrypt,ruby-yadis,childprocess,background_process,bcat,rdiscount,flexmock,allison,abstract,markaby,metaid,mab,descendants_tracker,oauth2,hashie,eventmachine,eventmachine-le,http_parser.rb,preforker,little-plugger,loquacious,bones-git,bones-extras,atomic,pry,debugger
HTTP Success
Query List: ["coderay", "slop", "method_source", "win32console", "yard", "tins", "spruz", "facets", "language", "escape_utils", "bones-rcov", "bones-rubyforge", "bones-rspec", "bones-zentest", "trollop", "httpauth", "faraday-middleware", "multi_xml", "columnize", "debugger-ruby_core_source", "debugger-linecache", "ruby_core_source"]
Query Gemcutter Dependency Endpoint API: coderay,slop,method_source,win32console,yard,tins,spruz,facets,language,escape_utils,bones-rcov,bones-rubyforge,bones-rspec,bones-zentest,trollop,httpauth,faraday-middleware,multi_xml,columnize,debugger-ruby_core_source,debugger-linecache,ruby_core_source
Fetching from: https://rubygems.org/api/v1/dependencies?gems=coderay,slop,method_source,win32console,yard,tins,spruz,facets,language,escape_utils,bones-rcov,bones-rubyforge,bones-rspec,bones-zentest,trollop,httpauth,faraday-middleware,multi_xml,columnize,debugger-ruby_core_source,debugger-linecache,ruby_core_source
HTTP Success
Query List: []
Fetching gem metadata from https://rubygems.org/
Query List: ["faraday-middleware", "spicycode-rcov", "tenderlove-frex", "mhennemeyer-output_catcher", "peterwald-git", "schacon-git"]
Query Gemcutter Dependency Endpoint API: faraday-middleware,spicycode-rcov,tenderlove-frex,mhennemeyer-output_catcher,peterwald-git,schacon-git
Fetching from: https://rubygems.org/api/v1/dependencies?gems=faraday-middleware,spicycode-rcov,tenderlove-frex,mhennemeyer-output_catcher,peterwald-git,schacon-git
HTTP Success
Query List: []
Resolving dependencies...
Bundler could not find compatible versions for gem "nokogiri":
  In Gemfile:
    foreman_setup (= 2.0.4) ruby depends on
      nokogiri (~> 1.4.3) ruby

    fog (~> 1.21.0) ruby depends on
      nokogiri (1.6.3.1)
Bundler::VersionConflict: Bundler could not find compatible versions for gem "nokogiri":
  In Gemfile:
    foreman_setup (= 2.0.4) ruby depends on
      nokogiri (~> 1.4.3) ruby

    fog (~> 1.21.0) ruby depends on
      nokogiri (1.6.3.1)

/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:130:in `block in resolve'
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:128:in `catch'
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:128:in `resolve'
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:179:in `resolve'
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:114:in `specs'
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:109:in `resolve_remotely!'
/usr/lib/ruby/vendor_ruby/bundler/installer.rb:83:in `run'
/usr/lib/ruby/vendor_ruby/bundler/installer.rb:14:in `install'
/usr/lib/ruby/vendor_ruby/bundler/cli.rb:247:in `install'
/usr/lib/ruby/vendor_ruby/thor/command.rb:27:in `run'
/usr/lib/ruby/vendor_ruby/thor/invocation.rb:121:in `invoke_command'
/usr/lib/ruby/vendor_ruby/thor.rb:363:in `dispatch'
/usr/lib/ruby/vendor_ruby/thor/base.rb:440:in `start'
/usr/bin/bundle:20:in `block in <main>'
/usr/lib/ruby/vendor_ruby/bundler/friendly_errors.rb:3:in `with_friendly_errors'
/usr/bin/bundle:20:in `<main>'
+ [ -f /usr/share/foreman/config/database.yml ]
+ [ ! -z 1 ]
+ /usr/sbin/foreman-rake db:migrate
Could not find gem 'foreman_setup (= 2.0.4) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
+ true
+ chown -Rf foreman:foreman /usr/share/foreman
+ exit 0
+ db_stop
+ echo STOP
root@mgmt:~# dpkg -l | grep fog
ii  foreman-compute                     1.5.2-1                               all          metapackage providing fog dependencies for Foreman (for Amazon EC2 support)
root@mgmt:~# apt-get remove foreman-compute
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  git git-man liberror-perl libvirt-dev libvirt0 libxen-4.4 libxen-dev
  libxenstore3.0 libyajl2
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  foreman-compute foreman-libvirt
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 229 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 74608 files and directories currently installed.)
Removing foreman-libvirt (1.5.2-1) ...
Removing foreman-compute (1.5.2-1) ...
Setting up ruby-foreman-setup (2.0.4) ...

So, after uninstalling foreman-compute, ruby-foreman-setup is installed succesfully.

Actions #1

Updated by Dominic Cleal almost 10 years ago

  • Project changed from Foreman to Packaging
  • Category changed from Packaging to Debian/Ubuntu
Actions #2

Updated by Greg Sutcliffe almost 10 years ago

Thanks Mattias. This is a known issue due to a nasty ordering of gem dependencies and install sequences in the debs. https://github.com/theforeman/foreman-packaging/blob/deb/develop/plugins/ruby-foreman-setup/debian/postinst#L26-L40 is supposed to handle it, but sadly it seems unreliable. I'm searching for alternative solutions at the moment...

Actions #3

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Resolved

The plugin packages in Foreman 1.6 were rearchitected to fix these errors. Thanks for the report!

Actions

Also available in: Atom PDF