Bug 755730
Summary: | exported RHEL templates from katello fail to build in aeolus due to bad name.. <name>Red Hat Enterprise Linux</name>< | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | wes hayutin <whayutin> |
Component: | katello-agent | Assignee: | Bryan Kearney <bkearney> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Garik Khachikyan <gkhachik> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.0.1 | CC: | calfonso, ckannan, imcleod, jrd, lzap, mitch, mkoci, mmccune, sghai |
Target Milestone: | Unspecified | ||
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:08:14 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
wes hayutin
2011-11-21 21:39:43 UTC
You can see the supported builder names here https://github.com/aeolusproject/imagefactory/tree/master/imgfac/builders I believe the <name> element value needs to be one of those builder prefixed names. Before we go and add a mapping table in Katello to transform the distribution names provided by Release Engineering in the treeinfo files, eg: https://cdn.redhat.com/content/dist/rhel/server-6/6Server/x86_64/os/treeinfo or if you can't access that, here: https://fedorahosted.org/katello/wiki/ExampleTreeinfoFile we will want to make sure that we are making the right translations to the format imagefactory wants. It seems a bit backwards to translate the standard product name to a Image Factory specific classname as noted in the above URL. Seems to me Image Factory should be the one doing the mapping but we can go ahead and do this if necessary. To be clear the translation would be: treeinfo data: family = Red Hat Enterprise Linux -> RHEL version = 6.0 -> 6 RHEL6_ I assume it is up to IF to fill out the rest of the string? Also ... do we need to translate both fields so: <os> <name>Red Hat Enterprise Linux</name> <version>6.1</version> becomes: <os> <name>RHEL</name> <version>6</version> seems like a bad idea to chop off the .1 from 6.1 just because there does not yet exist a class in IF to deal with 6.1 (vs 6). I agree that image factory should be more tolerant of names used.. That family = Red Hat Enterprise Linux -> RHEL The current implementation of factory actually includes the major version of RHEL in the name.. So it looks like.. <name>RHEL-6</name> <version>1</version> It does seem more intuitive to write out the xml as Mike has described it. w/ <name> taking either RHEL or "Red Hat Enterprise Linux" and then in the version specifying the major and minor versions, however that is not how it works today. We have some very old bugs targeting the diff between fedora and rhel templates, but the is what it is now. I'm betting the SE guys ran into the same confusion we had, which was RHEL templates would look like fedora templates.. <os> <name>Fedora</name> <version>15</version> However they do *not*.. Again.. RHEL has the major version in the <name> <os> <name>RHEL-6</name> <version>1</version> I'd like to advocate at least a common convention could be adopted if and when we (CE) are to translate the output of the template into the Image Factory required format. I'd prefer to avoid having to put in logic that does: * if RHEL include version in name * else, just include name and would like it if we could just do: treeinfo name -> IF required name format (eg, Red Hat Enterprise Linux -> RHEL) treeinfo version > IF required version format (eg, 5.5 -> 5) btw - the bug seems not triage-ed and no priority/severity is there. @Wes: what is importance of this fix for you ? About the mapping structure - would be great after (during) implementation have a wiki for that. thanks. I'm not going to express an opinion at this point about the merits of making IF be more tolerant and/or sensible about what it accepts. The proposals above sound reasonable..... for post 1.0. Whether or not it's ideal, the template schema has mileage on it, and I think it's a bad idea to change it at this stage of the project. Aside from everything else, the IF team has already agreed to take on an out-of-band project for this sprint. We don't have the bandwidth to fiddle the format without breaking it. I strongly advocate that the katello team put in some variety of mapping, however kludgey, to get us past 1.0. Let's revisit enhancements to the template schema afterwards. I recommend the following mapping: # katello mapping file --- # supported distribution mapping for TDL name-version pairs - aeolus_imagefactory: Fedora 14: [Fedora, 14] Fedora 15: [Fedora, 15] Fedora 16: [Fedora, 16] Fedora 17: [Fedora, 17] Red Hat Enterprise Linux 5.5: [RHEL-5, U5] Red Hat Enterprise Linux 5.6: [RHEL-5, U6] Red Hat Enterprise Linux 5.7: [RHEL-5, U7] Red Hat Enterprise Linux 5.8: [RHEL-5, U8] Red Hat Enterprise Linux 5.9: [RHEL-5, U9] Red Hat Enterprise Linux 6: [RHEL-6, 0] Red Hat Enterprise Linux 6.0: [RHEL-6, 0] Red Hat Enterprise Linux 6.1: [RHEL-6, 1] Red Hat Enterprise Linux 6.2: [RHEL-6, 2] Red Hat Enterprise Linux 6.3: [RHEL-6, 3] Red Hat Enterprise Linux 6.4: [RHEL-6, 4] # vim: sw=4:ts=3:et Katello now has a mapping file in /etc/katello/mapping.yml which contain all supported distributions and versions. 5c2cdca 755730 - exported RHEL templates mapping removing bugs from ce-sprint from the tracker.. you can find these bugs by querying the "qa whiteboard" for ce-sprint-60 Verified with following katello build: [root@dhcp201-197 ~]# rpm -qa | grep katello katello-glue-pulp-0.1.155-1.el6.noarch katello-configure-0.1.48-1.el6.noarch katello-trusted-ssl-cert-1.0-1.noarch katello-cli-common-0.1.31-1.el6.noarch katello-glue-foreman-0.1.155-1.el6.noarch katello-common-0.1.155-1.el6.noarch katello-httpd-ssl-key-pair-1.0-1.noarch katello-0.1.155-1.el6.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-repos-0.1.4-1.el6.noarch katello-cli-0.1.31-1.el6.noarch katello-glue-candlepin-0.1.155-1.el6.noarch katello-all-0.1.155-1.el6.noarch katello-certs-tools-1.0.1-1.el6.noarch mapping.yml file includes: =========================== [root@dhcp201-197 ~]# cat /etc/katello/mapping.yml # katello mapping file --- # supported distribution mapping for TDL name-version pairs imagefactory_naming: Fedora 14: [Fedora, 14] Fedora 15: [Fedora, 15] Fedora 16: [Fedora, 16] Fedora 17: [Fedora, 17] Red Hat Enterprise Linux 5.5: [RHEL-5, U5] Red Hat Enterprise Linux 5.6: [RHEL-5, U6] Red Hat Enterprise Linux 5.7: [RHEL-5, U7] Red Hat Enterprise Linux 5.8: [RHEL-5, U8] Red Hat Enterprise Linux 5.9: [RHEL-5, U9] Red Hat Enterprise Linux 6: [RHEL-6, 0] Red Hat Enterprise Linux 6.0: [RHEL-6, 0] Red Hat Enterprise Linux 6.1: [RHEL-6, 1] Red Hat Enterprise Linux 6.2: [RHEL-6, 2] Red Hat Enterprise Linux 6.3: [RHEL-6, 3] Red Hat Enterprise Linux 6.4: [RHEL-6, 4] # vim: sw=4:ts=3:et [root@dhcp201-197 ~]# I generated a system template of rhel6.1 distro that uses the name version pairs like: [RHEL-6, 1] Please see the generated template here: ----- [root@scroponok ~]# xmllint --format --recover rhel61_29dec-Locker-export.xml <?xml version="1.0" encoding="UTF-8"?> <template> <name>rhel61_29dec</name> <os> <name>RHEL-6</name> <version>1</version> <arch>x86_64</arch> <install type="url"> <url>http://dhcp201-197.englab.pnq.redhat.com/pulp/ks/ACME_Corporation/Locker/content/dist/rhel/server/6/6.1/x86_64/os/</url> </install> <rootpw>redhat</rootpw> </os> <description/> <packages/> <repositories> <repository name="Red Hat Enterprise Linux 6 Server RPMs 61 x86_64"> <url>https://dhcp201-197.englab.pnq.redhat.com/pulp/repos/ACME_Corporation/Locker/content/dist/rhel/server/6/6.1/x86_64/os</url> <persisted>No</persisted> <clientcert>-----BEGIN CERTIFICATE----- MIIF9jCCBV+gAwIBAgIIGknYCH99CJowDQYJKoZIhvcNAQEFBQAwSzEqMCgGA1UE AwwhZGhjcDIwMS0xOTcuZW5nbGFiLnBucS5yZWRoYXQuY29tMQswCQYDVQQGEwJV UzEQMA4GA1UEBwwHUmFsZWlnaDAgFw0xMTEyMjkwNjMwNDVaGA8yMTExMTIyOTA2 MzA0NVowKzEpMCcGA1UEAxMgOGFjMTQ5NDUzNDg1OTM5NjAxMzQ4ODgzODhkNjAw M2YwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCeHvarvPDs6NPeSvVS 24EhxoL2ixgUtRmzVr4vXGD7K9YorQNdmkoROxV7QukLL68H4C1/nCjUE8Wsx/B5 yQh3VLGsFRiJSGy3/1KHfW48kcKW+TRvGxHg7egG91O1FJKmGbmRvJqag7CCqHvs YFuL8+haFnu9CzeFo3aOZ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IVATE KEY----- </clientkey> </repository> </repositories> </template> [root@scroponok ~]# Later I tried to import it in aeolus for building an image: [root@scroponok ~]# aeolus-cli build --target ec2 --template rhel61_29dec-Locker-export.xml Image: 3536eb57-c681-4e81-8bfb-271da0d4b0eb Build: f60030a0-1cf5-4a25-a9b6-66a43726d130 Target Image: 3391332d-b798-491a-89e3-f2aadb4e7847 :Status COMPLETED getting rid of 6.0.0 version since that doesn't exist |