Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1531396

Summary: force_full publish a repository doesn't work
Product: Red Hat Satellite Reporter: Hao Chang Yu <hyu>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NEXTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.13CC: amdas, bbuckingham, cdonnell, mmccune, smane, ttereshc
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, 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-03-08 18:59:36 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:
Attachments:
Description Flags
Patch force_full publish none

Description Hao Chang Yu 2018-01-05 05:22:03 UTC
Description of problem:

There is a hardcoded "force_full = False" variable in "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/publish.py" which will always override the 'force_full' configuration.

----------------
       last_published = publish_conduit.last_publish()
        last_deleted = repo.last_unit_removed
        force_full = config.get('force_full', False)
        date_filter = None
        force_full = False <============= HERE

        # NB: there is an "incremental publish optmization" (aka fast-forward
        # publish), and an unrelated "incremental publish". The former is
        # related to avoiding extra disk IO on publishes, and the latter is for
        # publishing units in a date range.  In order to do the "incremental
        # publish", we need to disable the "incremental publish optimization"
        # to ensure the prior published repo contents are cleared out. This is
        # done via the "force_full" option.
        if association_filters:
            force_full = True
            date_filter = association_filters
---------------

Comment 3 Amit Kumar Das 2018-02-10 01:17:55 UTC
Found similar issue with composite content view(CCV) in satellite 6.2.13.
As per KCS, forcefully regenerated metadata but it didn't helped.
----------
Errata not visible by yum updateinfo on Red Hat Satellite 6.2 clients 
https://access.redhat.com/solutions/2597661
----------

Issue is fixed after applying patch and following below steps.

1) Below py file has a hard-coded value "force_full = False" which does not allow to force full regenerate a repository metadata. Download the attached 'pulp_rpm_publish.patch' file from bug and apply the patch in satellite server.

#patch /usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributor/yum/publish.py /<PATH>/<TO>/pulp_rpm_publish.patch

2) Restart Pulp workers. Make sure you are not in the middle of regenerating applicability or syncing repos before restarting the workers.

#systemctl restart pulp_workers pulp_resource_manager pulp_celerybeat

3) Publish and promote the incremental version of underlying content view(CV) first from satellite GUI. Select "Force Yum Metadata Regeneration" check box while publishing and promoting.
4) Publish and promote the incremental version of composite CV from satellite GUI. Select "Force Yum Metadata Regeneration" check box while publishing and promoting.

5) In client
      - yum clean all
      - rm -rf /var/cache/yum/*
      - yum update

Comment 4 Amit Kumar Das 2018-02-10 01:20:10 UTC
Created attachment 1394065 [details]
Patch force_full publish

Comment 5 Mike McCune 2018-03-08 18:59:36 UTC
Since this is fixed in 6.3 we are going to close this out and encourage anyone effected to upgrade to 6.3.

If there is a strong need to get this fix back into 6.2.z, please re-open with justification.