Bug 1383378

Summary: Under certain situations, Post-sync actions always run.
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, bkearney, bmbouter, daviddavis, dkliban, ggainey, ipanova, jcallaha, jomitsch, jsherril, mhrivnak, pcreech, rchan, ttereshc, zhunting
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pulp-2.8.7.6-1, pulp-rpm-2.8.7.7-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1417086 (view as bug list) Environment:
Last Closed: 2017-03-06 08:29:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1388296, 1417086    
Attachments:
Description Flags
verification screenshot
none
sync logs none

Description Justin Sherrill 2016-10-10 13:40:55 UTC
Description of problem:

Issued filed here:
https://pulp.plan.io/issues/2328

Prior to upgrading to pulp-2.8.7, syncing the same repo twice would only show the post sync actions (indexing, email, etc.) from occuring the first time.

After upgrading to pulp-2.8.7 it seems to always get kicked off.  Upon further investigation this issue was discovered. 

Version-Release number of selected component (if applicable):
pulp-2.8.7 (Satellite 6.2.3)

How reproducible:
Always

Steps to Reproduce:
1.  Create a repo (ideally very large)
2.  Sync the repo
3.  Sync it again

Actual results:

On Satellite 6.2.3, step 3 is much much longer than on Satellite 6.2.2

Comment 3 Justin Sherrill 2016-10-12 00:24:33 UTC
I think i've narrowed down the reproducer steps:

1.  On a satellite sync a repo with background download policy
2.  Do one of the following:

run satellite-installer --reset
OR
copy /var/lib/pulp/content to a new satellite install  (in which case continue the rest of the steps on the new Satellite).

3. Create and Sync the same repository with background download policy
4. Create and sync the same repository AGAIN but with the immediate download policy
5. Sync the repo from step 4 again

Notice that post sync actions occured during step 5 and that pulp reports the update_count to be greater than 0.

I would argue this is NOT a blocker for 6.2.3

Comment 4 Bryan Kearney 2016-10-12 12:14:37 UTC
Is this a regression then?

Comment 5 pulp-infra@redhat.com 2016-10-12 15:01:13 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2016-10-12 15:01:16 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2016-10-13 15:31:14 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

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

Comment 9 Ina Panova 2016-10-17 11:39:11 UTC
(In reply to Bryan Kearney from comment #4)
> Is this a regression then?

It is not a regression. This issue was introduced with new unit storage path calculation, which was changed before pulp 2.8

Comment 10 pulp-infra@redhat.com 2016-10-21 14:01:12 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2016-10-31 20:31:26 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2016-11-21 21:00:40 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 13 jcallaha 2017-02-16 17:10:21 UTC
Verified in Satellite 6.2.8 Snap 2.

I followed the steps outlined in #3 (copying to new satellite). The post_sync_skipped field was set to true for all post-sync actions. See attached image fore verification. I will also attach the output of relevant logs during the sync.

Comment 14 jcallaha 2017-02-16 17:10:42 UTC
Created attachment 1250913 [details]
verification screenshot

Comment 15 jcallaha 2017-02-16 17:11:46 UTC
Created attachment 1250914 [details]
sync logs

Comment 17 errata-xmlrpc 2017-03-06 08:29:07 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:0447