Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1193701 - katello-installer fails with selinux enabled in Satellite 6.1.0 Beta Snap 3
Summary: katello-installer fails with selinux enabled in Satellite 6.1.0 Beta Snap 3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SELinux
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-17 22:35 UTC by Jason Montleon
Modified: 2017-07-26 19:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:24:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
foreman-debug (228.13 KB, application/x-xz)
2015-02-17 22:35 UTC, Jason Montleon
no flags Details
foreman debug (207.02 KB, application/x-xz)
2015-02-17 22:36 UTC, Jason Montleon
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1150011 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Internal Links: 1150011

Description Jason Montleon 2015-02-17 22:35:04 UTC
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

Comment 1 Jason Montleon 2015-02-17 22:36:04 UTC
Created attachment 992930 [details]
foreman debug

Comment 4 Brian Bouterse 2015-02-18 14:23:37 UTC
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.

Comment 5 Lukas Zapletal 2015-02-20 09:09:36 UTC
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.

Comment 9 Sachin Ghai 2015-03-13 11:53:51 UTC
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.

Comment 10 Sachin Ghai 2015-03-13 12:05:01 UTC
Moving this to verified as per comment 9. Will re-open if come across same issue again.

Comment 11 Bryan Kearney 2015-08-11 13:31:01 UTC
This bug is slated to be released with Satellite 6.1.

Comment 12 errata-xmlrpc 2015-08-12 05:24:57 UTC
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


Note You need to log in before you can comment on or make changes to this bug.