Bug 916081 - rest api return a bad format xml.
Summary: rest api return a bad format xml.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-27 08:56 UTC by yangmingzhi
Modified: 2015-05-15 00:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:26:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
xml output of step 4 (6.66 KB, text/xml)
2013-03-11 13:58 UTC, chris alfonso
no flags Details

Description yangmingzhi 2013-02-27 08:56:26 UTC
Description of problem:
When using rest api to get status messages for the mysql/postgresql cartridge,
it return a xml format output but with a syntax error.

Version-Release number of selected component (if applicable):
Puddle 1.1.z/2013-02-26.1

How reproducible:
always

Steps to Reproduce:
1. create a scalable app
   rhc app create -a appname -t php-5.3 -s -p <password>
2. scale up the app
   curl -k -H "Accept: application/xml" --user <username>:<password> https://<broker-address/broker/rest/domains/<domain-name>/applications/<appname>/events -X POST -d event=scale-up
3. add a cartridge to the app such as mysql/postgresql
   rhc cartridge add mysql-5.1 -a <appname>
4. Use rest api to get status messages of the cartridge.
   curl -3 -k -H "Accept: application/xml" --user <username>:<password> https://<broker-address>/broker/rest/domains/<domain-name>/applications/<app-name>/cartridges/mysql-5.1?include=status_messages

  
Actual results:
<Building with MySQL>http://docs.redhat.com/docs/en-US/OpenShift/2.0/html/User_Guide/sect-User_Guide-Working_With_Database_Cartridges.html</Building with MySQL>

When you redirect the output of step 4 into myoutput.xml,and then open it in browser,you will get an <<XML Parsing Error: not well-formed>> error.

Expected results:
<Building-with-MySQL>http://docs.redhat.com/docs/en-US/OpenShift/2.0/html/User_Guide/sect-User_Guide-Working_With_Database_Cartridges.html</Building-with-MySQL>


Additional info:
The "Building-with-MySQL" line lost a '-' between words.
And not only the mysql cartridge is so,but also the postgresql,php(and more) cartridges.

When you run the following command to get codes from the github:
  git clone git:openshift/enterprise-server.git -b enterprise-1.1
and then run:
  grep -A 2 -i -R --color "Help-Topics" enterprise-server/cartridges/
you will find many helps with their content has no '-' between words,and this will be printed when you run the rest api in step 4 of reproduce.

It is caused by the item "Help-Topics" in the manifest.yml. Each of cartridge has this issue.

Comment 2 xjia 2013-02-27 10:54:03 UTC
Actually, It is caused by the item "Help-Topics" in the manifest.yml. Each of cartridge has this issue.

Comment 3 Brenton Leanhardt 2013-03-07 21:52:56 UTC
We'll fix this upstream.

Comment 4 chris alfonso 2013-03-11 13:58:04 UTC
Created attachment 708390 [details]
xml output of step 4

Comment 6 Lili Nader 2013-10-01 05:07:53 UTC
This has been fixed

<help-topics>
   <Building-with-MySQL>http://docs.redhat.com/docs/en-US/OpenShift/2.0/html/User_Guide/sect-User_Guide-Working_With_Database_Cartridges.html</Building-with-MySQL>
   </help-topics>

Comment 7 Peter Ruan 2013-10-02 22:40:20 UTC
verified with devenv_3851


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