Foreman installer - missing pulpcore-selinux

Problem:
Running Forklift playbook luna-devel.yml is failing on error:

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install pulpcore-selinux' returned 1: Error: Nothing to do
Error: /Stage[main]/Main/Package[pulpcore-selinux]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install pulpcore-selinux' returned 1: Error: Nothing to do

Step to reproduce

  • Clean virtual machine (in Libvirt) with Centos 7
  • Run ansible-playbook from forklift (latest master)
    ansible-playbook -i,192.168.100.XXX -u root -k playbooks/luna-devel.yml

I tried to install pulpcore-selinux from https://github.com/pulp/pulpcore-selinux but that didn’t help since installer is still trying to install it from yum during installation.

Full error with installer parameters:

foreman-installer -v --no-colors --disable-system-checks --scenario katello-devel --katello-devel-github-username 'stejskalleos' --katello-devel-enabl
e-ostree=true --katello-devel-extra-plugins theforeman/foreman_remote_execution --katello-devel-extra-plugins theforeman/foreman_discovery --katello-devel-extra-plug
ins 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-deve
l-scl-ruby=rh-ruby25 --katello-devel-admin-password changeme

[ INFO 2020-03-11T14:22:49 verbose] Executing hooks in group pre_migrations
[ INFO 2020-03-11T14:22:49 verbose] All hooks in group pre_migrations finished
[ INFO 2020-03-11T14:22:49 verbose] Executing hooks in group boot
[ INFO 2020-03-11T14:22:49 verbose] All hooks in group boot finished
[ INFO 2020-03-11T14:22:49 verbose] Executing hooks in group init
[ INFO 2020-03-11T14:22:49 verbose] All hooks in group init finished
[ INFO 2020-03-11T14:22:49 verbose] Loading default values from puppet modules...
[ INFO 2020-03-11T14:22:49 verbose] ... finished
[ INFO 2020-03-11T14:22:49 verbose] Executing hooks in group pre_values
[ INFO 2020-03-11T14:22:49 verbose] All hooks in group pre_values finished
[ INFO 2020-03-11T14:22:49 verbose] Running installer with args [["-v", "--no-colors", "--disable-system-checks", "--scenario", "katello-devel", "--katello-devel-git
hub-username", "stejskalleos", "--katello-devel-enable-ostree=true", "--katello-devel-extra-plugins", "theforeman/foreman_remote_execution", "--katello-devel-extra-p
lugins", "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", "the
foreman/foreman_templates", "--katello-devel-extra-plugins", "theforeman/foreman_hooks", "--katello-devel-scl-ruby=rh-ruby25", "--katello-devel-admin-password", "cha
ngeme"]]
[ INFO 2020-03-11T14:22:49 verbose] Executing hooks in group pre_validations
[ WARN 2020-03-11T14:22:50 verbose] Skipping system checks.
[ INFO 2020-03-11T14:22:50 verbose] All hooks in group pre_validations finished
[ INFO 2020-03-11T14:22:50 verbose] Running validation checks
[ INFO 2020-03-11T14:22:50 verbose] Executing hooks in group pre_commit
[ INFO 2020-03-11T14:22:52 verbose] All hooks in group pre_commit finished
[ INFO 2020-03-11T14:22:52 verbose] Executing hooks in group pre
[ INFO 2020-03-11T14:22:52 verbose] Ensuring rh-postgresql12-postgresql-server, rh-redis5-redis, pulpcore-selinux to package state installed
Failed to ensure rh-postgresql12-postgresql-server, rh-redis5-redis, pulpcore-selinux are installed
[ERROR 2020-03-11T14:22:55 verbose] Failed to ensure rh-postgresql12-postgresql-server, rh-redis5-redis, pulpcore-selinux are installed
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install pulpcore-selinux' returned 1: Error: Nothing to do
Error: /Stage[main]/Main/Package[pulpcore-selinux]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install pulpcore-selinux
' returned 1: Error: Nothing to do                                                                                                                                    
[ERROR 2020-03-11T14:22:55 verbose] Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install pulpcore-selinux' returned 1: Error: Nothing to do
Error: /Stage[main]/Main/Package[pulpcore-selinux]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install pulpcore-selinux
' returned 1: Error: Nothing to do

Does anybody have any idea how to fix this issue?

A quick work around is to install it manually from:

http://koji.katello.org/releases/yum/katello-nightly/pulpcore/el7/x86_64/pulpcore-selinux-1.0.0-2.el7.x86_64.rpm

The reason you hit this is because the nightly repositories are in a limbo state due to Katello pipeline’s failing so there are changes in staging environment. You can also switch to using those repositories by setting for a box definition:

foreman_server_repositories_environment: staging
katello_server_repositories_environment: staging

Hi,
thanks for quick reply, installing the package from koji helped,
thanks a lot!

This link is not working now.
I am also getting the same issue. Please help to install pulpcore-selinux
I am using Centos 8.4, Foreman 3.0 and Katello 4.0

Error coming is below:
Failed to ensure foreman-selinux, katello-selinux, candlepin-selinux, pulpcore-selinux are installed
2021-12-24 23:54:34 [ERROR ] [root] Failed to ensure foreman-selinux, katello-selinux, candlepin-selinux, pulpcore-selinux are installed
Error: Execution of ‘/bin/dnf -d 0 -e 1 -y install pulpcore-selinux’ returned 1: Error:
Problem: cannot install the best candidate for the job

  • nothing provides selinux-policy >= 3.14.3-67.el8_4.2 needed by pulpcore-selinux-1.2.6-2.el8.x86_64
    Error: /Stage[main]/Main/Package[pulpcore-selinux]/ensure: change from ‘purged’ to ‘present’ failed: Execution of ‘/bin/dnf -d 0 -e 1 -y install pulpcore-selinux’ returned 1: Error:
    Problem: cannot install the best candidate for the job
  • nothing provides selinux-policy >= 3.14.3-67.el8_4.2 needed by pulpcore-selinux-1.2.6-2.el8.x86_64
    2021-12-24 23:54:34 [ERROR ] [root] Error: Execution of ‘/bin/dnf -d 0 -e 1 -y install pulpcore-selinux’ returned 1: Error:
    Problem: cannot install the best candidate for the job
  • nothing provides selinux-policy >= 3.14.3-67.el8_4.2 needed by pulpcore-selinux-1.2.6-2.el8.x86_64
    Error: /Stage[main]/Main/Package[pulpcore-selinux]/ensure: change from ‘purged’ to ‘present’ failed: Execution of ‘/bin/dnf -d 0 -e 1 -y install pulpcore-selinux’ returned 1: Error:
    Problem: cannot install the best candidate for the job
  • nothing provides selinux-policy >= 3.14.3-67.el8_4.2 needed by pulpcore-selinux-1.2.6-2.el8.x86_64