| Summary: | 500 error trying to push rhevm images on a RHEL aeolus install | ||
|---|---|---|---|
| Product: | [Retired] CloudForms Cloud Engine | Reporter: | wes hayutin <whayutin> |
| Component: | imagefactory | Assignee: | Steve Loranz <sloranz> |
| Status: | CLOSED ERRATA | QA Contact: | wes hayutin <whayutin> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.0.0 | CC: | akarol, cpelland, dajohnso, deltacloud-maint, dgao, hbrock, jrd, nobody, ssachdev |
| 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:22 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
may be related to https://bugzilla.redhat.com/show_bug.cgi?id=749254 This section of the log suggests that imagefactory is getting nothing back from iwhd when querying for a target_image with the given build id and target.
in _target_image_for_build_and_target
results = self.warehouse.query("target_image", "$build == \"%s\" && $target
== \"%s\"" % (build_id, target))
File "/usr/lib/python2.6/site-packages/imgfac/ImageWarehouse.py", line 134,
in query
return map(lambda n: n.content,
libxml2.parseDoc(xml).xpathEval("/objects/object/key"))
File "/usr/lib64/python2.6/site-packages/libxml2.py", line 1263, in parseDoc
if ret is None:raise parserError('xmlParseDoc() failed')
parserError: xmlParseDoc() failed
The status that imagefactory returns should probably be a 404 with a message "A target_image was not found for build_id (build_id) and target (target) in the image warehouse."
I've added some more detail to the exception and resulting http response. The branch covering this bug is: https://github.com/aeolusproject/imagefactory/tree/bug/bz749709 The specific commit is: https://github.com/aeolusproject/imagefactory/commit/6501e673afd952db7f61fbf89dd3d15aa62894bf http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/job/nightly-cloudEngine-smokeTest-RHEL/39/console verified... pushing working across providers after several configures and cleanup etc..etc.. [root@qeblade30 ~]# rpm -qa |grep aeolus aeolus-configure-2.2.0-1.20111028150641git1189dd7.el6.noarch rubygem-rack-mount-0.7.1-3.aeolus.el6.noarch rubygem-ZenTest-4.3.3-2.aeolus.el6.noarch aeolus-conductor-0.5.0-0.20111028214047git58c6e71.el6.noarch rubygem-arel-2.0.10-0.aeolus.el6.noarch aeolus-conductor-doc-0.5.0-0.20111028214047git58c6e71.el6.noarch aeolus-all-0.5.0-0.20111028214047git58c6e71.el6.noarch rubygem-aeolus-cli-0.1.0-3.20111028152758git7063136.el6.noarch rubygem-aeolus-image-0.1.0-4.20111024205454git6b2b696.el6.noarch aeolus-conductor-daemons-0.5.0-0.20111028214047git58c6e71.el6.noarch 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 |
Description of problem: This is NOT a HIGH priority bug, but its an easy fix. Either we field check provider account names, or escape the special chars I believe --account rhevm_admin@internal is causing the issue 201110272116:48.111 - FINE: Stdout: Image: 026cdea0-fd7b-4332-8cd6-5f967e75dc81 Build: 7fd21e8a-dc36-4297-a5da-9cd96540b65b Target Image: d3bea04f-8022-4fc1-b36a-383c26b068dd :Status BUILDING (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait) [root@qeblade30 ~]# aeolus-image push --provider rhevm --account rhevm_admin@internal --image 026cdea0-fd7b-4332-8cd6-5f967e75dc81 --build 7fd21e8a-dc36-4297-a5da-9cd96540b65b --targetimage d3bea04f-8022-4fc1-b36a-383c26b068dd Unable to perform task: - Internal Error: Failed. Response code = 500. Response message = Internal Server Error. _admin@internal</name>\n <provider>rhevm</provider>\n <provider_type>rhevm</provider_type>\n <provider_credentials>\n <rhevm_credentials>\n <password>dog8code</password>\n <username>admin@internal</username>\n </rhevm_credentials>\n </provider_credentials>\n</provider_account>', u'target_image_id': u'd3bea04f-8022-4fc1-b36a-383c26b068dd'} 2011-10-27 21:25:29,299 DEBUG imgfac.rest.imagefactory pid(10313) Message: Starting 'push' process... 2011-10-27 21:25:29,299 INFO imgfac.rest.imagefactory pid(10313) Message: Request recieved with Content-Type (application/json) 2011-10-27 21:25:29,299 DEBUG imgfac.rest.imagefactory pid(10313) Message: returning {u'build_id': u'7fd21e8a-dc36-4297-a5da-9cd96540b65b', u'image_id': u'026cdea0-fd7b-4332-8cd6-5f967e75dc81', u'provider': u'rhevm', u'credentials': u'<provider_account>\n <name>rhevm_admin@internal</name>\n <provider>rhevm</provider>\n <provider_type>rhevm</provider_type>\n <provider_credentials>\n <rhevm_credentials>\n <password>dog8code</password>\n <username>admin@internal</username>\n </rhevm_credentials>\n </provider_credentials>\n</provider_account>', u'target_image_id': u'd3bea04f-8022-4fc1-b36a-383c26b068dd'} 2011-10-27 21:25:29,300 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(10313) Message: Querying (http://localhost:9090/target_images/_query) with expression ($build == "7fd21e8a-dc36-4297-a5da-9cd96540b65b" && $target == "rhevm") 2011-10-27 21:25:29,302 ERROR imgfac.rest.imagefactory pid(10313) Message: xmlParseDoc() failed Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 192, 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 79, in push_image_to_providers target_image_id = self._target_image_for_build_and_target(build_id, target) File "/usr/lib/python2.6/site-packages/imgfac/BuildDispatcher.py", line 206, in _target_image_for_build_and_target results = self.warehouse.query("target_image", "$build == \"%s\" && $target == \"%s\"" % (build_id, target)) File "/usr/lib/python2.6/site-packages/imgfac/ImageWarehouse.py", line 134, in query return map(lambda n: n.content, libxml2.parseDoc(xml).xpathEval("/objects/object/key")) File "/usr/lib64/python2.6/site-packages/libxml2.py", line 1263, in parseDoc if ret is None:raise parserError('xmlParseDoc() failed') parserError: xmlParseDoc() failed 2011-10-27 21:25:29,302 ERROR imgfac.rest.imagefactory pid(10313) Message: HTTP Response 500 Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 213, 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 203, in push_image raise HTTPResponse(status=500, output=e) HTTPResponse: HTTP Response 500 2011-10-27 21:42:41,822 DEBUG paste.httpserver.ThreadPool pid(10313) Message: Added task (0 tasks queued) 2011-10-27 21:42:41,870 INFO imgfac.rest.imagefactory pid(10313) Message: Request recieved with Content-Type (application/json) 2011-10-27 21:42:41,871 DEBUG imgfac.rest.imagefactory pid(10313) Message: returning {u'build_id': u'7fd21e8a-dc36-4297-a5da-9cd96540b65b', u'image_id': u'026cdea0-fd7b-4332-8cd6-5f967e75dc81', u'provider': u'rhevm', u'credentials': u'<provider_account>\n <name>rhevm_admin@internal</name>\n <provider>rhevm</provider>\n <provider_type>rhevm</provider_type>\n <provider_credentials>\n <rhevm_credentials>\n <password>dog8code</password>\n <username>admin@internal</username>\n </rhevm_credentials>\n </provider_credentials>\n</provider_account>', u'target_image_id': u'd3bea04f-8022-4fc1-b36a-383c26b068dd'} 2011-10-27 21:42:41,872 DEBUG imgfac.rest.imagefactory pid(10313) Message: Starting 'push' process... 2011-10-27 21:42:41,872 INFO imgfac.rest.imagefactory pid(10313) Message: Request recieved with Content-Type (application/json) 2011-10-27 21:42:41,872 DEBUG imgfac.rest.imagefactory pid(10313) Message: returning {u'build_id': u'7fd21e8a-dc36-4297-a5da-9cd96540b65b', u'image_id': u'026cdea0-fd7b-4332-8cd6-5f967e75dc81', u'provider': u'rhevm', u'credentials': u'<provider_account>\n <name>rhevm_admin@internal</name>\n <provider>rhevm</provider>\n <provider_type>rhevm</provider_type>\n <provider_credentials>\n <rhevm_credentials>\n <password>dog8code</password>\n <username>admin@internal</username>\n </rhevm_credentials>\n </provider_credentials>\n</provider_account>', u'target_image_id': u'd3bea04f-8022-4fc1-b36a-383c26b068dd'} 2011-10-27 21:42:41,872 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(10313) Message: Querying (http://localhost:9090/target_images/_query) with expression ($build == "7fd21e8a-dc36-4297-a5da-9cd96540b65b" && $target == "rhevm") 2011-10-27 21:42:41,874 ERROR imgfac.rest.imagefactory pid(10313) Message: xmlParseDoc() failed Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 192, 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 79, in push_image_to_providers target_image_id = self._target_image_for_build_and_target(build_id, target) File "/usr/lib/python2.6/site-packages/imgfac/BuildDispatcher.py", line 206, in _target_image_for_build_and_target results = self.warehouse.query("target_image", "$build == \"%s\" && $target == \"%s\"" % (build_id, target)) File "/usr/lib/python2.6/site-packages/imgfac/ImageWarehouse.py", line 134, in query return map(lambda n: n.content, libxml2.parseDoc(xml).xpathEval("/objects/object/key")) File "/usr/lib64/python2.6/site-packages/libxml2.py", line 1263, in parseDoc if ret is None:raise parserError('xmlParseDoc() failed') parserError: xmlParseDoc() failed 2011-10-27 21:42:41,874 ERROR imgfac.rest.imagefactory pid(10313) Message: HTTP Response 500 Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 213, 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 203, in push_image raise HTTPResponse(status=500, output=e) HTTPResponse: HTTP Response 500 [root@qeblade30 ~]#