Bug 1664129

Summary: productid is not published in the content view if that is the only item which changed in the sync
Product: Red Hat Satellite Reporter: Partha Aji <paji>
Component: Content ViewsAssignee: Partha Aji <paji>
Status: CLOSED CURRENTRELEASE QA Contact: Lai <ltran>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.3.4CC: adprice, bbuckingham, ltran, mmccune, sthirugn
Target Milestone: ReleasedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1664127 Environment:
Last Closed: 2019-10-07 16:44:26 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: 1659549, 1664127    
Bug Blocks:    

Comment 7 Partha Aji 2019-03-01 22:22:30 UTC
Steps to verify

0) Create a repo with the following bash script (Note it doesnot have a productid file)
DIR=/tmp/my-data
mkdir $DIR
cd  $DIR
wget https://partha.fedorapeople.org/test-repos/rpm-with-productid/elephant-0.3-0.8.noarch.rpm
createrepo .
#start serving this dir
python -m SimpleHTTPServer 5050

1) Create and sync repo in sat with feed pointing to http://<fqdn>:5050 
2) put it in a CV and publish and promote to an env
3) now update the repo with a product id. Something like
DIR=/tmp/my-data
cd  $DIR
echo "100000" > productid
modifyrepo  --mdtype=productid productid repodata 

4) resync, publish the CV and promote the new version
5) Go to Monitor -> Tasks view and look for the latest promote 
6) Go to dynflow console Run tab
7) Search for Actions::Katello::Repository::CheckMatchingContent
8) Expand and see check the value of match content 
Expected:
 matching_content: false
Actual:
 matching_content: true


The point here is that "matching_content" value is used to determine whether metadata needs to be republished. However since katello was not tracking stuff in "repodata" directory (aka Yum Metadata) it ignored the fact that a productid file got added there. This fix indexes the yum metadata and thus katello is able to track changes in the repodata directory including productid.