Hide Forgot
Description of problem: If you try to build an image from command line using imagefactory and xml template with wild char '&' in raw type will cause xml parse error. Version-Release number of selected component (if applicable): imagefactory-0.8.9-1.fc15.noarch oz-0.7.9-3.fc15.noarch How reproducible: Always Steps to Reproduce: 1. Create template with wild char '&' in raw type (or see attached example) 2. run #sudo imagefactory --debug --target rhevm --template /path/to/template.tdl Actual results: 2011-11-30 13:47:16,814 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17106) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images) 2011-11-30 13:47:16,815 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(17106) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images) Entity: line 18: parser error : xmlParseEntityRef: no name Aeolus Cloud Test page on Build Created for Mumbai & Westford Private RHE ^ Traceback (most recent call last): File "/usr/bin/imagefactory", line 224, in <module> sys.exit(Application().main()) File "/usr/bin/imagefactory", line 203, in main dispatchers = BuildDispatcher().build_image_for_targets(self.app_config['image'], None, self.app_config['template'], self.app_config['target']) File "/usr/lib/python2.7/site-packages/imgfac/BuildDispatcher.py", line 54, in build_image_for_targets image_id = self._ensure_image_with_template(image_id, template) File "/usr/lib/python2.7/site-packages/imgfac/BuildDispatcher.py", line 133, in _ensure_image_with_template name = self._xml_node(template.xml, '/template/name') File "/usr/lib/python2.7/site-packages/imgfac/BuildDispatcher.py", line 126, 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') libxml2.parserError: xmlParseDoc() failed Expected results: No xml parse error
adding ce-sprint-next bugs to ce-sprint
TDL is an XML document standard. A naked ampersand is not valid in XML. It must be escaped as: & See: http://www.xml.com/pub/a/2001/01/31/qanda.html Closing as NOTABUG