Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 471315

Summary: Grid, Parse error on Hold a job reason entry.
Product: Red Hat Enterprise MRG Reporter: William Henry <whenry>
Component: cuminAssignee: Ernie <eallen>
Status: CLOSED ERRATA QA Contact: Jan Sarenik <jsarenik>
Severity: high Docs Contact:
Priority: high    
Version: 1.1CC: cctrieloff, fnadge, jross, jsarenik
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: Environment:
Last Closed: 2010-10-14 16:06:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description William Henry 2008-11-12 22:28:24 UTC
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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Justin Ross 2010-09-08 11:51:04 UTC
I believe this is fixed.  Ernie, please verify.

Comment 2 Ernie 2010-09-09 14:19:13 UTC
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 09:23:52 UTC
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
    self._v2DispatchProtected(msg)
  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 13:18:57 UTC
That's a different and new bug. Fixed in cumin 4282.

Comment 6 Jan Sarenik 2010-09-17 12:54:17 UTC
Verified in cumin-0.1.4297-1.el5

Comment 7 Florian Nadge 2010-10-07 09:02:29 UTC
    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 16:06:39 UTC
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.

http://rhn.redhat.com/errata/RHSA-2010-0773.html