theforeman / forklift

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

luna-devel does not install kafo in rh-ruby25 scl #1078

Open ares opened 4 years ago

ares commented 4 years ago

I don't know if it's foreman-installer packaging issue or luna-devel playbook itself but it seems I can't run the installer on centos7 box. It says

TASK [foreman_installer : Run installer] ****************************************************************************************************************************************************************************************************
fatal: [luna-devel.example.tst]: FAILED! => changed=true 
  cmd: |-
    foreman-installer -v --no-colors --disable-system-checks --scenario katello-devel --katello-devel-github-username 'katello' --katello-devel-enable-ostree=true --katello-devel-extra-plugins theforeman/foreman_remote_execution --katello-devel-extra-plugins theforeman/foreman_discovery --katello-devel-extra-plugins theforeman/foreman_ansible --katello-devel-extra-plugins theforeman/foreman-tasks --katello-devel-extra-plugins theforeman/foreman_bootdisk --katello-devel-extra-plugins theforeman/foreman_openscap --katello-devel-extra-plugins theforeman/foreman_templates --katello-devel-extra-plugins theforeman/foreman_hooks --katello-devel-scl-ruby=rh-ruby25 --katello-devel-admin-password changeme       
  delta: '0:00:00.069296'
  end: '2019-12-29 14:24:39.891921'
  msg: non-zero return code
  rc: 1
  start: '2019-12-29 14:24:39.822625'
  stderr: |-
    /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- kafo (LoadError)
            from /opt/rh/rh-ruby25/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:59:in `require'
            from /usr/sbin/foreman-installer:3:in `<main>'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

a simple workaround fixes it

scl enable rh-ruby25 'gem install kafo'

I'd expect that the installer package that is installed at https://github.com/theforeman/forklift/blob/master/roles/foreman_installer/tasks/packages.yml#L2-L7 should depend on it, but it seems it only installs rubygem-kafo. I don't know when we switched installer to 2.5 SCL, but it seems that may have caused the regression.

ekohl commented 4 years ago

The installer has not yet been switched to the SCL. I recall we've updated the shebang but can't find the right commit right now. I'm going to close this issue, but if it still exists then please reopen it.

ekohl commented 4 years ago

Turns out the reason I couldn't find it is because we didn't fix it.