Bug 1207431

Summary: Unsetting gpg url on content does not unset gpgkeycheck in repo file
Product: [Community] Candlepin Reporter: Eric Helms <ehelms>
Component: candlepinAssignee: candlepin-bugs
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 0.9CC: bcourt, ehelms, fnguyen, redakkan, skallesh
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1207433 (view as bug list) Environment:
Last Closed: 2015-10-15 16:07:33 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: 1207433    

Description Eric Helms 2015-03-30 23:47:43 UTC
Description of problem:
After creating a Content item with a gpgUrl and then updating the Content by unsetting the gpgUrl the redhat.repo file on disk still contains 'gpgcheck = 1'.

This was found in CP: 
candlepin-0.9.42-1.el7.noarch

API Call:

Resource PUT request: /candlepin/content/1427685253045, {"id":"1427685253045","name":"1.7 Plugins","contentUrl":"/custom/Foreman/1_7_Plugins","gpgUrl":null,"type":"yum","label":"Default_Organization_Foreman_1_7_Plugins","vendor":"Custom"}


Note this was done on upstream Katello that uses Candlepin.

Comment 1 Filip Nguyen 2015-10-06 12:58:04 UTC
I can see the same behavior. It is one or more bugs in subscription-manager on client side. I will raise bugs against it.

For the record, the API you used has been changed. Now to update the content you must use: 

to get information about a content: GET /candlepin/owners/{owner}/content/{content_id}

to update it: PUT /candlepin/owners/{owner}/content/{content_id}
{"uuid":"ff8080815036ca63015036ca8343005f","id":"11113","type":"yum","label":"awesomeos","owner":{"id":"ff8080815036ca63015036ca7a050004","key":"snowwhite","displayName":"Snow White","href":"/owners/snowwhite"},"name":"awesomeos","vendor":"Red Hat","contentUrl":"/path/to/$basearch/$releasever/awesomeos","requiredTags":null,"releaseVer":null,"gpgUrl":null,"metadataExpire":3600,"modifiedProductIds":[],"arches":null,"created":"2015-10-05T06:57:32.995+0000","updated":"2015-10-05T06:57:32.995+0000"}

Comment 2 Filip Nguyen 2015-10-06 13:00:22 UTC
Note that possible workaround for this issue is to reattach pools that provide the content.

Comment 3 Filip Nguyen 2015-10-06 13:22:03 UTC
Eric I reproduced the issue and I am investigating it further.

But because the bugreport is quite old, my question is whether you still need this fixed? Also, isn't workaround in Comment 2 good enough for you?

Comment 4 Filip Nguyen 2015-10-15 16:07:33 UTC
Closing this as this is not Candlepin bug. Created two issues on Subman to solve this: 1269147, 1269152