Bug 769072
Summary: | Should not leave space in yum repo names on export | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Jason Guiditta <jguiditt> | ||||
Component: | API | Assignee: | Lukas Zapletal <lzap> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Garik Khachikyan <gkhachik> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.0.0 | CC: | bkearney, gkhachik, hbrock, imcleod, jrd, mkoci, mmccune, sloranz | ||||
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-03-02 11:53: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 | ||||||
Attachments: |
|
Description
Jason Guiditta
2011-12-19 20:46:27 UTC
So to be clear you are saying this XML: <repositories> <repository name="Red Hat Enterprise Linux 6 Server RPMs 61 x86_64"> <url>https://sat-perf-04.idm.lab.bos.redhat.com/pulp/repos/ACME_Corporation/Locker/content/dist/rhel/server/6/6.1/x86_64/os</url> <persisted>No</persisted> </repository> <repository name="Red Hat Enterprise Linux 6 Server - Optional RPMs 61 x86_64"> <url>https://sat-perf-04.idm.lab.bos.redhat.com/pulp/repos/ACME_Corporation/Locker/content/dist/rhel/server/6/6.1/x86_64/optional/os</url> <persisted>No</persisted> </repository> </repositories> should instead look like: <repositories> <repository name="Red_Hat_Enterprise_Linux_6_Server_RPMs_61_x86_64"> <url>https://example.redhat.com/pulp/repos/ACME_Corporation/Locker/content/dist/rhel/server/6/6.1/x86_64/os</url> <persisted>No</persisted> </repository> <repository name="Red_Hat-Enterprise_Linux_6_Server_-_Optional_RPMs_61 x86_64"> <url>https://example.redhat.com/pulp/repos/ACME_Corporation/Locker/content/dist/rhel/server/6/6.1/x86_64/optional/os</url> <persisted>No</persisted> </repository> </repositories> or perhaps something similar? could we instead add an 'id' field and keep the names human readable instead? id could be something that is usable in yum's config: <repository name="Red Hat Enterprise Linux 6 Server RPMs 61 x86_64" id="rhel-6-server-optional-rpms"> Created attachment 548727 [details]
patch to remove spaces from name and include pulp_id
Adding a patch that can be used to convert all spaces to underscores in the name in the XML. Not sure if that is the right thing todo but will fix any short term issues.
Added a patch in comment 2 that adds converts the spaces to _ in the repo name field: <repository name="repo_name_with_spaces_and_stuff" id="ACME_Corporation-Fedora-repo_name_with_spaces_and_stuff"> <url> https://el6.pdx.redhat.com/pulp/repos/ACME_Corporation/Locker/custom/Fedora/repo_name_with_spaces_and_stuff </url> <persisted>No</persisted> </repository> Hello Mike. I should have commented on this earlier. Either solution you propose will work fine -- the only constraint is that Oz needs *something* to feed to Yum that doesn't have spaces in it. I'm not sure why Yum cares, but it does apparently. If the better solution for you guys is to generate a separate ID field and keep the Name attribute fully human-readable, we can adjust Oz accordingly. For now we have patched Oz along exactly the lines you described above -- it replaces " " with "_" in the name field. So this patch *may* not even be needed. One thing that does strike me as important is that the Yum repos following an Oz build should look the same as the Yum repos created by a Katello kickstart install for bare metal. Is there some logic that creates sane Yum repo names for that installation method? Thanks... I'm not sufficiently familiar with the code to say for certain, but I believe oz does do stuff like you're suggesting. Adding imcleod and sloranz, they may have better insight into that issue. The problem is not the repo name in the repo definition. The problem is the *filename* that Oz, via Anaconda, is giving the repo definition (which I believe should be, in this example, rhel-6-server-optional-rpms). Oz is pulling this from the "name" attribute in the template. This may well be wrong -- it may be that the filename should come from some other piece of data that we are not giving Oz at all. We hacked in a replace-spaces-with-underscores patch to Oz to work around this, but I'm completely unconvinced that is the right solution. What do you guys do when you create repo definitions in kickstarts? Sorry.. App Engine folks, can we include a <label> item under <repo>? It would be a peer for <URL> To follow up, the resolution to this is to add a <label> tag under repo. It should be text which is acceptable for use as a yum repo label (e.g. no spaces). App Engine will open a matching bug to handle this new element. Maybe I misparsed the email from Chris Alfonso, but I believe he added code to Oz itself to make sure it removes spaces for the repo id, which seems to me to obviate the need for any of this other work. Perhaps I am missing something. We definitely need another tag (<label> perhaps) to send the filename and repo_id along with the long name. Name and label are two different things, I dont thin we want filenames like that: Red_Hat_Enterprise_Linux_6_Server_-_Optional_(RPMs).repo Since this is our blocker bug, can you please implement this in Oz for us? Chris' one line fix for this is here: https://github.com/aeolusproject/oz/commit/bf2e3e42e197e442df634e541626e2338982c0fd It is also in the latest brew build of Oz. Thanks. Mike you did not push the patch you attached, do you? It is not necessary I guess now. Garik, there was no change on our side. It was changed on the Aeolus side. Guys, we are able to deliver you nice "label" or something, that is shorter and much nicer than name with converted spaces. If you want this, just file another BZ for us (post V1 please). Thanks. |