Bug #30040
closedForeman proxy realm plugin missing xmlrpc -- needs to install rh-ruby25-rubygem-xmlrpc
Description
Description
Description of problem: With a fresh install of foreman 2.0 on Centos 7 using centos-release-scl, when setting up a freeipa realm, the proxy.log had the following error
[E] Disabling all modules in the group ['realm_freeipa', 'realm'] due to a failure in one of them: Gem loading error: cannot load such file -- xmlrpc
The problem is that foreman-proxy doesn't have the rights on the directory to download the gem and it isn't already present.
Version-Release number of selected component (if applicable): Version 2.0
Steps to reproduce.
These are my build instructions
1. Clean Centos install
2. Install repos
sudo yum -y install epel-release centos-release-scl sudo yum -y install https://yum.puppet.com/puppet6-release-el-7.noarch.rpm sudo yum -y install https://yum.theforeman.org/releases/2.0/el7/x86_64/foreman-release.rpm
3. Open firewall
sudo firewall-cmd --permanent --add-service https sudo firewall-cmd --permanent --add-service http sudo firewall-cmd --permanent --add-service puppetmaster sudo firewall-cmd --permanent --add-service dhcp sudo firewall-cmd --permanent --add-service tftp sudo firewall-cmd --reload
4. Install base foreman
sudo foreman-installer \ --foreman-proxy-dhcp=true \ --foreman-proxy-dhcp-config=/etc/dhcp/dhcpd.conf \ --foreman-proxy-dhcp-leases=/var/lib/dhcpd/dhcpd.leases \ --foreman-proxy-dhcp-key-name=omapi-key \ --foreman-proxy-dhcp-key-secret=$OMAPI_SECRET \ --foreman-proxy-dhcp-server=foreman.example.com \ --foreman-proxy-dhcp-interface=ens192 \ --foreman-proxy-dhcp-gateway=192.168.1.1 \ --foreman-proxy-dhcp-range="192.168.1.100 192.168.11.199" \ --foreman-proxy-dhcp-nameservers="192.168.1.11" \ --foreman-proxy-http=true \ --enable-foreman-plugin-openscap \ --enable-foreman-proxy-plugin-openscap \ --enable-foreman-cli-openscap
5. Prepare realm
cd /etc/foreman-proxy sudo foreman-prepare-realm admin realm-proxy@EXAMPLE.COM <password prompt for admin> sudo chown foreman-proxy: freeipa.keytab
6. Configure realm in foreman
sudo foreman-installer \ --foreman-proxy-realm=true \ --foreman-proxy-realm-principal=realm-proxy@EXAMPLE.COM
Actual Results: This fails saying to look at the proxy.log for detail of the failure. The proxy log has the error
[E] Disabling all modules in the group ['realm_freeipa', 'realm'] due to a failure in one of them: Gem loading error: cannot load such file -- xmlrpc
Expected Results: The foreman-installer completes successfully
Additional Info: I have found a work around
sudo scl enable tfm bash gem install xmlrpc exit