Red Hat Bugzilla – Bug 1193701
katello-installer fails with selinux enabled in Satellite 6.1.0 Beta Snap 3
Last modified: 2017-07-26 15:39:22 EDT
Created attachment 992929 [details] foreman-debug Description of problem: foreman-rake --trace db:seed will fail with a 403 Forbidden if selinux is enabled. Version-Release number of selected component (if applicable): Satellite 6.1.0 Beta Snap 3 How reproducible: Always Steps to Reproduce: 1. Ensure selinux is in enforcing 2. Install Satellite 6.1.0 Beta Snap 3 3. Run katello-installer Actual results: The installer will notify you that the db:seed rake task failed Expected results: The installer should complete successfully. Additional info: It's possible this only affects RHEL 7 - during install of the pulp-selinux RPM I saw the following output as well: Installing : pulp-selinux-2.6.0-0.7.beta.el7sat.noarch 379/609 libsepol.permission_copy_callback: Module pulp-server depends on permission kill in class system, not satisfied (No such file or directory). libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory). /usr/sbin/semodule: Failed! libsepol.permission_copy_callback: Module pulp-celery depends on permission kill in class system, not satisfied (No such file or directory). libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory). /usr/sbin/semodule: Failed! # foreman-rake --trace db:seed mkdir: cannot create directory '/usr/share/foreman/.cache': Permission denied ** Invoke db:seed (first_time) ** Execute db:seed ** Invoke db:abort_if_pending_migrations (first_time) ** Invoke environment (first_time) ** Execute environment Apipie cache enabled but not present yet. Run apipie:cache rake task to speed up API calls. ** Invoke db:load_config (first_time) ** Execute db:load_config ** Execute db:abort_if_pending_migrations Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb Seeding /usr/share/foreman/db/seeds.d/03-roles.rb Seeding /usr/share/foreman/db/seeds.d/04-admin.rb rake aborted! Task fd503b40-7d1a-4f54-89fd-e65dc861e053: RestClient::Forbidden: 403 Forbidden /opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.12/app/models/foreman_tasks/concerns/action_triggering.rb:134:in `execute_planned_action' /opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.12/app/models/foreman_tasks/concerns/action_triggering.rb:111:in `block in dynflow_task_wrap' /opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.12/app/models/foreman_tasks/concerns/action_triggering.rb:110:in `tap' /opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.12/app/models/foreman_tasks/concerns/action_triggering.rb:110:in `dynflow_task_wrap' /opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.12/app/models/foreman_tasks/concerns/action_triggering.rb:26:in `save' /usr/share/foreman/db/seeds.d/04-admin.rb:26:in `block in <top (required)>' /opt/rh/ruby193/root/usr/share/gems/gems/audited-3.0.0/lib/audited/auditor.rb:250:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/audited-3.0.0/lib/audited/auditor.rb:250:in `without_auditing' /usr/share/foreman/db/seeds.d/04-admin.rb:21:in `<top (required)>' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `block in load' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load' /usr/share/foreman/db/seeds.rb:67:in `block in <top (required)>' /usr/share/foreman/db/seeds.rb:65:in `each' /usr/share/foreman/db/seeds.rb:65:in `<top (required)>' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `block in load' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:520:in `load_seed' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:309:in `block (2 levels) in <top (required)>' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run' /opt/rh/ruby193/root/usr/bin/rake:32:in `<main>' Tasks: TOP => db:seed
Created attachment 992930 [details] foreman debug
I think the actual error is : Installing : pulp-selinux-2.6.0-0.7.beta.el7sat.noarch 379/609 libsepol.permission_copy_callback: Module pulp-server depends on permission kill in class system, not satisfied (No such file or directory). libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory). /usr/sbin/semodule: Failed! libsepol.permission_copy_callback: Module pulp-celery depends on permission kill in class system, not satisfied (No such file or directory). libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory). /usr/sbin/semodule: Failed! That causes the pulp-server and pulp-celery SELinux modules contained in the pulp-selinux RPM to fail to load. Then when Pulp goes to be operated SELinux causes all sorts of denials. There are some other bugzilla bugs that look similar. https://bugzilla.redhat.com/show_bug.cgi?id=1149790 https://bugzilla.redhat.com/show_bug.cgi?id=1034709#c8 It looks like the recommended fix in those was to yum reinstall 'selinux-policy-targeted'. Also I think this could be a problem/difference between brew and koji builders. Those builders are where these selinux policies get compiled so something could be different there. I don't think this is an upstream Pulp bug because on EL6 and EL7 QE has been verifying bugs with SELinux enforcing.
Hey, it is definitely not Pulp upstream bug, nobody said this. This stems from the fact we build against RHEL 7.1 while testing on RHEL 7.0.
Verified with: sat6.1 beta snap6 compose2 Satellite-6.1.0-RHEL-6-20150311.1 Katello-installer succeed on rhel6.6 and rhel7.1 with selinux enabled.
Moving this to verified as per comment 9. Will re-open if come across same issue again.
This bug is slated to be released with Satellite 6.1.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2015:1592