Bug 1659549
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: | sthirugn <sthirugn> | |
Component: | Content Views | Assignee: | Partha Aji <paji> | |
Status: | CLOSED ERRATA | QA Contact: | Lai <ltran> | |
Severity: | high | Docs Contact: | ||
Priority: | urgent | |||
Version: | 6.3.4 | CC: | andrew.schofield, bkearney, dgross, ehelms, jsherril, kabbott, ktordeur, ltran, mmccune, mtenheuv, paji, sadas, zhunting | |
Target Milestone: | 6.5.0 | Keywords: | Triaged | |
Target Release: | Unused | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | tfm-rubygem-katello-3.10.0.28-1 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1664127 (view as bug list) | Environment: | ||
Last Closed: | 2019-05-14 12:39: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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1664127, 1664129 |
Description
sthirugn@redhat.com
2018-12-14 16:28:16 UTC
More details on how you might reproduce the bug: 1. create some yum repo on disk with a product_id fille 2. create and sync this repo 3. Publish the repo in a content view (version 1) 4. Update/modify the product_id file within the yum repo 5. Resync the yum repository 6. Publish the content view again (version 2) 7. Completely delete version 1 8. Run the pulp orphan cleanup 9. Try to download the product id file from the repository or use a client with it Result, 404 not found Created redmine issue https://projects.theforeman.org/issues/25718 from this bug Upstream bug assigned to paji Partha, https://github.com/Katello/katello/pull/7903 failed to pick cleanly. Do you mind making an MR for it downstream? 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. Tested using Partha's steps: 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: false 9) Repeat steps 3 - 8 Expected: matching_content: false Actual: matching_content: true Somehow updating the productid, resycing, and republishing multiple times doesn't create a matching_content of false. It has returned true all the time. The only time that it goes back to false is when you toggle the download policy to Immediate and On Demand after following the above steps. Failing this bug due to inconsistencies of behavior. Forgot to mention but for step 9, on step 3, make sure to update the productid. I've updated the productid multiple times but still got a maching_content: true. After discussing with Lai I propose a slight modification to the steps in -> https://bugzilla.redhat.com/show_bug.cgi?id=1659549#c11 3) now update the repo with a product id. Something like DIR=/tmp/my-data cd $DIR echo "100000" >> productid createrepo . modifyrepo --mdtype=productid productid repodata Add a "createrepo" step so that a new revision number shows up in repomd.xml . Tested using Partha's steps: 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 createrepo . 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: false Verified on 6.5.0_24 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/RHSA-2019:1222 |