Bug 827943 - GPG Key added to product/repo not added to existing instances which are subscribed to that product/repo
GPG Key added to product/repo not added to existing instances which are subsc...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Kedar Bidarkar
: Triaged, ZStream
Depends On: 824581 834125
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-03 18:25 EDT by Chris Pelland
Modified: 2014-09-18 11:31 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
System Engine did not pass GPG key information from an updated product or repository to clients. The gpgkey value in the client's repo file remained unchanged. This update refreshes information passed to clients when updating System Engine repository information. System Engine provides clients with updated repo files, including GPG keys.
Story Points: ---
Clone Of: 824581
Environment:
Last Closed: 2012-07-10 03:25:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 3 Dan Macpherson 2012-06-13 03:41:10 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
System Engine did not pass GPG key information from an updated product or repository to clients. The gpgkey value in the client's repo file remained unchanged. This update refreshes information passed to clients when updating System Engine repository information. System Engine provides clients with updated repo files, including GPG keys.
Comment 4 Kedar Bidarkar 2012-06-19 10:51:56 EDT
Summary :- Running the commands "subscription-manager refresh" and "yum repolist" on client, after adding gpgkey key for the repo, does not automatically change the gpgcheck=0 to gpgcheck=1
 
------------------------------------

Case 1)  : without a gpgkey

I synced a custom provider "rhel62" and synced content, no gpg key was used.
It was later promoted and on running "yum repolist", the redhat.repo was populated with the below stuff.

[ACME_Corporation_Fedora_product_fed_repo]
name = fed_repo
baseurl = https://xc.redhat.com/pulp/repos/ACME_Corporation/Dev/custom/Fedora_product/fed_repo
enabled = 1
gpgcheck = 0
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-local.pem
sslclientkey = /etc/pki/entitlement/3211491558867242750-key.pem
sslclientcert = /etc/pki/entitlement/3211491558867242750.pem

==================End of Case1=================================

Case 2): After adding a GPGkey for the repo

Later I added the gpgkey, re-synced content ( agreed not necessary), re-promoted the Product.
Moved to the client end, 
Ran the below commands.

[root@xx ~]# subscription-manager refresh 
All local data refreshed
[root@xx ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
ACME_Corporation_Fedora_product_fed_repo                 | 3.7 kB     00:00     
repo id                                              repo name            status
ACME_Corporation_Fedora_product_fed_repo             fed_repo             3,529
repolist: 3,529


And now on checking the content inside redhat.repo , after running the above commands,

[ACME_Corporation_Fedora_product_fed_repo]
name = fed_repo
baseurl = https://xc.redhat.com/pulp/repos/ACME_Corporation/Dev/custom/Fedora_product/fed_repo
enabled = 1
gpgcheck = 0
gpgkey = https://xc.redhat.com/katello/api/repositories/1/gpg_key_content
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-local.pem
sslclientkey = /etc/pki/entitlement/1401602742009796537-key.pem
sslclientcert = /etc/pki/entitlement/1401602742009796537.pem


I see that gpgcheck has not automatically moved to gpgcheck=1 and is still gpgcheck=0, but we have a new entry which is the link to the gpgkey

====================End of Case 2=====================================


After that I manually flipped it to gpgcheck=1, removed the "gpg-pubkey" and found that, we could indeed fetch content and the gpgkeys also with it.

Later I re-registered the system and re-subscribed the product and now the redhat.repo was populated with the below content.

[ACME_Corporation_Fedora_product_fed_repo]
name = fed_repo
baseurl = https://xc.redhat.com/pulp/repos/ACME_Corporation/Dev/custom/Fedora_product/fed_repo
enabled = 1
gpgcheck = 1
gpgkey = https://xc.redhat.com/katello/api/repositories/1/gpg_key_content
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-local.pem
sslclientkey = /etc/pki/entitlement/2967524992419075334-key.pem
sslclientcert = /etc/pki/entitlement/2967524992419075334.pem
Comment 5 Mike McCune 2012-06-20 16:29:44 EDT
This looks like it is a subscription-manager bug where it is not re-generating the repo configuration for repositories that have changed upstream.

If you re-register or clear out the redhat.repo file it will properly update the gpgcheck and gpgkey path.

I'll file a new bug for that issue but am going to move this back ON_QA to let them determine if things are fixed from a CFSE standpoint.
Comment 6 Mike McCune 2012-06-20 17:59:46 EDT
Filed a RHSM bug:

https://bugzilla.redhat.com/show_bug.cgi?id=834125
Comment 8 errata-xmlrpc 2012-07-10 03:25:15 EDT
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.

http://rhn.redhat.com/errata/RHBA-2012-1062.html

Note You need to log in before you can comment on or make changes to this bug.