theforeman / forklift

Helpful deployment scripts for Foreman and Katello
https://theforeman.github.io/forklift
GNU General Public License v3.0
183 stars 200 forks source link

Unable to install new DEV environment on CentOS 8 #1288

Closed snagoor closed 3 years ago

snagoor commented 3 years ago

Hello everyone,

I am unable to install centos7-katello-devel and running to the following issue

TASK [foreman_installer : Run installer] ***************************************
fatal: [katello-devel]: FAILED! => changed=true 
  cmd: |-
    foreman-installer -v --no-colors --disable-system-checks --scenario katello-devel  --katello-devel-scl-ruby=rh-ruby25 --katello-devel-admin-password changeme
  delta: '0:02:08.401034'
  end: '2021-02-08 10:31:26.235285'
  msg: non-zero return code
  rc: 1
  start: '2021-02-08 10:29:17.834251'
  stderr: ''
  stderr_lines: <omitted>
  stdout: |-
    2021-02-08 10:29:21 [NOTICE] [root] Loading default values from puppet modules...
    2021-02-08 10:29:25 [NOTICE] [root] ... finished
    2021-02-08 10:29:26 [NOTICE] [root] Running validation checks
    2021-02-08 10:29:26 [WARN  ] [pre] Skipping system checks.
    2021-02-08 10:29:26 [WARN  ] [pre] Skipping system checks.
    2021-02-08 10:31:22 [NOTICE] [configure] Starting system configuration.
      The total number of configuration tasks may increase during the run.
      Observe logs or specify --verbose-log-level to see individual configuration tasks.
    2021-02-08 10:31:26 [ERROR ] [configure] Evaluation Error: Error while evaluating a Resource Statement, Class[Katello::Globals]:
    2021-02-08 10:31:26 [ERROR ] [configure] has no parameter named 'enable_ostree'
    2021-02-08 10:31:26 [ERROR ] [configure] has no parameter named 'enable_puppet' (file: /usr/share/foreman-installer/modules/katello_devel/manifests/init.pp, line: 143, column: 3) on node katello-devel.dell-430-38.example.com
    2021-02-08 10:31:26 [NOTICE] [configure] System configuration has finished.

      There were errors detected during install.
      Please address the errors and re-run the installer to ensure the system is properly configured.
      Failing to do so is likely to result in broken functionality.

      The full log is at /var/log/foreman-installer/katello-devel.log
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
katello-devel              : ok=44   changed=28   unreachable=0    failed=1    skipped=8    rescued=0    ignored=0   

==> katello-devel: Removing domain...
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

My environment details:

Base OS Environment: CentOS 8.3 + fully patched
Vagrant version: 2.2.14-1
ansible version: 2.9.17
ekohl commented 3 years ago

Looks like we didn't update for Pulp 2 removal. I opened https://github.com/theforeman/puppet-katello_devel/pull/250

snagoor commented 3 years ago

@ekohl thank you the error is now gone and I am facing a different issue

    2021-02-09 06:22:57 [ERROR ] [configure] 'scl enable rh-ruby25 rh-nodejs12 rh-postgresql12 'bundle install --retry 3 --jobs 3 --path .vendor'' returned 5 instead of one of [0]
    2021-02-09 06:22:57 [ERROR ] [configure] /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[install --retry 3 --jobs 3 --path .vendor]/Exec[bundle-install --retry 3 --jobs 3 --path .vendor]/returns: change from 'notrun' to ['0'] failed: 'scl enable rh-ruby25 rh-nodejs12 rh-postgresql12 'bundle install --retry 3 --jobs 3 --path .vendor'' returned 5 instead of one of [0]
    2021-02-09 06:23:05 [ERROR ] [configure] /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[install --retry 3 --jobs 3 --path .vendor]/Exec[bundle-install --retry 3 --jobs 3 --path .vendor]: Failed to call refresh: 'scl enable rh-ruby25 rh-nodejs12 rh-postgresql12 'bundle install --retry 3 --jobs 3 --path .vendor'' returned 5 instead of one of [0]
    2021-02-09 06:23:05 [ERROR ] [configure] /Stage[main]/Katello_devel::Setup/Katello_devel::Bundle[install --retry 3 --jobs 3 --path .vendor]/Exec[bundle-install --retry 3 --jobs 3 --path .vendor]: 'scl enable rh-ruby25 rh-nodejs12 rh-postgresql12 'bundle install --retry 3 --jobs 3 --path .vendor'' returned 5 instead of one of [0]
    2021-02-09 06:23:05 [NOTICE] [configure] 1400 out of 1900 done.
    2021-02-09 06:23:05 [NOTICE] [configure] 1500 out of 1900 done.
    2021-02-09 06:23:05 [NOTICE] [configure] 1600 out of 1900 done.
    2021-02-09 06:23:05 [NOTICE] [configure] 1700 out of 1900 done.
    2021-02-09 06:23:10 [NOTICE] [configure] 1800 out of 1900 done.
    2021-02-09 06:23:12 [NOTICE] [configure] System configuration has finished.

      There were errors detected during install.
      Please address the errors and re-run the installer to ensure the system is properly configured.
      Failing to do so is likely to result in broken functionality.

      The full log is at /var/log/foreman-installer/katello-devel.log
  stdout_lines: <omitted>

