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

Bug 570975

Summary: "Page Request Error" and traceback email when attempting to go to probe from Probe Suite page
Product: Red Hat Satellite 5 Reporter: Xixi <xdmoon>
Component: WebUIAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact:
Priority: urgent    
Version: 530CC: cperry, psklenar, tao, xdmoon
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-22 14:04:02 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:
Bug Depends On:    
Bug Blocks: 518256    

Description Xixi 2010-03-06 02:21:24 UTC
Description of problem:
Customer reports that when he clicks in "Monitoring > Probe Suites > *ProbeSuiteName* > Probes > *ProbeName*", he gets a "Page Request Error" 

The link is https://rhn.example.org/rhn/monitoring/config/ProbeSuiteProbeEdit.do?suite_id=&probe_id=50
(note the empty suite_id parameter)

Editing a probe via "Systems > *SystemName* > Monitoring > *ProbeName*->edit suite probe" works.
The url for this request is
https://rhn.example.org/rhn/monitoring/config/ProbeSuiteProbeEdit.do?suite_id=1&probe_id=50
(note suite_id=1)

It appears like the empty suite_id causes those problems.

Version-Release number of selected component (if applicable):
Red Hat Network (RHN) Satellite 5.3.0

How reproducible:
Always.

Steps to Reproduce:
1. Have a satellite with monitoring enabled and at least one system profile with monitoring entitlements.
2. Go to Monitoring -> Probe Suites and create a probe suite if there isn't one already. 
3. Create a probe for this probe suite.
4. Go back to Monitoring -> Probe Suites, try selecting the probe created in step 3.

Actual results:
"Page Request Error" as this page does not exist.  Note the missing value for probe_id in the url. Manually putting in the probe id in the url works.

Traceback email is generated with following stacktrace -
...
Exception:
com.redhat.rhn.frontend.action.common.BadParameterException: The parameter suite_id is required.
	at com.redhat.rhn.frontend.action.common.BadParameterException.<init>(BadParameterException.java:40)
	at com.redhat.rhn.frontend.struts.RequestContext.getRequiredParam(RequestContext.java:444)
	at com.redhat.rhn.frontend.struts.RequestContext.lookupProbeSuite(RequestContext.java:202)
	at com.redhat.rhn.frontend.action.monitoring.ProbeSuiteProbeEditAction.addAttributes(ProbeSuiteProbeEditAction.java:34)
	at com.redhat.rhn.frontend.action.systems.monitoring.BaseProbeEditAction.execute(BaseProbeEditAction.java:70)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
...

Expected results:
No error, successfully go to Probe details page. Basically fix the link on the Probe Suite page so url to each probe has the right probe_id parameter value.

Additional info:

Comment 1 Xixi 2010-03-06 02:27:16 UTC
This appears to be a regression from Satellite 5.2 to Satellite 5.3 - on the former the links are correct.

From the code:

Satellite 5.2:

rhn-java-sat-svn-r188466/code/src/com/redhat/rhn/frontend/action/monitoring/ProbeSuiteListProbesSetupAction.java
...
    protected void processRequestAttributes(RequestContext rctx) {
        super.processRequestAttributes(rctx);
        ProbeSuite suite = rctx.lookupProbeSuite();
        rctx.getRequest().setAttribute("probeSuite", suite);
    }
...

rhn-java-sat-svn-r188466/code/webapp/WEB-INF/pages/admin/monitoring/config/probes.jsp
...
                <rhn:column header="probes.jsp.probe_description">
                        <A
                                HREF="ProbeSuiteProbeEdit.do?suite_id=${probeSuite.id}&probe_id=${current.id}">${current.description}</A>
                </rhn:column>
...

Satellite 5.3:

spacewalk-java-0.5.44/code/src/com/redhat/rhn/frontend/action/monitoring/ProbeSuiteListProbesSetupAction.java
...
       request.setAttribute("suite_id", suite.getId());
...

spacewalk-java-0.5.44/code/webapp/WEB-INF/pages/admin/monitoring/config/probes.jsp
...
                <rl:column sortable="true"
                           bound="false"
                           headerkey="probes.jsp.probe_description"
                           sortattr="description"
                           defaultsort="asc"
                           filterattr="description">
                    <a href="ProbeSuiteProbeEdit.do?suite_id=${probeSuite.id}&probe_id=${current.id}">
                                        <c:out value="${current.description}"/>
                    </a>

                </rl:column>
...

So it might be that 5.3 java code no longer sets the probeSuite parameter (suite_id instead) which the jsp page still expects.

Comment 2 Justin Sherrill 2010-03-08 20:55:29 UTC
I think this was fixed by this commit:

6bd3fd22e585bd75b3763a26e3897833ba4c631d

Comment 4 Petr Sklenar 2010-06-03 11:51:15 UTC
Test procedure:

1. Have a satellite with monitoring enabled and at least one system profile
with monitoring entitlements.
2. Go to Monitoring -> Probe Suites and create a probe suite if there isn't one
already. 
3. Create a probe for this probe suite.
4. Go back to Monitoring -> Probe Suites, try selecting the probe created in
step 3.

OLD: page Request Error
url missing number at 'suite_id=' parameter : https://<FQDN_OF_SATELLITE>/rhn/monitoring/config/ProbeSuiteProbeEdit.do?suite_id=&probe_id=227

NEW
probe is shown
url contains 'suite_id=__NUMBER___' : https://<FQDN_OF_SATELLITE>/rhn/monitoring/config/ProbeSuiteProbeEdit.do?suite_id=1&probe_id=4

tested with:
sat530+,rhel5,x8664 and 
cobbler-1.6.6-8.el5sat.x86_64
spacewalk-java-0.5.44-77.el5sat.noarch
spacewalk-base-0.5.23-35.el5sat.noarch
--
Verified

Comment 6 errata-xmlrpc 2010-06-22 14:04:02 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/RHBA-2010-0498.html