Incoming change: SCL Ruby by default in forklift centos7-devel box

Hey there! There’s an incoming breaking change in forklift and puppet-katello_devel that could affect you if you use the centos7-devel box. We are changing the default Ruby installation from RVM to SCL.

I suggest any new box you bring up, keep your boxes yaml the same to get this new functionality; however, for existing boxes that use RVM that you’d like to re-provision, you should probably add the following installer option so you don’t have both RVM and SCL ruby installed on the same box:

centos7-devel:
  box: centos7
  ansible:
    playbook: 'playbooks/katello_devel.yml'
    group: 'devel'
    variables:
      foreman_installer_options:
         - --katello-devel-use-rvm=true

Why did we make this change?

  • RVM is maintained by a single person, it seems. When there are breakages, it has taken months to get a fix on the stable branch.
  • We use Ruby from the SCL in production. Matching our development environment to production whenever possible helps when debugging issues in either environment.
  • We didn’t remove support for RVM, as mentioned above, it’s just not the default anymore. This allows us to use the stable, SCL Ruby while allowing the flexibility of RVM to try out newer or completely different Ruby builds, such as Ruby 2.6 or jRuby.

Thanks to all who helped implement and test this change! Shout out to @ekohl and @John_Mitsch!

2 Likes

This is now merged. If you do have any issues, let us know.

Note we install gems to .vendor because of https://bugzilla.redhat.com/show_bug.cgi?id=1613864#c5. If there’s a fix for that, we can drop the .vendor and system gems. Tat would speed up the installation a bit but this works now :slight_smile:

1 Like

I was having a hard time using ruby in a screen session. It looks like this was due to the LD_LIBRARY_PATH not being set in screen.

I was able to work around this by running

chgrp root $(which screen)
chmod 777 /var/run/screen

There are probably better fixes out there, but this works and I’m able to open up way too many screen windows again :smile:

I also had some messed up permissions in /etc/pki/katello directories, some folders were using the foreman group instead of vagrant. I have no idea what caused this, it could just be from something I did, but it was preventing a server from starting. I fixed it by running:

 sudo chown root:vagrant /etc/pki/katello
 sudo chown root:vagrant /etc/pki/katello/private/
 sudo chown root:vagrant /etc/pki/katello/certs/

Thinking about it a little, the 2nd issue could be caused by the current need to ‘vagrant provision’ after spinning up a box and letting it fail. Just a guess though!

1 Like

FYI - You will need to use bundle exec more now, things like rake tasks and even foreman start need this prepended now.

1 Like

That’s probably due to the changes to boot.rb in

https://github.com/theforeman/foreman/commit/3784e5bc9f17c38a3cde9bf2c5e458a88398e5da

That seems like an old change? I’ve only had to use bundle exec after switching to the SCL

Perhaps it’s then more related to using .vendor where before it could use the system/user gems? I always use bundle exec so probably why I didn’t notice it.

This does sound like the likely culprit