Bug 708036

Summary: "TOO MANY ARGUMENTS IN THE URL" error
Product: Red Hat Enterprise Linux 6 Reporter: Marek Grac <mgrac>
Component: piranhaAssignee: Ryan O'Hara <rohara>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 6.2CC: carlosinfantes, cluster-maint, djansa, edamato, jkortus
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: piranha-0.8.5-9.el6 Doc Type: Bug Fix
Doc Text:
Previously, the piranha-gui utility reported an HTTP 414 error (Request-URI Too Long) if too many virtual servers were defined. As a consequence, when trying to edit a virtual server, the error message "Too many arguments in the URL" appeared. With this update, the number of defined virtual servers does not affect the length of the URI. Now, error messages are no longer reported.
Story Points: ---
Clone Of: 677359 Environment:
Last Closed: 2011-12-06 17:57:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 677359    
Bug Blocks: 708035    
Attachments:
Description Flags
Replace HTTP GET with HTTP POST in virtual server UI. none

Description Marek Grac 2011-05-26 15:32:46 UTC
+++ This bug was initially created as a clone of Bug #677359 +++

Description of problem:
When I add more than 50 VIPS (aprox number), in the Virtual Servers tab in piranha-gui if I select any VIP, and I click "Edit", the response is "TOO MANY ARGUMENTS IN URL" and looking the URL that is trying to open its made with a combination of ALL the VIPs.

Version-Release number of selected component (if applicable):

Server version: Apache/2.2.3
Server built:   Apr  4 2010 17:18:37


How reproducible:
Add more than 50 VIPs in a machine running piranha, and the edit option for VIPs stops work.

Steps to Reproduce:
1. In a host running piranha add more than 50 VIPs
2. Try to edit a VIP
3. See the error in the screen
  
Actual results:
Too Many arguments in the URL

Expected results:
The edit options for the selected VIP

Additional info:

Changing some lines in the virtual_main.php file works again:


[root@lb1 secure]# diff virtual_main.php virtual_main.php.orig
5,6c5,6
< 	if (isset($_POST['selected_host'])) {
<         	$selected_host=$_POST['selected_host'];
---
> 	if (isset($_GET['selected_host'])) {
>         	$selected_host=$_GET['selected_host'];
8,9c8,9
< 	if (isset($_POST['virtual_service'])) {
< 		$virtual_service=$_POST['virtual_service'];
---
> 	if (isset($_GET['virtual_service'])) {
> 		$virtual_service=$_GET['virtual_service'];
97,98c97,98
< 	if (isset($_POST['virtual_service'])) {
< 		$virtual_service = $_POST['virtual_service'];
---
> 	if (isset($_GET['virtual_service'])) {
> 		$virtual_service = $_GET['virtual_service'];
133c133
< <FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" ACTION="virtual_main.php">
---
> <FORM METHOD="GET" ENCTYPE="application/x-www-form-urlencoded" ACTION="virtual_main.php">
[root@lb1 secure]#

--- Additional comment from mgrac on 2011-05-26 11:31:21 EDT ---

@Carlos:

Thanks for a patch, I will clone it to RHEL5 and RHEL6 where it can be fixed. RHEL4 is now in very late stage and only very important and security fixes can be included. Situation differs for newer versions where this kind of bugs should be surely fixed and yours patch provides a good solution.

Comment 5 Ryan O'Hara 2011-08-09 16:05:42 UTC
Created attachment 517440 [details]
Replace HTTP GET with HTTP POST in virtual server UI.

This is a formal patch identical to the one posted in comment #1.

Comment 6 Ryan O'Hara 2011-08-09 16:10:51 UTC
I've applied the patch and was able to add/edit/delete VIPs where I once hit the "Request-URI Too Large" error. On the same system that hit problems after 92 VIPs were defined, I applied the patch and was able to continue adding, editing, and deleting VIPs. I added 100 VIPs.

# egrep ^virtual lvs.cf | wc -l 
100

Comment 9 Eliska Slobodova 2011-10-25 09:50:50 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, the piranha-gui utility reported an HTTP 414 error (Request-URI Too Long) if too many virtual servers were defined. As a consequence, when trying to edit a virtual server, the error message "Too many arguments in the URL" appeared. With this update, the number of defined virtual servers does not affect the length of the URI. Now, error messages are no longer reported.

Comment 10 errata-xmlrpc 2011-12-06 17:57:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1716.html