import RHEL 6.1 us-east-1 ami ami-31d41658 0. configure ec2, us-east-1 1. import works.. 2. moves to a images window.. 3. push to us-east-1 500 error 2011-12-07 14:36:38,506 DEBUG paste.httpserver.ThreadPool pid(48161) Message: Added task (0 tasks queued) 2011-12-07 14:36:58,485 DEBUG paste.httpserver.ThreadPool pid(48161) Message: Added task (0 tasks queued) 2011-12-07 14:36:58,531 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(48161) Message: Querying (http://localhost:9090/target_images/_query) with expression ($build == "e273a7ca-95d9-41dc-81f0-b90bd80105c2" && $target == "ec2") 2011-12-07 14:36:58,573 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(48161) Message: Getting metadata (['template']) from http://localhost:9090/target_images/6a9883e0-a195-455c-9414-7a7150ed9bb8 2011-12-07 14:36:58,575 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(48161) Message: Image Warehouse returned status (404) with message: 2011-12-07 14:36:58,575 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(48161) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images) 2011-12-07 14:36:58,575 ERROR imgfac.rest.imagefactory pid(48161) Message: 'template' must be a UUID, URL, XML string or XML document path... Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 191, in push_image job = BuildDispatcher().push_image_to_providers(image_id, build_id, (provider, ), credentials)[0] File "/usr/lib/python2.6/site-packages/imgfac/BuildDispatcher.py", line 83, in push_image_to_providers job = job_cls(template, target, image_id, build_id, *args, **kwargs) File "/usr/lib/python2.6/site-packages/imgfac/BuildJob.py", line 49, in __init__ self.template = template if isinstance(template, Template) else Template(template) File "/usr/lib/python2.6/site-packages/imgfac/Template.py", line 79, in __init__ raise ValueError("'template' must be a UUID, URL, XML string or XML document path...") ValueError: 'template' must be a UUID, URL, XML string or XML document path... 2011-12-07 14:36:58,577 ERROR imgfac.rest.imagefactory pid(48161) Message: HTTP Response 500 Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 212, in create_provider_image return push_image(image_id, build_id, target_image_id) File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 60, in decorated_function return f(*args, **kwargs) File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 202, in push_image raise HTTPResponse(status=500, output=e) HTTPResponse: HTTP Response 500
FWIW, this appears to be the case whether you import with Conductor or with aeolus-cli. It appears that it's choking on the lack of a template: 2011-12-07 14:36:58,573 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(48161) Message: Getting metadata (['template']) from http://localhost:9090/target_images/6a9883e0-a195-455c-9414-7a7150ed9bb8 2011-12-07 14:36:58,575 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(48161) Message: Image Warehouse returned status (404) with message:
You're not supposed to be able to push an imported image, since an 'imported image' is just a reference to an image already living in the cloud. We don't have metadata sufficient to build another copy. However, we shouldn't prompt you in Conductor to build it. I think the real bug here is that we're not doing anything to detect if the image was imported and prevent you from building it.
Looking into this more, it looks like creating an Image in Factory is causing an empty Template ("<template></template>") to appear in iwhd and become associated with the Image. This prevents us from simply defining an "imported?" method that checks whether a template UUID is present or not.
(In reply to comment #2) > You're not supposed to be able to push an imported image, since an 'imported > image' is just a reference to an image already living in the cloud. We don't > have metadata sufficient to build another copy. > > However, we shouldn't prompt you in Conductor to build it. I think the real bug > here is that we're not doing anything to detect if the image was imported and > prevent you from building it. yup.. Matt you are right.. I went through this too quickly opened https://bugzilla.redhat.com/show_bug.cgi?id=766137