Bug 471315 - Grid, Parse error on Hold a job reason entry.
Grid, Parse error on Hold a job reason entry.
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: cumin (Show other bugs)
All Linux
high Severity high
: 1.3
: ---
Assigned To: Ernie
Jan Sarenik
Depends On:
  Show dependency treegraph
Reported: 2008-11-12 17:28 EST by William Henry
Modified: 2010-10-14 12:06 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, a parse error could occur when the user entered a reason for holding a job in the form, because the character "'" was not supported. With this update, the character "'" is supported and the form is parsed without problems.
Story Points: ---
Clone Of:
Last Closed: 2010-10-14 12:06:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description William Henry 2008-11-12 17:28:24 EST
Description of problem:

A parse error can occur when entering a reason for holding a job. 

This does not happen all the time but when it happens it seems to be when you use an apostrophe and spaces or just an apostrophe.

The XML Parsing Error: not well-formed
Location: http://localhost:45672/index.html?frame=main.pool.jobshold;main.m=pool;main.tabs.sel=gtab;main.view.m=grd;main.view.msg.brokers.brokers.groups.param=1;main.pool.id=north-08.lab.bos.redhat.com%2Cnorth-15.lab.bos.redhat.com;main.pool.view.tabs.m=jobs;main.pool.view.tabs.jobs.jobtab.phase.param=i;main.pool.view.tabs.jobs.jobtab.job_search.param=Enter%20Job%20ID;main.pool.jobshold.id=25;main.pool.jobshold.id=34;main.pool.jobshold.id=35;main.pool.jobshold.reason=William%27s%20hold
Line Number 119, Column 513:	<div><input type='hidden' name='main.view.m' value='grd'/><input type='hidden' name='main.m' value='pool'/><input type='hidden' name='main.pool.view.tabs.m' value='jobs'/><input type='hidden' name='main.pool.id' value='north-08.lab.bos.redhat.com,north-15.lab.bos.redhat.com'/><input type='hidden' name='main.pool.view.tabs.jobs.jobtab.phase.param' value='i'/><input type='hidden' name='main.view.msg.brokers.brokers.groups.param' value='1'/><input type='hidden' name='main.pool.jobshold.reason' value='William's hold'/><input type='hidden' name='frame' value='main.pool.jobshold'/><input type='hidden' name='main.pool.jobshold.id' value='25'/><input type='hidden' name='main.pool.jobshold.id' value='34'/><input type='hidden' name='main.pool.jobshold.id' value='35'/><input type='hidden' name='main.tabs.sel' value='gtab'/></div>
------------------------------------------------------lots of lines -> that way

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Justin Ross 2010-09-08 07:51:04 EDT
I believe this is fixed.  Ernie, please verify.
Comment 2 Ernie 2010-09-09 10:19:13 EDT
I don't believe this can happen any more.

The problem appears to have happened when there was an error submitting the form and the form was redrawn to show the error message. In this case, the reason text that was previously entered would show up in the edit box. If that text had an apostrophe in it, the xml would be mal-formed.

This shouldn't happen because:
1. The only error that will redraw the form now is when the reason field is empty.
2. When we output the previously entered value in a text field, we are escaping it.

When researching this, I noticed that the reason field wasn't required. It should have been so I made it required.
Comment 4 Jan Sarenik 2010-09-14 05:23:52 EDT
In cumin-0.1.4279-1.el5 after submitting a job and putting
it on hold using Cumin and reason "jasan's reason" (including
the single quote) I am getting following:

In yellow feedback box:
  Hold: Failed (super() argument 1 must be type, not classobj)

On terminal wher I run cumin service:
EXCEPTION in Broker._v2Cb: super() argument 1 must be type, not classobj
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/qmf/console.py", line 2592, in _v2Dispatch
  File "/usr/lib/python2.4/site-packages/qmf/console.py", line 2645, in _v2DispatchProtected
    agent._handleQmfV2Message(opcode, mp, ah, content)
  File "/usr/lib/python2.4/site-packages/qmf/console.py", line 3289, in _handleQmfV2Message
    elif opcode == '_exception':       self._v2HandleException(mp, ah, content)
  File "/usr/lib/python2.4/site-packages/qmf/console.py", line 3188, in _v2HandleException
    self.session.console.methodResponse(self.broker, seq, result)
  File "/usr/share/cumin/python/cumin/session.py", line 158, in methodResponse
    callback(response.text, response.outArgs)
  File "/usr/share/cumin/python/cumin/model.py", line 1579, in completion
    self.error = QmfException(str(status))
  File "/usr/share/cumin/python/cumin/model.py", line 1557, in __init__
    super(QmfException, self).__init__(value)
TypeError: super() argument 1 must be type, not classobj
Comment 5 Ernie 2010-09-14 09:18:57 EDT
That's a different and new bug. Fixed in cumin 4282.
Comment 6 Jan Sarenik 2010-09-17 08:54:17 EDT
Verified in cumin-0.1.4297-1.el5
Comment 7 Florian Nadge 2010-10-07 05:02:29 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    New Contents:
Previously, a parse error could occur when the user entered a reason for holding a job in the form, because the character "'" was not supported.  With this update, the character "'" is supported and the form is parsed without problems.
Comment 9 errata-xmlrpc 2010-10-14 12:06:39 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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