Bug 718700 - aeolus-image build fails on fedora
Summary: aeolus-image build fails on fedora
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: imagefactory
Version: 0.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Ian McLeod
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-04 10:24 UTC by Aziza Karol
Modified: 2011-12-08 14:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-06 14:51:23 UTC


Attachments (Terms of Use)

Description Aziza Karol 2011-07-04 10:24:48 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
[root@dell-p690-01 ~]# aeolus-image build --target ec2  --template  temp.tpl
/usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/lib/build_command.rb:31:in `run': undefined method `each' for #<Qmf2::QmfAgentException:0x7f38838356b8> (NoMethodError)
	from /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/lib/config_parser.rb:194:in `build'
	from /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/lib/config_parser.rb:30:in `send'
	from /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/lib/config_parser.rb:30:in `process'
	from /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/bin/aeolus-image:6
	from /usr/bin/aeolus-image:19:in `load'
	from /usr/bin/aeolus-image:19
2011-07-04 06:19:56 warning Connection [36544 localhost:5672] closed


imagefactory log displays:
2011-07-04 06:19:54,426 DEBUG imagefactory.qmfagent.ImageFactoryAgent.ImageFactoryAgent pid(7232) Message: Method called: name = build_image 
 args = {'image': '', 'build': '', 'template': '<?xml version="1.0"?>\n<template>\n  <name>aziza_test_west_a</name>\n  <description>desc</description>\n  <os>\n    <name>Fedora</name>\n    <arch>x86_64</arch>\n    <version>14</version>\n    <install type="url">\n      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/</url>\n    </install>\n  </os>\n  <repositories>\n    <repository name="custom">\n      <url>http://repos.fedorapeople.org/repos/aeolus/demo/webapp/</url>\n      <signed>false</signed>\n    </repository>\n  </repositories>\n</template>\n~                     \n', 'targets': ['ec2']} 
 handle = <cqmf2.AgentEvent; proxy of <Swig Object of type 'qmf::AgentEvent *' at 0x2b4bcf0> > 
 addr = redhat.com:imagefactory:c891f14c-9045-4c9c-a45e-e5f98258d2d2:image_factory 
 subtypes = {} 
 userId = anonymous
2011-07-04 06:19:54,427 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(7232) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images)
2011-07-04 06:19:54,427 ERROR imagefactory.qmfagent.ImageFactoryAgent.ImageFactoryAgent pid(7232) Message: xmlParseDoc() failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/imagefactory/qmfagent/ImageFactoryAgent.py", line 74, in method
    result = getattr(target_obj, methodName)(**args)
  File "/usr/lib/python2.7/site-packages/imagefactory/qmfagent/ImageFactory.py", line 122, in build_image
    return BuildDispatcher().build_image_for_targets(image, build, template, targets, BuildAdaptor, self.agent)
  File "/usr/lib/python2.7/site-packages/imagefactory/BuildDispatcher.py", line 51, in build_image_for_targets
    image_id = self._ensure_image_with_template(image_id, template)
  File "/usr/lib/python2.7/site-packages/imagefactory/BuildDispatcher.py", line 91, in _ensure_image_with_template
    name = self._xml_node(template.xml, '/template/name')
  File "/usr/lib/python2.7/site-packages/imagefactory/BuildDispatcher.py", line 85, in _xml_node
    nodes = libxml2.parseDoc(xml).xpathEval(xpath)
  File "/usr/lib64/python2.7/site-packages/libxml2.py", line 1263, in parseDoc
    if ret is None:raise parserError('xmlParseDoc() failed')
parserError: xmlParseDoc() failed



Additional info:
[root@dell-p690-01 ~]# rpm -qa  | grep aeolus
aeolus-configure-2.0.1-0.fc14.20110628141215gitb8aaf85.noarch
aeolus-conductor-doc-0.3.0-0.fc14.20110701204941gitd66e27c.noarch
aeolus-conductor-0.3.0-0.fc14.20110701204941gitd66e27c.noarch
aeolus-all-0.3.0-0.fc14.20110701204941gitd66e27c.noarch
aeolus-conductor-daemons-0.3.0-0.fc14.20110701204941gitd66e27c.noarch
rubygem-aeolus-cli-0.0.1-1.fc14.20110701204941gitd66e27c.noarch

Comment 1 Jason Guiditta 2011-07-05 15:27:43 UTC
What versions of factory and oz do you have?  This is not an error in cli, it appears to be a parsing error in the factory itself.  I just tried the same example, and even altered the tdl content to include the xml version header, works fine for me, with the following versions.  

imagefactory-0.2.2-1.fc14.noarch
oz-0.4.0-1.fc14.x86_64

I have reassigned it to factory (pointed to Ian as contact), but am not sure if I put it in the right place.  If there is another component that it should be, please alter as needed

