Bug 1378374

Summary: Post-sync pulp notification shouldn't fail with lock error
Product: Red Hat Satellite Reporter: François Cami <fcami>
Component: RepositoriesAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.2CC: bbuckingham, bkearney, egolov, ehelms, gsigrisi, jsherril, rdixon
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:42:57 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:
Embargoed:

Description François Cami 2016-09-22 09:59:24 UTC
Description of problem:
When importing a kickstart tree from the CDN, sometimes:
* the resulting repository is empty (in Katello's interface)
* the repository shows up properly if the Pulp URL is accessed with a web browser: 
 http://sat6.example.com/pulp/repos/dsicorp-qualif/Library/content/dist/rhel/server/7/7.2/x86_64/kickstart/
* installation media is not created
Note that this is not a case of not affecting the installation media to the location. When this happens, installation media is really absent from the Satellite.


Version-Release number of selected component (if applicable):
Satellite 6.2.2 (freshly installed on 2016/9/20)


How reproducible:
Not always


Steps to Reproduce:
1. Activate a Kickstart tree in Red Hat Repositories => Kickstart => RHEL Server
2. Synchronize Content in Content => Sync Status
3. When Content is synchronized, go to Administer => Locations, select your location, go to Media


Actual results:
*Sometimes* the associated media is not present.

When the associated media is not present, going to Content => Packages and selecting the Kickstart repository will display "There are no Packages in this Organization. Create one or more Products with Packages to view Packages on this page". 

However, going to the expected kickstart tree url:
http://sat6.example.com/pulp/repos/dsicorp-qualif/Library/content/dist/rhel/server/7/7.2/x86_64/kickstart/
will work.

Expected results:
Associated media present, repository not empty.

Additional info:
Pulp's task result is "success" everytime (in /var/log/messages).

Comment 6 Justin Sherrill 2016-09-27 15:42:46 UTC
The root cause of this is: https://bugzilla.redhat.com/show_bug.cgi?id=1279539


A temporary workaround is covered here:  https://access.redhat.com/solutions/2604571

Comment 7 Justin Sherrill 2016-09-27 15:43:58 UTC
This could be considered a duplicate of 1279539, but one could also consider that post sync notifications from pulp maybe shouldn't be blocked by active syncs in katello.

Comment 8 Justin Sherrill 2016-10-03 15:34:28 UTC
Workaround:

Navigate to Administer > Settings
Click on the 'Content' tab
find 'force_post_sync_actions' and change it to 'true'
Re-sync the affected kickstart repos.

Comment 9 Brad Buckingham 2016-10-14 14:15:35 UTC
*** Bug 1369907 has been marked as a duplicate of this bug. ***

Comment 11 Justin Sherrill 2016-11-17 19:40:01 UTC
*** Bug 1373531 has been marked as a duplicate of this bug. ***

Comment 14 Justin Sherrill 2017-10-04 17:45:02 UTC
Created redmine issue http://projects.theforeman.org/issues/21197 from this bug

Comment 16 Satellite Program 2017-10-04 18:02:27 UTC
Upstream bug assigned to jsherril

Comment 17 Satellite Program 2017-10-04 18:02:32 UTC
Upstream bug assigned to jsherril

Comment 18 Satellite Program 2017-10-09 16:01:47 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21197 has been resolved.

Comment 21 Justin Sherrill 2017-10-17 12:28:45 UTC
In 6.3 installation media are no longer created,  see https://bugzilla.redhat.com/show_bug.cgi?id=1382775

back to ON_QA

Comment 22 Peter Ondrejka 2017-10-18 09:57:35 UTC
Not much to verify then, sync succeeds, flipping to verified

Comment 23 Bryan Kearney 2018-02-21 16:40:33 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-2018:0336

Comment 24 Bryan Kearney 2018-02-21 16:42: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-2018:0336