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 744047

Summary: Promotion - adding package or errata to a repo will need generate_metadata called explicitly
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: APIAssignee: Tomas Strachota <tstrachota>
Status: CLOSED CURRENTRELEASE QA Contact: Garik Khachikyan <gkhachik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: gkhachik, lzap, mkoci
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-0.1.209-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 17:59:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 747354    

Description Justin Sherrill 2011-10-06 20:17:27 UTC
Due to BZ 738657 pulp is making a change to require that if you manually add or remove a package or errata you much explicitly call /repositories/id/generate_metadata to update the metadata of the repository.  

This will hit on pulp version 238 most likely.

We need to update promotions to handle this.

irc log:

      prad | jsherrill, ping  
@jsherrill | prad: pong
      prad | jsherrill, hey just heads up on some of the selective sync changes i'm making on pulp  
           | side .. if you're using add/remove on packages or errata you'll need to call           
           | generate_metadata to update the underlying metadata
      prad | jsherrill, pulp's add/remove operations will only do associate/dis associations
      prad | jsherrill, you'll need to call POST /repositories/id/generate_metadata/ to update      
           | repodata          
      prad | after your selections are complete       
@jsherrill | prad: ahhh good to know, do you know what version of pulp this will take effect in?    
      prad | jsherrill, should probably make it into tomorrows qe build so probably 238 or 239     
      prad | 237-2 is prospective CR.. so will be after that                 
@jsherrill | prad: ok, i'll open a bug to track that  
      prad | jsherrill, cool here is the pulp bug 738657  
      prad | jsherrill, and generate_metadata will created an async task in pulp and you get back a 
           | task id           
 jsherrill | prad: thx         
@jsherrill | prad: ah, k       
      prad | jsherrill, so you can periodically check and show the metadata status

Comment 1 Lukas Zapletal 2011-12-07 14:48:54 UTC
This is in the Pulp CR now. We should implement it.

Comment 2 Tomas Strachota 2012-02-01 11:49:22 UTC
Added into promotion in katello-0.1.209-1

Comment 4 Garik Khachikyan 2012-02-02 15:35:49 UTC
please provide a CLI scenario how to reproduce the issue. thanks.

(so far my tries to add an individual package to the changeset always bring in adding the whole repo content seems)

Comment 5 Tomas Strachota 2012-02-02 16:01:01 UTC
testing scenario:
1) create a product, add a repo
2) promote the product to next environment
3) sync the product
4) create a changeset, add a package, promote the changeset
5) check if metadata of the repo are updated

Comment 6 Garik Khachikyan 2012-02-02 16:07:02 UTC
my issue is: not possible to add a single package - but all :)

but any case - even with this I will check the bug. thanks.

Comment 7 Tomas Strachota 2012-02-02 16:12:52 UTC
You can add a package but it's repo and product must be promoted first. That's why I let empty repo to be promoted in the scenario above.

Comment 8 Garik Khachikyan 2012-02-09 16:06:30 UTC
# VERIFIED

Following the scenario in comment#5 (thanks a lot, Tomas) I confirm: repodata getting regenerated and the system that was registered is getting the packages (from errata as well) through yum successfully installed.

I have used the famous zoo repo there :)

Checked the scenario under version:
---
katello-0.1.228-1.git.5.eabe87d.el6.noarch
katello-cli-0.1.54-1.git.0.2670189.el6.noarch
subscription-manager-0.99.6-1.el6.x86_64
pulp-0.0.265-1.el6.noarch
candlepin-0.5.8-1.el6.noarch