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 1394177 - Update to 6.2.4 does relabel /var/lib/pulp
Summary: Update to 6.2.4 does relabel /var/lib/pulp
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.2.4
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks: 1316897 1405527
TreeView+ depends on / blocked
 
Reported: 2016-11-11 10:37 UTC by Simon Reber
Modified: 2021-04-06 17:54 UTC (History)
21 users (show)

Fixed In Version: pulp-2.8.7.4-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1405527 (view as bug list)
Environment:
Last Closed: 2017-01-26 10:45:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 2424 0 High CLOSED - CURRENTRELEASE restorecon runs unecessarily for all 2.10+ upgrades 2016-12-02 16:01:18 UTC
Pulp Redmine 2436 0 Urgent CLOSED - CURRENTRELEASE pulp-selinux RPM fails to run restorecon statements post install 2016-12-02 16:01:11 UTC
Red Hat Knowledge Base (Solution) 2765791 0 None None None 2016-11-14 10:29:01 UTC
Red Hat Product Errata RHBA-2017:0197 0 normal SHIPPED_LIVE Satellite 6.2.7 Async Bug Release 2017-01-26 15:38:38 UTC

Description Simon Reber 2016-11-11 10:37:12 UTC
Description of problem:

Customer noticed that update to Satellite 6.2.4 does relabel `/var/lib/pulp` which can take a while for a productive environment that has lots of products synced.

Checking this in `pulp.spec` I found:

 955 %pre selinux
 956 # Record old version so we can limit which restorecon statement are executed later
 957 test -e %{_localstatedir}/lib/rpm-state/%{name} || mkdir -p %{_localstatedir}/lib/rpm-state/%{name}
 958 oldversion=$(semodule -l | grep pulp-server)
 959 echo ${oldversion:12} > %{_localstatedir}/lib/rpm-state/%{name}/old-version

I guess the problem is, that we no longer show the SELinux module version in Red Hat Enterprise Linux 7.3. See https://bugzilla.redhat.com/show_bug.cgi?id=1392573 for more details

Because of this, I think the check is failing and thus initiate relabel.sh

Version-Release number of selected component (if applicable):

 - foreman-1.11.0.54-1.el7sat.noarch
 - pulp-server-2.8.7.3-1.el7sat.noarch
 - candlepin-0.9.54.14-1.el7.noarch

How reproducible:

Always

Steps to Reproduce:
1. Install Satellite 6.2 on Red Hat Enterprise Linux 7.2
2. Update Red Hat Enterprise Linux to 7.3
3. Update to Stellite 6.2.4 and check if pulp does a relabel

Actual results:

Does a relabel even if that is likely not required

Expected results:

Should not do a relabel respectively the test in `pulp.spec` should be adjusted according to https://bugzilla.redhat.com/show_bug.cgi?id=1392573

Additional info:

See https://bugzilla.redhat.com/show_bug.cgi?id=1392573 for more details

Comment 4 Brian Bouterse 2016-11-15 13:20:50 UTC
I can see how this is a problem, and I believe upstream is affected. I've filed the upstream bug as 2424. We'll be tracking the issue on the related bug.

Comment 7 Brian Bouterse 2016-11-15 19:43:01 UTC
The restorecon operation is I/O bound not CPU or memory bound. I expect the runtime to be proportional to the amount of data in /var/lib/pulp/ and the speed of the filesystem. So solid state will be very fast, spinning local disks normal, and NFS mounted filesystem will likely take a long time.

Comment 8 pulp-infra@redhat.com 2016-11-15 21:31:22 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2016-11-15 21:31:26 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2016-11-16 01:31:47 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 11 Brian Bouterse 2016-11-17 23:04:50 UTC
The upstream issue is at modified. This should cherry pick cleanly onto 2.8.7+

Comment 12 pulp-infra@redhat.com 2016-11-17 23:31:29 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 13 pulp-infra@redhat.com 2016-11-21 22:31:18 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 14 pulp-infra@redhat.com 2016-11-23 14:31:25 UTC
The Pulp upstream bug status is at VERIFIED. Updating the external tracker on this bug.

Comment 16 pulp-infra@redhat.com 2016-11-23 19:01:10 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 17 pulp-infra@redhat.com 2016-11-23 19:01:15 UTC
The Pulp upstream bug priority is at Urgent. Updating the external tracker on this bug.

Comment 18 pulp-infra@redhat.com 2016-11-24 03:31:29 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 19 pulp-infra@redhat.com 2016-11-28 19:00:59 UTC
The Pulp upstream bug status is at VERIFIED. Updating the external tracker on this bug.

Comment 20 pulp-infra@redhat.com 2016-12-02 16:01:12 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 21 pulp-infra@redhat.com 2016-12-02 16:01:19 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 22 Julio Entrena Perez 2016-12-07 10:31:18 UTC
Since we are aligning this to 6.2.6, is there any workaround that will allow customers to avoid the relabelling if/when they upgrade to 6.2.5?

Comment 24 pulp-infra@redhat.com 2017-01-11 11:02:02 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 26 Peter Ondrejka 2017-01-18 17:18:38 UTC
Verified in Satellite 6.2.7 snap 2 using steps from comment #23, /var/lib/pulp is no longer relabeled upon upgrade.

Comment 28 errata-xmlrpc 2017-01-26 10:45:12 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/RHBA-2017:0197


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