Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1034375

Summary: Candlepin should ensure all content override names are lowercase
Product: Red Hat Satellite Reporter: Michael Stead <mstead>
Component: Subscription ManagementAssignee: Michael Stead <mstead>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: NightlyCC: cwelton, jsefler, redakkan
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-17 18:33:21 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:
Attachments:
Description Flags
Test reproducer data. none

Description Michael Stead 2013-11-25 17:11:55 UTC
Created attachment 828773 [details]
Test reproducer data.

Description of problem:

Currently when a content override is created with the same name, but with different case, it is not seen as a duplicate and multiple overrides are created.

Since yum will always convert repo properties to lowercase, candlepin should do the same.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:

Referencing the attached JSON file (override-case-test.json) and my test candlepin:

curl -k -u admin:admin -X PUT -H "Content-Type: application/json" -d @"../override-case-test.json" http://localhost:8080/candlepin/consumers/65d417b0-9ee0-48a1-a152-28efabd07abb/content_overrides/


Actual results:

A JSON response with an override for both gpgcheck and GPGCheck

[ {
  "contentLabel" : "my-repo",
  "name" : "gpgcheck",
  "value" : "1"
}, {
  "contentLabel" : "test",
  "name" : "GPGCheck",
  "value" : "0"
} ]


Expected results:

A JSON response with a single override for gpgcheck (lowercase).

** NOTE: In the case above the values are different. Suggest that the value be set to that of the last override processed.


[ {
  "contentLabel" : "my-repo",
  "name" : "gpgcheck",
  "value" : "0"
} ]


Additional info:

We should consider override validation checks in the rules as well to make sure that it always checks the lowercase version of the override name.

We can test this by using case variances against trying to override the baseurl property.

In the test json provided, changing the 'name' to baseUrl and baseurl should produce an error.

Comment 1 RHEL Program Management 2013-11-25 17:34:45 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Michael Stead 2014-01-08 15:21:23 UTC
There is an error in the attached test data JSON file. The 'contentLabel' of both entries should be the same.

Here is a corrected version:

[ 
  {
    "contentLabel" : "my-repo",
    "name" : "gpgcheck",
    "value" : "1"
  }, 
  {
    "contentLabel" : "my-repo",
    "name" : "GPGCheck",
    "value" : "0"
  } 
]

Expected results will remain the same as in the description.

Comment 4 Michael Stead 2014-01-08 15:24:16 UTC
Follow these steps to test with subscription-manager:

Reproduced
--------------

[mstead@highside candlepin]$ sudo subscription-manager identity
system identity: 41fda330-47f8-42b1-92f8-a8d7c7c6d9e6
name: highside
org name: Admin Owner
org ID: admin

[mstead@highside candlepin]$ sudo subscription-manager repo-override --repo test --add gpgcheck:0
Repository 'test' does not currently exist, but the override has been added.

[mstead@highside candlepin]$ sudo subscription-manager repo-override --repo test --add GPGCheck:1
Repository 'test' does not currently exist, but the override has been added.

[mstead@highside candlepin]$ sudo subscription-manager repo-override --list
Repository: test
  GPGCheck: 1
  gpgcheck: 0



Expected
----------

[mstead@highside candlepin]$ sudo subscription-manager identity
system identity: 41fda330-47f8-42b1-92f8-a8d7c7c6d9e6
name: highside
org name: Admin Owner
org ID: admin

[mstead@highside candlepin]$ sudo subscription-manager repo-override --repo test --add gpgcheck:0
Repository 'test' does not currently exist, but the override has been added.

[mstead@highside candlepin]$ sudo subscription-manager repo-override --repo test --add GPGCheck:1
Repository 'test' does not currently exist, but the override has been added.

[mstead@highside candlepin]$ sudo subscription-manager repo-override --list
Repository: test
  gpgcheck: 1

Comment 5 Michael Stead 2014-01-08 15:40:00 UTC
https://github.com/candlepin/candlepin/pull/483

Comment 9 Corey Welton 2014-07-17 18:33:21 UTC
Closing upstream -  devtask