Comment 2 Aziza Karol 2011-07-06 09:42:05 UTC
Factory and oz version:

[root@dell-p690-01 ~]# rpm -qa  | grep imagefactory
imagefactory-0.2.2-1.fc14.noarch
[root@dell-p690-01 ~]# rpm -qa  | grep oz
oz-0.4.0-1.fc14.x86_64

The error is still observed with this version.

#aeolus-image build --target ec2 --template template2.tpl 
 /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/lib/build_command.rb:31:in `run': undefined method `each' for #<NoMethodError:0x7fb71646b318> (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/lib/config_parser.rb:194:in `build'
from /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/lib/config_parser.rb:30:in `send'
from /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/lib/config_parser.rb:30:in `process'
from /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.0.1/bin/aeolus-image:6
from /usr/bin/aeolus-image:19:in `load'
from /usr/bin/aeolus-image:19
2011-07-06 11:58:36 warning Connection [56223 localhost:5672] closed

Comment 3 Jason Guiditta 2011-07-06 14:08:59 UTC
Note that the piece you reference above is not the error, the error is what you reported earlier in the imagefactory.log.  The snippet above is just poorly worded feedback _about_ the factory error.  We need to provide better error reporting in a future version, but that is not itself the bug.

Comment 4 wes hayutin 2011-07-06 14:51:23 UTC
[root@hp-z400-01 ~]# rpm -qa | grep aeolus
aeolus-conductor-daemons-0.3.0-0.el6.20110705143716git65ca9f4.noarch
aeolus-conductor-0.3.0-0.el6.20110705143716git65ca9f4.noarch
rubygem-aeolus-cli-0.0.1-1.el6.20110705143716git65ca9f4.noarch
aeolus-conductor-doc-0.3.0-0.el6.20110705143716git65ca9f4.noarch
aeolus-all-0.3.0-0.el6.20110705143716git65ca9f4.noarch
aeolus-configure-2.0.1-0.el6.20110628141215gitb8aaf85.noarch
[root@hp-z400-01 ~]# rpm -q imagefactory
imagefactory-0.2.2-1.el6.noarch
[root@hp-z400-01 ~]# rpm -q oz
oz-0.4.0-1.el6.x86_64
[root@hp-z400-01 ~]# 


[root@hp-z400-01 ~]# aeolus-image build --target ec2 --template /root/template.tpl 

Target Image: 57ae4b85-d240-494f-9dbe-b85d21608505
Image: fc9e35ea-7d39-4eec-a907-ea66daecfc18
Build: dc612d3a-a1ac-4877-b910-921f60bcdb70
Status: COMPLETED
Percent Complete: 100

[root@hp-z400-01 ~]# aeolus-image push --provider ec2-us-east-1 --id fc9e35ea-7d39-4eec-a907-ea66daecfc18


[root@hp-z400-01 ~]# tail -f /var/log/imagefactory.log 
2011-07-06 10:45:55,819 DEBUG imagefactory.builders.BaseBuilder.FedoraBuilder pid(6936) Message: Storing placeholder object for non upload cloud image
2011-07-06 10:45:55,821 INFO imagefactory.ImageWarehouse.ImageWarehouse pid(6936) Message: Creating a bucket returned status 500.  If only iwhd would provide a sane way to know if a bucket exists so we wouldn't have to try and create one every time...
2011-07-06 10:45:55,823 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(6936) Message: Setting metadata ({'object_type': 'template', 'uuid': '5af5a0f4-057e-40fc-8960-1440b7a6bf83'}) for http://localhost:9090/templates/5af5a0f4-057e-40fc-8960-1440b7a6bf83
2011-07-06 10:45:55,908 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(6936) Message: Setting metadata ({'icicle': 'none', 'uuid': '57ae4b85-d240-494f-9dbe-b85d21608505', 'template': '5af5a0f4-057e-40fc-8960-1440b7a6bf83', 'target_parameters': None, 'object_type': 'target_image', 'target': 'ec2', 'build': 'dc612d3a-a1ac-4877-b910-921f60bcdb70'}) for http://localhost:9090/target_images/57ae4b85-d240-494f-9dbe-b85d21608505
2011-07-06 10:45:56,156 DEBUG imagefactory.BuildJob.BuildAdaptor pid(6936) Message: Raising event with agent handler (<ImageFactoryAgent(Thread-1, initial)>), changed percent complete from 0 to 100
2011-07-06 10:45:56,157 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(6936) Message: Getting metadata (['latest_unpushed']) from http://localhost:9090/images/fc9e35ea-7d39-4eec-a907-ea66daecfc18
2011-07-06 10:45:56,158 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(6936) Message: Getting metadata (['latest_build']) from http://localhost:9090/images/fc9e35ea-7d39-4eec-a907-ea66daecfc18
2011-07-06 10:45:56,160 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(6936) Message: Setting metadata ({'latest_unpushed': 'dc612d3a-a1ac-4877-b910-921f60bcdb70'}) for http://localhost:9090/images/fc9e35ea-7d39-4eec-a907-ea66daecfc18
2011-07-06 10:45:56,162 DEBUG imagefactory.BuildJob.BuildAdaptor pid(6936) Message: Raising event with agent handler (<ImageFactoryAgent(Thread-1, initial)>), changed status from NEW to COMPLETED
2011-07-06 10:45:56,162 DEBUG imagefactory.builders.BaseBuilder.FedoraBuilder pid(6936) Message: Completed placeholder warehouse object for linux non-upload image...


Provider Image: 05138ae8-2ea6-4e24-a5b8-15b7980e2fdf
Image: fc9e35ea-7d39-4eec-a907-ea66daecfc18
Build: dc612d3a-a1ac-4877-b910-921f60bcdb70
Status: PUSHING
Percent Complete: 0
[root@hp-z400-01 ~]# 


k.. even push starts out ok..
closing this bug..



2011-07-06 10:48:10,591 DEBUG imagefactory.qmfagent.ImageFactoryAgent.ImageFactoryAgent pid(6936) Message: Method called: name = push_image 
 args = {'credentials': '<provider_accounts>\n<provider_account>\n<name>wes-us-east-1</name>\n<provider>ec2-us-east-1</provider>\n<provider_type>ec2</provider_type>\n<provider_credentials>\n  <ec2_credentials>\n    <access_key>AKIAJ557U7P7OIHRV2EQ</access_key>\n    <account_number>6735-0069-5950</account_number>\n    <certificate>-----BEGIN CERTIFICATE-----\nMIICeDCCAeGgAwIBAgIGAIMhOJTUMA0GCSqGSIb3DQEBBQUAMFMxCzAJBgNVBAYT\nAlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMQwwCgYDVQQLEwNBV1MxITAfBgNVBAMT\nGEFXUyBMaW1pdGVkLUFzc3VyYW5jZSBDQTAeFw0xMDA0MTkxNDU2MDRaFw0xMTA0\nMTkxNDU2MDRaMFMxCzAJBgNVBAYTAlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMRcw\nFQYDVQQLEw5BV1MtRGV2ZWxvcGVyczEWMBQGA1UEAxMNMTNxb2pvMnhpa3AxMzCB\nnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAhsjKFoUJvEiZLdqALUAyFdDoeBKt\nZcqCRa5459+zp/d4XcykugpLlvcEfuKOrQcmqA08JWEN/4Xj4nIz+HoEtui3KFgg\n2YJ/VImlVeaSn4AGjfLsrEjLHnEBSGgNAJsh53fuEQTga8Y00T2qQ7d/Ebh6OXI3\niRKjY5Bm0d5mqrsCAwEAAaNXMFUwDgYDVR0PAQH/BAQDAgWgMBYGA1UdJQEB/wQM\nMAoGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFDML4N2PsXn7nurg\n5bXHxMkFVQbLMA0GCSqGSIb3DQEBBQUAA4GBAIUGLc0R3HnEDXlXQMiLfQygqXEv\ndouihRgqCO+LOWb3tJbpk49TkhSFcjO0TJnKMb+XzuAdfswwgXSmw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-----\n</key>\n    <secret_access_key>7COhvBzxrz2agtOPgk3bZM7W3ej9QI/j6WvYiHdg</secret_access_key>\n  </ec2_credentials>\n</provider_credentials>\n</provider_account>\n<provider_account>\n<name>wes-us-west-1</name>\n<provider>ec2-us-west-1</provider>\n<provider_type>ec2</provider_type>\n<provider_credentials>\n  <ec2_credentials>\n    <access_key>AKIAJ557U7P7OIHRV2EQ</access_key>\n    <account_number>6735-0069-5950</account_number>\n    <certificate>-----BEGIN CERTIFICATE-----\nMIICeDCCAeGgAwIBAgIGAIMhOJTUMA0GCSqGSIb3DQEBBQUAMFMxCzAJBgNVBAYT\nAlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMQwwCgYDVQQLEwNBV1MxITAfBgNVBAMT\nGEFXUyBMaW1pdGVkLUFzc3VyYW5jZSBDQTAeFw0xMDA0MTkxNDU2MDRaFw0xMTA0\nMTkxNDU2MDRaMFMxCzAJBgNVBAYTAlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMRcw\nFQYDVQQLEw5BV1MtRGV2ZWxvcGVyczEWMBQGA1UEAxMNMTNxb2pvMnhpa3AxMzCB\nnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAhsjKFoUJvEiZLdqALUAyFdDoeBKt\nZcqCRa5459+zp/d4XcykugpLlvcEfuKOrQcmqA08JWEN/4Xj4nIz+HoEtui3KFgg\n2YJ/VImlVeaSn4AGjfLsrEjLHnEBSGgNAJsh53fuEQTga8Y00T2qQ7d/Ebh6OXI3\niRKjY5Bm0d5mqrsCAwEAAaNXMFUwDgYDVR0PAQH/BAQDAgWgMBYGA1UdJQEB/wQM\nMAoGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFDML4N2PsXn7nurg\n5bXHxMkFVQbLMA0GCSqGSIb3DQEBBQUAA4GBAIUGLc0R3HnEDXlXQMiLfQygqXEv\ndouihRgqCO+LOWb3tJbpk49TkhSFcjO0TJnKMb+XzuAdfswwgXSmwbbvrcDT/OdD\njHbCrLTCBBXIgShKZTrTYOAII5sokU4wg5QS0w9cEWcxceUWRaP8ELdai+ubrlif\noCeB2dgQxL18+uK5\n-----END CERTIFICATE-----\n</certificate>\n    <key>-----BEGIN PRIVATE KEY-----\nMIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIbIyhaFCbxImS3agC1AMhXQ6HgS&#xD;\nrWXKgkWueOffs6f3eF3MpLoKS5b3BH7ijq0HJqgNPCVhDf+F4+JyM/h6BLbotyhYINmCf1SJpVXm&#xD;\nkp+ABo3y7KxIyx5xAUhoDQCbIed37hEE4GvGNNE9qkO3fxG4ejlyN4kSo2OQZtHeZqq7AgMBAAEC&#xD;\ngYByI9mXZoRPET++5/mB2IpRlT84Z8C1od/eOJkk63kNtfEVpfadoZhPuNHyzdM7TgH7cHHNybn7&#xD;\n+Jt6KXI/ar1QDIse7S+xU700AWJVaUt3FqlrglmGT018oGWqH1/3D9/4yVsdvxCKcKYuvre3j2gU&#xD;\nsi7uJPpWYqCLhs41EuIUiQJBAPcuRXEtVV5MJipuYljERZHfxT4Yh/b8agfr1dsrHvd4jly9rJnE&#xD;\nIwB3vn0mMS9Fs/f0rUc3RAZRSrsuwYravU8CQQCLl+YDqZOwVfZIkJO2ipWb1xgjVuikLDRTYAXr&#xD;\n0NqbDdeBozAdPNVvicrGpg61J0Un6r5zjnkMFfS6SpM4bFjVAkAuwbz3DLlCTitGCX1nBzGVx3t7&#xD;\nJI7LpLG17+GTRNPlwhND7ckxiQ2J8BzDda8GHyxM8ia4+vZOL6BwSgboajo3AkAsiTjkYDzzXGmn&#xD;\n+yB1c7+JqdVUqQyuHEBRfWhGNSsZnw/rl1HpchgybsbYG/DDURUaSCWdHo52EaczrElODhtFAkAU&#xD;\n95df+umPXSwSzFaSCVVaGm7QlH8yBx8nFHF+yeFPV5QmDWmj59Y9UM6vM4MHtUAdpEhIzzAoI/Et&#xD;\nlMA4EBbB&#xD;\n-----END PRIVATE KEY-----\n</key>\n    <secret_access_key>7COhvBzxrz2agtOPgk3bZM7W3ej9QI/j6WvYiHdg</secret_access_key>\n  </ec2_credentials>\n</provider_credentials>\n</provider_account>\n</provider_accounts>\n', 'image': 'fc9e35ea-7d39-4eec-a907-ea66daecfc18', 'build': '', 'providers': ['ec2-us-east-1']} 
 handle = <cqmf2.AgentEvent; proxy of <Swig Object of type 'qmf::AgentEvent *' at 0x2fc0570> > 
 addr = redhat.com:imagefactory:b1082d0d-8238-47f0-a2d0-de555acc08ac:image_factory 
 subtypes = {} 
 userId = anonymous
2011-07-06 10:48:10,592 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(6936) Message: Getting metadata (['latest_unpushed']) from http://localhost:9090/images/fc9e35ea-7d39-4eec-a907-ea66daecfc18
2011-07-06 10:48:10,593 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(6936) Message: Querying (http://localhost:9090/target_images/_query) with expression ($build == "dc612d3a-a1ac-4877-b910-921f60bcdb70" && $target == "ec2")

Comment 5 wes hayutin 2011-07-11 00:32:48 UTC
removing from tracker

Comment 6 wes hayutin 2011-12-08 14:08:29 UTC
perm close


Note You need to log in before you can comment on or make changes to this bug.