Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C49F102C6 for ; Sat, 6 Apr 2013 17:24:08 +0000 (UTC) Received: (qmail 53530 invoked by uid 500); 6 Apr 2013 17:24:07 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 53318 invoked by uid 500); 6 Apr 2013 17:24:07 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 53306 invoked by uid 500); 6 Apr 2013 17:24:07 -0000 Delivered-To: apmail-incubator-cloudstack-dev@incubator.apache.org Received: (qmail 53295 invoked by uid 99); 6 Apr 2013 17:24:07 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Apr 2013 17:24:07 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B81971C10E7; Sat, 6 Apr 2013 17:24:04 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0221920639649375796==" MIME-Version: 1.0 Subject: Re: Review Request: Remove 2k limitation for user data on a deployVMCmd issued as an HTTP POST request From: "Rohit Yadav" To: "Chip Childers" , "Min Chen" , "Kelven Yang" , "Hugo Trippaers" Cc: "Venkata Siva Vijayendra Bhamidipati" , "Rohit Yadav" , "cloudstack" Date: Sat, 06 Apr 2013 17:24:04 -0000 Message-ID: <20130406172404.6149.5688@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Rohit Yadav" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/10294/ X-Sender: "Rohit Yadav" References: <20130405174600.23853.55464@reviews.apache.org> In-Reply-To: <20130405174600.23853.55464@reviews.apache.org> Reply-To: "Rohit Yadav" --===============0221920639649375796== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On April 5, 2013, 5:46 p.m., Rohit Yadav wrote: > > As long as we have query based API, the overall base64 encoded payload = in the url cannot exceed this limit as per a RFC (I recall discussing this = issue on ML when I applied this feature from previous ports). > > If we handle POST request method on the ApiServlet class and accept use= rdate from POST request, this would work. Cheers. > = > Venkata Siva Vijayendra Bhamidipati wrote: > Yes, the POST will be handled by ApiServlet's doPost() only, and the = userdata will need to be put into the POST body. I've put in a check to all= ow the 2k limit to be exceeded only for userdata that comes in via a post r= equest in the deployVMcmd codepath. I think the length limit that a POST bo= dy can reach is specified in the webserver configuration and independent of= CS as such, unless that limit is configured too low - in that case I'm ass= uming the webserver wouldn't even pass on the request to reach the ApiServl= et in CS - is that the case? No, it would the trick is to first understand how we parse and create apina= me and args from the GET query and I would prefer that we don't look for on= ly userdata in POST request, but create a map of apicmd and list of args fr= om the POST request generically so not just userdata any API can be called = or becomes POST-able HTTP request. Summary: Make every API POST-able, that = way any param could be sent via a POST request. Cheers. - Rohit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/10294/#review18713 ----------------------------------------------------------- On April 5, 2013, 10:22 p.m., Venkata Siva Vijayendra Bhamidipati wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/10294/ > ----------------------------------------------------------- > = > (Updated April 5, 2013, 10:22 p.m.) > = > = > Review request for cloudstack, Chip Childers, Hugo Trippaers, Kelven Yang= , and Min Chen. > = > = > Description > ------- > = > Please refer to https://cwiki.apache.org/confluence/display/CLOUDSTACK/De= ployVirtualMachine+userdata+enhancements for a background on the requiremen= ts driving this patch. > = > This patch hasn't been extensively tested yet, and I will update this req= uest with more info. I am uploading a first diff for initial review/comment= s. > = > = > This addresses bug CLOUDSTACK-1086. > = > = > Diffs > ----- > = > api/src/com/cloud/vm/UserVmService.java 2c33d41 = > api/src/org/apache/cloudstack/api/BaseCmd.java 78a2af3 = > api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java 21a4= 5f8 = > core/src/com/cloud/vm/UserVmVO.java a16eaf9 = > server/src/com/cloud/api/ApiDispatcher.java 925d90a = > server/src/com/cloud/api/ApiServer.java d842819 = > server/src/com/cloud/api/ApiServerService.java 12d8b52 = > server/src/com/cloud/api/ApiServlet.java 03bfb5f = > server/src/com/cloud/vm/UserVmManagerImpl.java 24bce8b = > server/test/com/cloud/vm/MockUserVmManagerImpl.java dd8dd83 = > setup/db/db/schema-410to420.sql ab9df05 = > = > Diff: https://reviews.apache.org/r/10294/diff/ > = > = > Testing > ------- > = > = > Thanks, > = > Venkata Siva Vijayendra Bhamidipati > = > --===============0221920639649375796==--