Bug 814118

Summary: Katello doesn't update candlepin product content on gpgkey data change
Product: Red Hat Satellite Reporter: Garik Khachikyan <gkhachik>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: medium    
Version: 6.0.0CC: alikins, asettle, bkearney, cpelland, daviddavis, dmacpher, mkoci, mmccune, omaciel
Target Milestone: UnspecifiedKeywords: Regression, Triaged, ZStream
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Adding a GPG key to a product repository after creation did not properly set the "gpgcheck" configuration option in the client's repo file. This fix regenerates changed content and updates configuration when updating the GPG key.
Story Points: ---
Clone Of:
: 827554 (view as bug list) Environment:
Last Closed: 2012-10-09 19:17:56 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: 834125    
Bug Blocks: 827554    
Attachments:
Description Flags
pem files none

Description Garik Khachikyan 2012-04-19 09:32:59 UTC
Description of problem:
Recent version of rhsm: subscription-manager-0.99.13-1.el6.x86_64 has an issue with gpgcheck: it always set to 0 independent from the fact that the custom repo that I assigned my system using Katello has there GPGkey assigned.

Version-Release number of selected component (if applicable):
subscription-manager-0.99.13-1.el6.x86_64
python-rhsm-0.99.8-1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1.in Katello do prepare repo with GKGkey (e.g.: http://inecas.fedorapeople.org/fakerepos/zoo3/ with gpgkey from: http://inecas.fedorapeople.org/fakerepos/zoo/RPM-GPG-KEY-dummy-packages-generator)
2.sync it and assign a system (self-register would also work) to register and consume that repo.
3.try repolist and then look at: /etc/yum.repos.d/redhat.repo
  
Actual results:
gpgcheck = 0 in there

Expected results:
in case when repo has gpg key: fetch and use that correctly.

Additional info:
I remember it was working before (had test that was passing before)

Comment 6 Garik Khachikyan 2012-04-20 15:21:38 UTC
Created attachment 579037 [details]
pem files

sending in a tarball.
1596817263600090748.pem
1596817263600090748-key.pem

Comment 7 Adrian Likins 2012-05-01 13:30:08 UTC
There does not appear to be a gpgkey set in those entitlement certs, so at least for those certs, subscription-manager appears to be doing the right thing.

Comment 8 James Bowes 2012-05-01 14:16:47 UTC
The entitlement cert doesn't actually have a gpg key url set in it.

I just ran a quick test on a katello install, and it looks like if you change the gpgkey url on an existing repository, that change is never propagated down to candlepin. Creating a repository with a gpg key set originally gets the key url into candlepin, and thus into the entitlement cert.

Reassigning to katello.

Comment 10 Mike McCune 2012-05-01 16:27:49 UTC
setting to 1.0.z since the implications of this are fairly severe

Comment 11 Justin Sherrill 2012-05-09 19:22:25 UTC
Hrmmm I have not been able to reproduce the original scenario with katello master and the latest rhsm from 6.2 or the version that Garik mentioned.  In both cases gpgcheck is set to 1.

Garik,  Which version of katello did you find this with?

Still going to address the issue where you enable/disable the gpg key on an existing repo.

Comment 13 Justin Sherrill 2012-05-30 14:53:53 UTC
fixed in katello master:

604d36ae7c6056d6559d64cdba94422cc68f3ec5

Comment 17 David Davis 2012-09-21 14:19:29 UTC
This is going to fail. For more info see https://bugzilla.redhat.com/show_bug.cgi?id=824581 which has the most up-to-date information.

Comment 18 David Davis 2012-09-26 19:17:51 UTC
Rather, it's not going to fail but gpgkey will be set in the repo file while gpgcheck will still be 0.

Pull request:

https://github.com/Katello/katello/pull/729

Commit SHA:

a609539ac3b4f9f72c155f15b7521ad4bfd1f429

Comment 19 Mike McCune 2012-10-09 19:15:24 UTC
the above code was actually reverted and the fix was implemented within Candlepin itself.

This bug looks largely like a dupe of:

https://bugzilla.redhat.com/show_bug.cgi?id=824581 

which we have as VERIFIED.  If QE wants to re-test this go ahead.

Comment 20 Mike McCune 2012-10-09 19:16:38 UTC
this is also blocked by:

https://bugzilla.redhat.com/show_bug.cgi?id=834125

Comment 21 Mike McCune 2012-10-09 19:17:56 UTC
Talk to Og and are going to close this as a dupe

*** This bug has been marked as a duplicate of bug 824581 ***