Bug #25292
closederror foreman-installer after upgrade
Added by Kirill Kolchanov over 6 years ago. Updated about 6 years ago.
Description
After upgrade foreman 1.16 to 1.17. I run foreman-installer --noop --dont-save-answers --verbose and get errors:
/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- kafo (LoadError) from /opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/sbin/foreman-installer:3:in `<main>'
How do resolve it? I can their ignore and will resolve ater upgrade to 1.19 or need resolve right now?
Updated by Kirill Kolchanov over 6 years ago
This is error arise if I switch to ruby 2.4 (scl enable rh-ruby24 bash). If run from current version ruby(ruby 2.0.0p648 (2015-12-16) [x86_64-linux]) arise other errors:
foreman-installer -i Welcome to the Foreman installer! --------------------------------- This wizard will gather all required information. You can change any parameter to your needs. Ready to start? (y/n) y Main Config Menu 1. [✓] Configure foreman 2. [✓] Configure foreman_cli 4. [✓] Configure foreman_proxy 5. [✓] Configure puppet 27. [✓] Configure foreman_plugin_setup 54. Cancel run without Saving -- press enter/return to continue or q to stop -- Choose an option from the menu... 53 Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet-server' returned 1: Package puppet-3.6.2-3.el7.noarch is obsoleted by puppet-agent-5.5.6-1.el7.x86_64 which is already installed Package: puppet-server-3.6.2-3.el7.noarch (epel) Requires: puppet = 3.6.2-3.el7 Installed: puppet-agent-5.5.6-1.el7.x86_64 (@puppet) puppet >= 4.0.0-1.el7 Available: puppet-3.6.2-3.el7.noarch (epel) puppet = 3.6.2-3.el7 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/execution.rb:285:in `execute' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider.rb:101:in `execute' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/yum.rb:220:in `install' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/package.rb:88:in `block (3 levels) in <module:Puppet>' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:491:in `set' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:568:in `sync' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:80:in `perform_changes' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:257:in `apply' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:277:in `eval_resource' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `call' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `block (2 levels) in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark' /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:181:in `block in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:121:in `traverse' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:171:in `evaluate' /usr/share/gems/gems/kafo-2.1.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block (2 levels) in apply' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark' /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `block in apply' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:156:in `with_destination' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:in `apply' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block (2 levels) in apply_catalog' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:515:in `block in thinmark' /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:514:in `thinmark' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block in apply_catalog' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:232:in `block in benchmark' /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:231:in `benchmark' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `apply_catalog' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:369:in `run_internal' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in `block in run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:211:in `run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:354:in `apply_catalog' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in `override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:663:in `exit_on_fail' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:136:in `run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute' /opt/puppetlabs/puppet/bin/puppet:5:in `<main>' /Stage[main]/Puppet::Server::Install/Package[puppet-server]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet-server' returned 1: Package puppet-3.6.2-3.el7.noarch is obsoleted by puppet-agent-5.5.6-1.el7.x86_64 which is already installed Package: puppet-server-3.6.2-3.el7.noarch (epel) Requires: puppet = 3.6.2-3.el7 Installed: puppet-agent-5.5.6-1.el7.x86_64 (@puppet) puppet >= 4.0.0-1.el7 Available: puppet-3.6.2-3.el7.noarch (epel) puppet = 3.6.2-3.el7 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest Installing Done [100%] [................................................................................................................................] Something went wrong! Check the log for ERROR-level output
before it, I remove puppet-server 3.8.7 and install puppetserver 5.3.6 and update puppet-agent to 5.5.6.
rpm -qa | grep puppet puppet-agent-oauth-0.5.1-3.el7.noarch puppetlabs-release-pc1-1.1.0-2.el7.noarch puppetlabs-release-22.0-2.noarch puppetserver-5.3.5-1.el7.noarch puppet-agent-5.5.6-1.el7.x86_64
I don't understand why he try installing old version puppet-server,puppet-agent?
Updated by Ewoud Kohl van Wijngaarden over 6 years ago
You shouldn't run foreman-installer with the 2.4 SCL enabled. Our installer is not part of the SCL which explains that. We may need to build in some checks or ensure it's executed with the system ruby.
Regarding the puppet upgrade the problem is that you need to change answers to install the new puppetserver. We have https://projects.theforeman.org/projects/foreman/wiki/Upgrading_from_Puppet_3_to_4 which has a list of items to reset. https://projects.theforeman.org/projects/foreman/wiki/Upgrading_from_Puppet_4_to_5 may be needed as well though I think the 3 to 4 covers it mostly.
Updated by Lukas Zapletal about 6 years ago
- Status changed from New to Closed
- Triaged changed from No to Yes
Thank you Ewoud, I am going to close the issue, please use our community discourse for further discussion.