| Summary: | Need schema version in definition xml | ||
|---|---|---|---|
| Product: | [Retired] CloudForms Cloud Engine | Reporter: | jrd <jrd> |
| Component: | imagefactory | Assignee: | Ian McLeod <imcleod> |
| Status: | CLOSED ERRATA | QA Contact: | dgao |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.0.0 | CC: | akarol, brad, dajohnso, deltacloud-maint, dgao, hbrock, ssachdev, whayutin |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-05-15 20:17:04 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
jrd
2011-10-12 14:05:41 UTC
adding to sprint tracker This was added here: https://github.com/aeolusproject/oz/commit/5be16e92c981c2d0c46cfbbf7c9314fbd740a3ce#oz/TDL.py This commit is from November and is present in the most recent Oz RPMs in brew. The version is specified as a property of the top level <template> tag. That is: <template version="1.0"> stuff </template> If the version property is not present, no check is done. If it is, we check it. The version in Oz is currently set to 1.0. We'll need to actively manage this in the future. Setting to ON_QA. [root@qeblade32 ~]# aeolus-image build --target ec2 --template RHEL62.tpl
ERROR: Service Temporarily Unavailable => Please check that Conductor is running.
[root@qeblade32 ~]# aeolus-check-services
Checking mongod ...
Success: mongod (pid 4112) is running...
Checking iwhd ...
Success: iwhd (pid 4146) is running...
Checking postgresql ...
Success: postmaster (pid 455) is running...
Checking httpd ...
Success: httpd (pid 4197) is running...
Checking qpidd ...
Success: qpidd (pid 4015) is running...
Checking deltacloud-core ...
Success: deltacloud-core (pid 3983) is running...
Checking libvirtd ...
Success: libvirtd (pid 576) is running...
Checking aeolus-conductor ...
Success: thin (pid 9093) is running...
Checking conductor-dbomatic ...
Success: dbomatic (pid 4405) is running...
Checking imagefactory ...
Success: imagefactory (pid 4438) is running...
Checking ntpd ...
Success: ntpd (pid 7806) is running...
[root@qeblade32 ~]# vi RHEL62.tpl
[root@qeblade32 ~]# ps -ef | grep thin
nobody 3983 1 0 11:52 ? 00:01:06 thin server (localhost:3002) [deltacloud-mock]
aeolus 9093 1 0 15:03 ? 00:00:27 thin server (127.0.0.1:3000)
root 14180 16622 0 17:18 pts/0 00:00:00 grep thin
[root@qeblade32 ~]# aeolus-image build --target ec2 --template RHEL62.tpl
ERROR: Service Temporarily Unavailable => Please check that Conductor is running.
[root@qeblade32 ~]# cat RHEL62.tpl
<template version="1.0">
<name>RHEL6-2Basic version</name>
<os>
<name>RHEL-6</name>
<version>2</version>
<arch>x86_64</arch>
<rootpw>redhat</rootpw>
<install type="url">
<url>http://download.lab.bos.redhat.com/released/RHEL-6/6.2/Server/x86_64/os/</url>
</install>
</os>
<description>RHEL62 x86_64 </description>
</template>
[root@qeblade32 ~]#
IMHO this is not an urgent bug.. bumping down to high Log entry:
2012-02-14 11:27:42,456 ERROR imgfac.rest.imagefactory thread(worker 0) Message: 'template_string' must be a UUID, URL, or XML document...
--- TEMPLATE STRING ---
<template version='1.0'>
<name>RHEL_62</name>
<os>
<name>RHEL-6</name>
<version>2</version>
<arch>x86_64</arch>
<rootpw>REDACTED</rootpw>
<install type='url'>
<url>http://REDACTED/released/RHEL-6/6.2/Server/x86_64/os/</url>
</install>
</os>
<description>RHEL 6.2 x86_64</description>
</template>
-----------------
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 118, in build_image
jobs = BuildDispatcher().build_image_for_targets(image_id, build_id, template, targets.split(','))
File "/usr/lib/python2.6/site-packages/imgfac/BuildDispatcher.py", line 52, in build_image_for_targets
template = self._load_template(image_id, build_id, template)
File "/usr/lib/python2.6/site-packages/imgfac/BuildDispatcher.py", line 177, in _load_template
return Template(template)
File "/usr/lib/python2.6/site-packages/imgfac/Template.py", line 50, in __init__
template_string_type = self.__template_string_type(template_string)
File "/usr/lib/python2.6/site-packages/imgfac/Template.py", line 94, in __template_string_type
raise ValueError("'template_string' must be a UUID, URL, or XML document...\n--- TEMPLATE STRING ---\n%s\n-----------------" % (template_string, ))
That traceback implies that the template in your comment is not what is being passed to Factory. Please double-check your command line invocation and try to reproduce. Reproduced:
[root@dell-pem600-01 ~]# rpm -qa | egrep "imagefactory|aeolus-cli"
rubygem-aeolus-cli-0.3.0-10.el6.noarch
imagefactory-1.0.0rc6-1.el6.noarch
imagefactory-jeosconf-ec2-rhel-1.0.0rc6-1.el6.noarch
rubygem-imagefactory-console-0.4.0-1.el6.noarch
imagefactory-jeosconf-ec2-fedora-1.0.0rc6-1.el6.noarch
[root@dell-pem600-01 ~]# aeolus image build --target ec2 --template rhel_template --environment default
ERROR: Service Temporarily Unavailable => Please check that Conductor is running.
[root@dell-pem600-01 ~]# aeolus-check-services
Checking mongod ...
Success: mongod (pid 3677) is running...
Checking iwhd ...
Success: iwhd (pid 3696) is running...
Checking postgresql ...
Success: postmaster (pid 3735) is running...
Checking httpd ...
Success: httpd (pid 3756) is running...
Checking qpidd ...
Success: qpidd (pid 3771) is running...
Checking deltacloud-core ...
Success: deltacloud-core (pid 3836) is running...
Checking libvirtd ...
Success: libvirtd (pid 3854) is running...
Checking aeolus-conductor ...
Success: thin (pid 3916) is running...
Checking conductor-dbomatic ...
Success: dbomatic (pid 3960) is running...
Checking imagefactory ...
Success: imagefactory (pid 3977) is running...
Checking ntpd ...
Success: ntpd (pid 3994) is running...
[root@dell-pem600-01 ~]# cat rhel_template
<template version="1.0">
<name>RHEL6_2 configserver</name>
<os>
<name>RHEL-6</name>
<version>2</version>
<arch>x86_64</arch>
<install type='url'>
<url>http://download.devel.redhat.com/released/RHEL-6/6.2/Server/x86_64/os/</url>
</install>
<rootpw>dog8code</rootpw>
</os>
<repositories>
<repository name="rhel">
<url>http://download.devel.redhat.com/released/RHEL-6/6.2/Server/x86_64/os/</url>
</repository>
<repository name="aeolus">
<url>http://repos.fedorapeople.org/repos/aeolus/conductor/testing/6Server/x86_64/</url>
</repository>
</repositories>
<packages>
<package name="aeolus-audrey-agent"/>
</packages>
<description>RHEL 6.2 w/ Audrey Client for ec2</description>
</template>
By removing version="1.0" from <template>, the build kicks off fine. Ian, we believe this is just a Factory docs issue, can you confirm, fix the docs, and deal with the BZ appropriately? Oz supports adding a version string. This is a factory bug, not a doc bug. Fixed here: https://github.com/aeolusproject/imagefactory/pull/91 OK. This required one additional change: https://github.com/aeolusproject/imagefactory/commit/780f209b3d99bf8ec6b81dcc12f6f7a465cfc72f And it is now brewed as part of 1.0.0rc7 You can now use this syntax: <template version="1.0"> Note that 1.0 is the one and only valid "version" of TDL at the moment.
================ Working fine with version = 1.0 ===========================
aeolus image build --target ec2 --template rhel_temp.tpl --environment default
Image Build Target Image Target Status
------------------------------------ ------------------------------------ ------------------------------------ ------ --------
14a7f0a0-6128-11e1-91ad-001e4ffbdd3c 8caeba92-abb5-4fbb-a027-1e281f065188 b2c5bb97-257b-470b-8ba5-27f64d2d313c ec2 BUILDING
============= When version is something other than 1.0 ===================
[root@dell-per805-01 ~]# aeolus image build --target ec2 --template rhel_tempp.tpl --environment default
ERROR: Service Temporarily Unavailable => Please check that Conductor is running.
========================= In log file ===========================
self._validate_tdl_version()
File "/usr/lib/python2.6/site-packages/oz/TDL.py", line 369, in _validate_tdl_version
raise oz.OzException.OzException("TDL version (%s) is higher than our known version (%s)" % (self.version, self.schema_version))
Cane we have the log file error at the cli command execution as well instead of "Service unavilable"
=====================================
rpm -qa|grep aeolus
aeolus-conductor-0.8.0-36.el6.noarch
rubygem-aeolus-cli-0.3.0-10.el6.noarch
aeolus-conductor-daemons-0.8.0-36.el6.noarch
aeolus-configure-2.5.0-15.el6.noarch
rubygem-aeolus-image-0.3.0-10.el6.noarch
aeolus-all-0.8.0-36.el6.noarch
aeolus-conductor-doc-0.8.0-36.el6.noarch
Due to the way the build is executed, we cannot currently have the error reported at the time you run the CLI tool. Improving this is on the top of our list for post 1.0 feature improvements.
The error you are now seeing is this:
raise oz.OzException.OzException("TDL version (%s) is higher than our known
version (%s)" % (self.version, self.schema_version))
This is, in fact, the version checking code doing its job. This indicates that the TDL you have passed in had a version other than 1.0. I cannot confirm this because you have not provided the TDL string passed to Factory.
To be clear, the expected behaviour is success if you have an opening tag like this:
<template version="1.0">
And failure for any other version string.
Please test again with both a 1.0 version string and, for completeness, a version string other than 1.0 and see if you get the behaviour described above (I do).
Please provide the full TDL for any further reports against this bug.
Please also include the version of the "oz" RPM in any further reports.
Yea , i provided version other than 1.0 when i got this error. The error is right , i was just saying if we can get the same in UI while executing the command . You have answered that :) Thanks . Verifying the bug. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2012-0588.html |