Bug 769954
Summary: | Repo name provided by the Web UI is used fo the name and label in Candlepin | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Bryan Kearney <bkearney> |
Component: | API | Assignee: | Ivan Necas <inecas> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Og Maciel <omaciel> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.1 | CC: | lzap, omaciel |
Target Milestone: | Unspecified | Keywords: | 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: | 2012-08-22 18:16:10 UTC | Type: | --- |
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: | 747354 |
Description
Bryan Kearney
2011-12-22 20:06:37 UTC
In candlepin-0.5.8-1 only label must be unique. It was solved by prefixing the repo name with product id in Katello. It's not ideal, but it works. productName + " " + repoName is not sufficient because there might be two products with the same name in two organizations. We could add orgName to prefix to be unique, but I'm not sure the lenght is ideal? Modified in commit 0c75d7d54772b73d251d74ea0b064acf2689a7ff: Changing form of generated label from {product.id}-{repo.name} to {org.name}_{product.name}_{repo.name}. The reason is that this label is shown in redhat.repo and therefore it should be more user friendly. The length is not an issue (255 chars should be enough for the whole part). I am changing it back, but in slightly different order. So instead {org.name}_{product.name}_{repo.name} we get {repo.name}_{self.id} This is because repo binding/unbinding. We would need to do another query into Candlepin to get a label. Such a service would need to be created first. This format makes it easier. Ok I am NOT changing the format to "#{repo.name}-#{self.id}".gsub(/\s/,"_"). Keeping Ivan's implementation: "#{self.organization.name} #{self.name} #{repo.name}".gsub(/\s/,"_") Ivan/Lukáš, does this validate the issue? katelloschema=> select distinct cp_label from repositories; ACME_Corporation_Verne_i386 ACME_Corporation_Brew_Katello NYDataCenter_Katello_Puddle . . . . rhel-5-server-supplementary-debuginfo rhel-6-desktop-supplementary-isos rhel-6-desktop-optional-rpms Yes This has been validated. getting rid of 6.0.0 version since that doesn't exist |