Bug 1418747 - Repo isn't auto publishing after syncing
Summary: Repo isn't auto publishing after syncing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks: Sat6_Upgrades 1419069
TreeView+ depends on / blocked
 
Reported: 2017-02-02 16:02 UTC by Sachin Ghai
Modified: 2020-04-15 15:12 UTC (History)
8 users (show)

Fixed In Version: katello-installer-base-3.0.0.76-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1419069 (view as bug list)
Environment:
Last Closed: 2017-03-06 08:37:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2939901 0 None None None 2017-02-22 09:25:19 UTC
Red Hat Product Errata RHBA-2017:0447 0 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 13:23:41 UTC

Description Sachin Ghai 2017-02-02 16:02:07 UTC
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 16:05:28 UTC
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 19:17:42 UTC
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 13:32:16 UTC
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 18:35:29 UTC
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 08:37:31 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


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