Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1418747 - Repo isn't auto publishing after syncing
Repo isn't auto publishing after syncing
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Upgrades (Show other bugs)
6.2.7
Unspecified Unspecified
unspecified Severity high (vote)
: 6.2.8
: Unused
Assigned To: Justin Sherrill
Sachin Ghai
: Triaged
Depends On:
Blocks: Sat6_Upgrades 1419069
  Show dependency treegraph
 
Reported: 2017-02-02 11:02 EST by Sachin Ghai
Modified: 2017-03-06 03:37 EST (History)
8 users (show)

See Also:
Fixed In Version: katello-installer-base-3.0.0.76-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1419069 (view as bug list)
Environment:
Last Closed: 2017-03-06 03:37:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2939901 None None None 2017-02-22 04:25 EST
Red Hat Product Errata RHBA-2017:0447 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 08:23:41 EST

  None (edit)
Description Sachin Ghai 2017-02-02 11:02:07 EST
Description of problem:

I re-sync the satellite capsule repo and sync was completed successfully w/ a few new packages. Later when I publish the associated CV and promoted it. However when I ran yum repolist on registered capsule , it was still showing the old packages.

Looks like new rpms were not correctly published:

On Satellite filesystem I see the updated packages under "/var/lib/pulp/content/units/rpm/" as below:

-bash-4.2# find / -name satellite-capsule-6.2.7*
/var/lib/pulp/content/units/rpm/0f/3bd1531109d30323715d950d98e4b7c55fc33b6de4db40e176b75c2bc7bdc9/satellite-capsule-6.2.7-1.0.el7sat.noarch.rpm

But I don't see this in published CV 'rhel7_capsule_cv' under 'Library':

-bash-4.2# cd /var/lib/pulp/published/yum/https/repos/Default_Organization/Library/rhel7_capsule_cv/content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.2/os/
-bash-4.2# ll | grep satellite-capsule-6.2.7

CV publish/promote was successful and we can see package count updated on UI. But actually no new package published/promoted to selected env. 


Version-Release number of selected component (if applicable):
upgrade sat6.1.11 -> 6.2.z

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:
newly synced packages should be published/promoted to next env

Additional info:
Comment 1 Sachin Ghai 2017-02-02 11:05:28 EST
As per dev investigation, issue seems to be related to repo publishing. the repo isn't auto publishing after syncing.

just for reference, pasting the irc chat here: thank you Justin.

<jsherrill> sghai: no not CV publishing, repo publshing,  in pulp when you sync a repo its set to auto publish the yum metadata.  in 6.1 we triggered it manaully so this auto publish was turned off, in 6.2 we turned it back on
<jsherrill> and that turning back on isn't working correctly.
Comment 3 Justin Sherrill 2017-02-02 14:17:42 EST
Opened PRs:

https://gitlab.sat.lab.tlv.redhat.com/satellite6/katello-installer/merge_requests/84
https://gitlab.sat.lab.tlv.redhat.com/satellite6/katello/merge_requests/279

however i still need to chat with Chris about this issue
Comment 4 Sachin Ghai 2017-02-14 08:32:16 EST
Verified this issue with sat6.2.8 snap2

Now I can successfully publish/promote the newly synced packages and packages are available under selected CV through filesystem:

-bash-4.2# cd /var/lib/pulp/published/yum/https/repos/Default_Organization/Library/rhel7_capsule_cv/content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.2/os/
-bash-4.2#  ll | grep satellite-capsule-6.2.7
lrwxrwxrwx. 1 apache apache  143 Feb 14 07:59 satellite-capsule-6.2.7-1.0.el7sat.noarch.rpm -> /var/lib/pulp/content/units/rpm/0f/3bd1531109d30323715d950d98e4b7c55fc33b6de4db40e176b75c2bc7bdc9/satellite-capsule-6.2.7-1.0.el7sat.noarch.rpm


Also, similar packages I can fetch on registered capsule.

Before:
=========
repo id                                                             repo name                                                                   status
!rhel-7-server-rpms/x86_64                                          Red Hat Enterprise Linux 7 Server (RPMs)                                    13,578
!rhel-7-server-satellite-capsule-6.2-rpms/x86_64                    Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) (RPMs)                       300


after:
======
repo id                                                             repo name                                                                   status
!rhel-7-server-rpms/x86_64                                          Red Hat Enterprise Linux 7 Server (RPMs)                                    13,578
!rhel-7-server-satellite-capsule-6.2-rpms/x86_64                    Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) (RPMs)                       332


see the difference in capsule packages, before fix, count was 300 and after fix count is 332.
Comment 7 Justin Sherrill 2017-02-28 13:35:29 EST
Workaround:

On both the Satellite and the capsule, run:

#this sets auto_publish to true
mongo pulp_database --eval 'db.repo_distributors.update({"distributor_type_id": "yum_distributor"}, {"$set": {"auto_publish": true}}, {"multi": true});'

#this causes pulp to actually sync the repository, forcing a publish
mongo pulp_database --eval 'db.repo_importers.update({"scratchpad": {$ne: null}}, {$set: {"scratchpad.repomd_revision": null}}, {"multi":true})'


And then re-sync the repositories on your Satellite, followed by a full capsule sync (if the problem is on the capusle as well)
Comment 9 errata-xmlrpc 2017-03-06 03:37:31 EST
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

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