Tested this on multiple different systems and it hits the same exact issue.

ekohl commented 3 years ago

So what happens when you run scl enable rh-ruby25 rh-nodejs12 rh-postgresql12 'bundle install --retry 3 --jobs 3 --path .vendor' in /home/vagrant/foreman?

ekohl commented 3 years ago

Also, there should be a log in /var/log/foreman-installer that has the details. It looks like the new output no longer shows this.

snagoor commented 3 years ago

@ekohl Finally i was able to manage to complete the setup by manually inspecting the errors after the installer failure.

qpid-proton-c-devel RPM is missing in setup causing the failure.

I think this package should be installed by the installer automatically for Dev setup through forklift.

Here is the complete error

[vagrant@katello-devel foreman]$ scl enable rh-ruby25 rh-nodejs12 rh-postgresql12 'bundle install --retry 3 --jobs 3 --path .vendor'
Your Gemfile lists the gem puma (~> 5.1) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Your Gemfile lists the gem webmock (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...................................................................
Using rake 13.0.3
Using concurrent-ruby 1.1.8
Using minitest 5.10.3
Using thread_safe 0.3.6
Using zeitwerk 2.4.2
Using builder 3.2.4
Using erubi 1.10.0
Using mini_portile2 2.5.0
Using racc 1.5.2
Using crass 1.0.6
Using rack 2.2.3
Using nio4r 2.5.5
Using websocket-extensions 0.1.5
Using mimemagic 0.3.5
Using mini_mime 1.0.2
Using multi_json 1.15.0
Using method_source 1.0.0
Using thor 1.1.0
Using public_suffix 4.0.6
Using algebrick 0.7.5
Using amazing_print 1.2.2
Using robotex 1.0.0
Using tilt 2.0.10
Using ansi 1.5.0
Using apipie-dsl 2.3.0
Using apipie-params 0.0.5
Using bundler 1.16.1
Using ast 2.4.2
Using execjs 2.7.0
Using bcrypt 3.1.16
Using benchmark-ips 2.8.4
Using debug_inspector 1.0.0
Using msgpack 1.4.2
Using ffi 1.14.2
Using uniform_notifier 1.13.2
Using byebug 11.1.3
Using regexp_parser 1.8.2
Using childprocess 3.0.0
Using coderay 1.1.3
Using coffee-script-source 1.12.2
Using connection_pool 2.2.3
Using rexml 3.2.4
Using daemons 1.3.1
Using database_cleaner 1.99.0
Using deacon 1.0.0
Using declarative 0.0.20
Using declarative-option 0.1.0
Using polyglot 0.3.5
Using rainbow 3.0.0
Using docile 1.3.5
Using unf_ext 0.0.7.7
Using sequel 5.41.0
Using excon 0.79.0
Using hocon 1.3.1
Using faraday-net_http 1.0.1
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.4
Using fast_gettext 1.8.0
Using formatador 0.2.5
Using mime-types-data 3.2020.1104
Using ipaddress 0.8.3
Using jwt 2.2.2
Using memoist 0.16.2
Using os 1.1.1
Using httpclient 2.8.3
Using uber 0.1.0
Using retriable 3.1.2
Using json 2.5.1
Using ruby-libvirt 0.7.1
Using optimist 3.0.1
Using rb-fsevent 0.10.4
Using foreman 0.87.2
Using parse-cron 0.1.4
Using net-ssh 4.2.0
Using locale 2.1.3
Using text 1.3.1
Using redis 4.1.4
Using graphql 1.8.18
Using promise.rb 0.7.4
Using hashdiff 1.0.1
Using http-accept 1.7.0
Using journald-native 1.0.12
Using oauth 0.5.5
Using pg 1.2.3
Fetching qpid_proton 0.33.0
Using netrc 0.11.0
Using stomp 1.4.10
Installing qpid_proton 0.33.0 with native extensions
Using net-ldap 0.17.0
Using little-plugger 1.1.4
Using maruku 0.7.3
Using ruby-progressbar 1.11.0
Using minitest-tags 0.0.5
Using mocha 1.12.0
Using net-ping 2.0.8
Using paint 2.2.1
Using parallel 1.20.1
Using prometheus-client 1.0.0
Using yard 0.9.26
Using slop 3.6.0
Using ruby-openid 2.9.2
Using rdoc 6.3.0
Using rfauxfactory 0.1.5
Using unicode-display_width 1.7.0
Using sexp_processor 4.15.2
Using rubyzip 2.3.0
Using sd_notify 0.1.0
Using secure_headers 6.3.2
Using shoulda-context 1.2.2
Using simplecov-html 0.12.3
Using simplecov_json_formatter 0.1.2
Using spring 2.1.1
Using sshkey 1.9.0
Using statsd-instrument 2.9.2
Using vcr 3.0.3
Using will_paginate 3.3.0
Using i18n 1.8.8
Using tzinfo 1.2.9
Using nokogiri 1.11.1 (x86_64-linux)
Using rack-test 1.1.0
Using websocket-driver 0.7.3
Using marcel 0.3.3
Using mail 2.7.1
Using addressable 2.7.0
Using sprockets 4.0.2
Using autoprefixer-rails 10.2.4.0
Using binding_of_caller 0.8.0
Using bootsnap 1.7.2
Using sassc 2.4.0
Using ci_reporter 2.0.0
Using coffee-script 2.4.1
Using concurrent-ruby-edge 0.6.0
Using crack 0.4.5
Using unf 0.1.4
Using facter 4.0.51
Using faraday 1.3.0
Using mime-types 3.3.1
Using representable 3.0.4
Using ovirt-engine-sdk 4.4.0
Using rb-inotify 0.10.1
Using get_process_mem 0.2.7
Using mustermann 1.1.1
Using rack-protection 2.1.0
Using gettext 3.3.7
Using gettext_i18n_rails 1.8.1
Using po_to_json 1.0.1
Using graphql-batch 0.4.3
Using journald-logger 3.0.1
Using logging 2.3.0
Using minitest-reporters 1.4.3
Using minitest-retry 0.2.1
Using net-scp 3.0.0
Using parser 3.0.0.0
Fetching pry 0.14.0
Using puma 5.2.1
Using rack-cors 1.0.6
Using rack-jsonp 1.3.1
Using robottelo_reporter 0.1.1
Using single_test 0.6.0
Using uglifier 4.2.0
Using anemone 0.7.2
Using bootstrap-sass 3.4.1
Using xpath 3.2.0
Using ci_reporter_minitest 1.0.0
Using css_parser 1.9.0
Using domain_name 0.5.20190701
Using dynflow 1.4.7
Using fog-core 2.1.0
Using signet 0.14.1
Using google-cloud-env 1.4.0
Using rbvmomi 2.4.1
Using sass-listen 4.0.0
Using sinatra 2.1.0
Using sidekiq 5.2.9
Using pulp_2to3_migration_client 0.6.0
Using pulp_ansible_client 0.6.1
Using pulp_certguard_client 1.1.0
Using pulp_container_client 2.2.0
Using pulp_deb_client 2.8.0
Using pulp_file_client 1.5.0
Using pulp_rpm_client 3.8.0
Using pulpcore_client 3.9.1
Using launchy 2.5.0
Using logging-journald 2.1.0
Using parallel_tests 3.4.0
Using rack-openid 1.4.2
Using rubocop-ast 0.8.0
Using ruby_parser 3.15.1
Using selenium-webdriver 3.142.7
Using simplecov 0.21.2
Using webmock 3.11.2
Using wirb 2.2.2
Using activesupport 6.0.3.4
Using loofah 2.9.0
Using rails-dom-testing 2.0.3
Using rails-html-sanitizer 1.3.0
Using globalid 0.4.2
Using activemodel 6.0.3.4
Using bullet 6.1.3
Using capybara 3.32.0
Using factory_bot 5.2.0
Using fog-json 1.2.0
Using fog-xml 0.1.3
Using googleauth 0.15.1
Using fog-vsphere 3.5.0
Using sass 3.7.4
Using foreman-tasks-core 0.3.4
Using gitlab-sidekiq-fetcher 0.6.1
Using http-cookie 1.0.3
Using rabl 0.14.3
Using ldap_fluff 0.5.0
Using roadie 4.0.0
Using rubocop 0.89.1
Using ruby2ruby 2.4.4
Using shoulda-matchers 4.3.0
Using simplecov-rcov 0.2.3
Using show_me_the_cookies 5.0.1
Using actionview 6.0.3.4
Using activejob 6.0.3.4
Using activerecord 6.0.3.4
Using fog-aws 3.8.0
Using google-api-client 0.33.2
Using fog-libvirt 0.8.0
Using fog-openstack 1.0.11
Using fog-ovirt 2.0.1
Using font-awesome-sass 4.6.2
Using foreman-tasks 3.0.3
Using foreman_remote_execution_core 1.4.0
Using rest-client 2.1.0
Using rubocop-checkstyle_formatter 0.4.0
Using rubocop-minitest 0.10.3
Using rubocop-performance 1.8.1
Using rubocop-rails 2.8.1
Using rubocop-rspec 1.43.2
Using safemode 1.3.6
Installing pry 0.14.0
Using actionpack 6.0.3.4
Using activerecord-import 1.0.7
Using activerecord-nulldb-adapter 0.7.0
Using ancestry 3.2.1
Using audited 4.10.0
Using deep_cloneable 3.0.0
Using fog-google 1.11.0
Using friendly_id 5.3.0
Using immigrant 0.3.6
Using runcible 2.13.1
Using scoped_search 4.1.9
Using patternfly-sass 3.59.5
Using record_tag_helper 1.0.1
Using theforeman-rubocop 0.0.6
Using validates_lengths_from_database 0.8.0
Using actioncable 6.0.3.4
Using activestorage 6.0.3.4
Using actionmailer 6.0.3.4
Using railties 6.0.3.4
Using sprockets-rails 3.2.2
Using rails-controller-testing 1.0.5
Using actionmailbox 6.0.3.4
Using actiontext 6.0.3.4
Using activerecord-session_store 1.1.3
Using angular-rails-templates 1.1.0
Using as_deprecation_tracker 1.5.0
Using coffee-rails 5.0.0
Using factory_bot_rails 5.2.0
Using fx 0.6.2
Using graphiql-rails 1.7.0
Using jquery-ui-rails 6.0.1
Using minitest-spec-rails 6.0.3
Using rails-i18n 6.0.0
Using responders 3.0.1
Using roadie-rails 2.2.0
Using sassc-rails 2.1.2
Using webpack-rails 0.9.11
Using rails 6.0.3.4
Using sass-rails 6.0.0
Using apipie-rails 0.5.18
Using deface 1.6.1
Using gettext_i18n_rails_js 1.3.0
Using foreman_remote_execution 4.2.2
Gem::Ext::BuildError: ERROR: Failed to build gem
native extension.

current directory:
/home/vagrant/foreman/.vendor/ruby/2.5.0/gems/qpid_proton-0.33.0/ext/cproton
/opt/rh/rh-ruby25/root/usr/bin/ruby -r
./siteconf20210210-21999-jhyx88.rb extconf.rb
checking for -lqpid-proton... no
Missing library: qpid-proton
*** extconf.rb failed ***
Could not create Makefile due to some reason,
probably lack of necessary
libraries and/or headers.  Check the mkmf.log
file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib64
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
--ruby=/opt/rh/rh-ruby25/root/usr/bin/$(RUBY_BASE_NAME)
    --with-qpid-proton-dir
    --without-qpid-proton-dir
    --with-qpid-proton-include
--without-qpid-proton-include=${qpid-proton-dir}/include
    --with-qpid-proton-lib
--without-qpid-proton-lib=${qpid-proton-dir}/lib64
    --with-qpid-protonlib
    --without-qpid-protonlib

extconf failed, exit code 1

Gem files will remain installed in
/home/vagrant/foreman/.vendor/ruby/2.5.0/gems/qpid_proton-0.33.0
for inspection.
Results logged to
/home/vagrant/foreman/.vendor/ruby/2.5.0/extensions/x86_64-linux/2.5.0/qpid_proton-0.33.0/gem_make.out

An error occurred while installing
qpid_proton (0.33.0), and Bundler cannot
continue.
Make sure that `gem install qpid_proton -v
'0.33.0'` succeeds before bundling.

In Gemfile:
katello was resolved to 4.1.0.pre.master, which
depends on
    qpid_proton
snagoor commented 3 years ago

Oddly vagrant libvirt provider is causing the VM to automatically destroy itself if there is a failure. I am unsure if there is a vagrant setting to keep the VM alive after the vagrant provisioning failure.

When I tried this with Virtual Box provider the VM stayed ok, so I tested further steps and provided you the logs required.

ekohl commented 3 years ago

Just as I suspected. I opened https://github.com/theforeman/puppet-katello_devel/pull/251 for address that.

snagoor commented 3 years ago

Tested this today, setup works flawlessly after inclusion of https://github.com/theforeman/puppet-katello_devel/pull/251.

Thank you so much for your support @ekohl for fixing both issues.

ekohl++