You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Hari Kannan <ha...@citrix.com> on 2013/01/30 04:40:15 UTC

[DISCUSS] DeployVirtualMachine userdata enhancements

Hello All,

I wish to propose increasing the size of userdata to be passed along with DeployVirtualMachine API - I have added some info here https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtualMachine+userdata+enhancements
 along with a JIRA ticket https://issues.apache.org/jira/browse/CLOUDSTACK-1086


Please review and comment

Hari Kannan

Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Min Chen <mi...@citrix.com>.
+1 on your issue #2 below plus re-design CS entities (including response)
as well as their relationships. IMHO, with a clearly defined entity model
and relationship diagram is a pre-requisite to come up with a neat full
REST-style API.

Thanks
-min

On 1/30/13 11:03 AM, "Rohit Yadav" <bh...@apache.org> wrote:

>From wiki: "While CS does support the POST method also, we are not
>aware of any cloudstack clients using this."
>
>So, while GET and POST are both supported by the api servlet (because
>of the base class), POST won't work now as we funnel all requests to a
>single method that assumes GET and parses args based on ampersand
>separated url vars. It would need fixing, issue #0.
>
>Next, the way parsing is done it does not create multimap, so if
>multiple args are passed, it would take the last value which the http
>rfc mentions they should be collected as array for a key, i.e. a
>multimap, this is issue #1.
>
>Lastly, the fix would be largely on client, i.e. the UI and
>cloudmonkey for example to send POST for certain apis and GET. I'm not
>in favour of making a non-rest api server behave like a rest one, so
>atmost we should fix #0 and #1 and accept only GET and POST, GET for
>all read apis and POST for all the create, delete and update apis. I'm
>in favor of deprecated the current api server for say next 1-2 years
>and start working on a full REST-compliant JAX-RS powered api server,
>issue #3
>
>#0 - https://issues.apache.org/jira/browse/CLOUDSTACK-1091
>#1 - https://issues.apache.org/jira/browse/CLOUDSTACK-1092
>#2 - https://issues.apache.org/jira/browse/CLOUDSTACK-1093
>
>Assigned all of them to myself, feel to reassign.
>
>Regards.
>
>On Wed, Jan 30, 2013 at 10:48 AM, Chip Childers
><ch...@sungard.com> wrote:
>> On Wed, Jan 30, 2013 at 3:17 AM, Koushik Das <ko...@citrix.com>
>>wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Ram Ganesh [mailto:Ram.Ganesh@citrix.com]
>>>> Sent: Wednesday, January 30, 2013 1:06 PM
>>>> To: cloudstack-dev@incubator.apache.org
>>>> Subject: RE: [DISCUSS] DeployVirtualMachine userdata enhancements
>>>>
>>>> > -----Original Message-----
>>>> > From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On
>>>> Behalf
>>>> > Of Rohit Yadav
>>>> > Sent: 30 January 2013 10:30
>>>> > To: cloudstack-dev@incubator.apache.org
>>>> > Subject: Re: [DISCUSS] DeployVirtualMachine userdata enhancements
>>>> >
>>>> > On Tue, Jan 29, 2013 at 8:30 PM, Nitin Mehta
>>>><Ni...@citrix.com>
>>>> > wrote:
>>>> > > Good point Rohit, but I suggest making only those API's POST which
>>>> > create
>>>> > > a resource (like deployVm here) and not all of them.
>>>> >
>>>> > > Ideally, we need to be using the right http methods for a true
>>>> > restful web
>>>> > > service.
>>>> >
>>>> > Nice suggestion, while we can use GET for all read/list apis and
>>>>POST
>>>> > for rest kind of apis would work; so we should use correct HTTP
>>>> > request type, for example for general crud apps:
>>>> >
>>>> > create apis: POST
>>>> > list/read apis: GET
>>>> > update apis: PUT or POST
>>>> > delete apis: DELETE or POST
>>>> >
>>>> Per HTTP specs for update api we could use PUT. For delete apis we
>>>>could
>>>> stick with DELETE. That is true REST.
>>>>
>>>
>>> CS has explicit APIs to update/delete entities. In case of PUT/DELETE
>>>there is no need to pass any api name as long as the entity can be
>>>uniquely identified.
>>>
>>>>
>>>>
>>>> > > Also about the length part, how then we allow user data to be of
>>>> > > size
>>>> > 2kb
>>>> > > currently ?
>>>> >
>>>> > It's was a known issue, while it would work with most modern age
>>>> > browsers this was paid less attention. As Mice suggests, should we
>>>> > increase length of tags?
>>>> >
>>>> > Regards.
>>>> >
>>>> > >
>>>> > > On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:
>>>> > >
>>>> > >>+1 But if we are sending base64 encoded userdata as part of POST,
>>>>we
>>>> > >>can increase the limit even further.
>>>> > >>
>>>> > >>-1 If userdata will be sent as part of GET query, based on the rfc
>>>> > [1]
>>>> > >>and from the widely used ugliest web browser [2] the GET url
>>>>length
>>>> > >>should be <= 2000 (we're already exceeding that how we send
>>>>userdata
>>>> > >>request at present).
>>>> > >>
>>>> > >>Suggestion: Make POST as the default way of requesting apis from
>>>> > >>mgmt server.
>>>> > >>
>>>> > >>[1] http://www.faqs.org/rfcs/rfc2616.html
>>>> > >>[2] http://support.microsoft.com/kb/q208427
>>>> > >>
>>>> > >>Regards.
>>>> > >>
>>>> > >>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan
>>>> > >><ha...@citrix.com>
>>>> > >>wrote:
>>>> > >>> Hello All,
>>>> > >>>
>>>> > >>> I wish to propose increasing the size of userdata to be passed
>>>> > along
>>>> > >>>with DeployVirtualMachine API - I have added some info here
>>>> >
>>>> >>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtua
>>>> > >>>l
>>>> > Machi
>>>> > >>>ne+userdata+enhancements
>>>> > >>>  along with a JIRA ticket
>>>> > >>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>>>> > >>>
>>>> > >>>
>>>> > >>> Please review and comment
>>>> > >>>
>>>> > >>> Hari Kannan
>>>> > >
>>>
>>
>> Does this proposal (and the technical discussion above) mean that we
>> want our next feature release to break backward compatibility with 4.0
>> (and soon 4.1)?  If so, can someone please start a specific discuss
>> thread about that (elevating the decision from being tied to a
>> specific feature)?


Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Chiradeep Vittal <Ch...@citrix.com>.
+1 to all 3 issues identified.
-1 to breaking API (using PUT/DELETE etc)
The underlying limitation for userdata is from the size of the database
column.

We should continue supporting GET semantics for deployVirtualMachine, in
which case the limit would continue to be 2K. We can support POST for ALL
APIs in which case the user data would be limited by the size of the
database column again.

I don't mind increasing the size to 32K even.


On 1/30/13 11:03 AM, "Rohit Yadav" <bh...@apache.org> wrote:

>From wiki: "While CS does support the POST method also, we are not
>aware of any cloudstack clients using this."
>
>So, while GET and POST are both supported by the api servlet (because
>of the base class), POST won't work now as we funnel all requests to a
>single method that assumes GET and parses args based on ampersand
>separated url vars. It would need fixing, issue #0.
>
>Next, the way parsing is done it does not create multimap, so if
>multiple args are passed, it would take the last value which the http
>rfc mentions they should be collected as array for a key, i.e. a
>multimap, this is issue #1.
>
>Lastly, the fix would be largely on client, i.e. the UI and
>cloudmonkey for example to send POST for certain apis and GET. I'm not
>in favour of making a non-rest api server behave like a rest one, so
>atmost we should fix #0 and #1 and accept only GET and POST, GET for
>all read apis and POST for all the create, delete and update apis. I'm
>in favor of deprecated the current api server for say next 1-2 years
>and start working on a full REST-compliant JAX-RS powered api server,
>issue #3
>
>#0 - https://issues.apache.org/jira/browse/CLOUDSTACK-1091
>#1 - https://issues.apache.org/jira/browse/CLOUDSTACK-1092
>#2 - https://issues.apache.org/jira/browse/CLOUDSTACK-1093
>
>Assigned all of them to myself, feel to reassign.
>
>Regards.
>
>On Wed, Jan 30, 2013 at 10:48 AM, Chip Childers
><ch...@sungard.com> wrote:
>> On Wed, Jan 30, 2013 at 3:17 AM, Koushik Das <ko...@citrix.com>
>>wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Ram Ganesh [mailto:Ram.Ganesh@citrix.com]
>>>> Sent: Wednesday, January 30, 2013 1:06 PM
>>>> To: cloudstack-dev@incubator.apache.org
>>>> Subject: RE: [DISCUSS] DeployVirtualMachine userdata enhancements
>>>>
>>>> > -----Original Message-----
>>>> > From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On
>>>> Behalf
>>>> > Of Rohit Yadav
>>>> > Sent: 30 January 2013 10:30
>>>> > To: cloudstack-dev@incubator.apache.org
>>>> > Subject: Re: [DISCUSS] DeployVirtualMachine userdata enhancements
>>>> >
>>>> > On Tue, Jan 29, 2013 at 8:30 PM, Nitin Mehta
>>>><Ni...@citrix.com>
>>>> > wrote:
>>>> > > Good point Rohit, but I suggest making only those API's POST which
>>>> > create
>>>> > > a resource (like deployVm here) and not all of them.
>>>> >
>>>> > > Ideally, we need to be using the right http methods for a true
>>>> > restful web
>>>> > > service.
>>>> >
>>>> > Nice suggestion, while we can use GET for all read/list apis and
>>>>POST
>>>> > for rest kind of apis would work; so we should use correct HTTP
>>>> > request type, for example for general crud apps:
>>>> >
>>>> > create apis: POST
>>>> > list/read apis: GET
>>>> > update apis: PUT or POST
>>>> > delete apis: DELETE or POST
>>>> >
>>>> Per HTTP specs for update api we could use PUT. For delete apis we
>>>>could
>>>> stick with DELETE. That is true REST.
>>>>
>>>
>>> CS has explicit APIs to update/delete entities. In case of PUT/DELETE
>>>there is no need to pass any api name as long as the entity can be
>>>uniquely identified.
>>>
>>>>
>>>>
>>>> > > Also about the length part, how then we allow user data to be of
>>>> > > size
>>>> > 2kb
>>>> > > currently ?
>>>> >
>>>> > It's was a known issue, while it would work with most modern age
>>>> > browsers this was paid less attention. As Mice suggests, should we
>>>> > increase length of tags?
>>>> >
>>>> > Regards.
>>>> >
>>>> > >
>>>> > > On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:
>>>> > >
>>>> > >>+1 But if we are sending base64 encoded userdata as part of POST,
>>>>we
>>>> > >>can increase the limit even further.
>>>> > >>
>>>> > >>-1 If userdata will be sent as part of GET query, based on the rfc
>>>> > [1]
>>>> > >>and from the widely used ugliest web browser [2] the GET url
>>>>length
>>>> > >>should be <= 2000 (we're already exceeding that how we send
>>>>userdata
>>>> > >>request at present).
>>>> > >>
>>>> > >>Suggestion: Make POST as the default way of requesting apis from
>>>> > >>mgmt server.
>>>> > >>
>>>> > >>[1] http://www.faqs.org/rfcs/rfc2616.html
>>>> > >>[2] http://support.microsoft.com/kb/q208427
>>>> > >>
>>>> > >>Regards.
>>>> > >>
>>>> > >>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan
>>>> > >><ha...@citrix.com>
>>>> > >>wrote:
>>>> > >>> Hello All,
>>>> > >>>
>>>> > >>> I wish to propose increasing the size of userdata to be passed
>>>> > along
>>>> > >>>with DeployVirtualMachine API - I have added some info here
>>>> >
>>>> >>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtua
>>>> > >>>l
>>>> > Machi
>>>> > >>>ne+userdata+enhancements
>>>> > >>>  along with a JIRA ticket
>>>> > >>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>>>> > >>>
>>>> > >>>
>>>> > >>> Please review and comment
>>>> > >>>
>>>> > >>> Hari Kannan
>>>> > >
>>>
>>
>> Does this proposal (and the technical discussion above) mean that we
>> want our next feature release to break backward compatibility with 4.0
>> (and soon 4.1)?  If so, can someone please start a specific discuss
>> thread about that (elevating the decision from being tied to a
>> specific feature)?


Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Rohit Yadav <bh...@apache.org>.
>From wiki: "While CS does support the POST method also, we are not
aware of any cloudstack clients using this."

So, while GET and POST are both supported by the api servlet (because
of the base class), POST won't work now as we funnel all requests to a
single method that assumes GET and parses args based on ampersand
separated url vars. It would need fixing, issue #0.

Next, the way parsing is done it does not create multimap, so if
multiple args are passed, it would take the last value which the http
rfc mentions they should be collected as array for a key, i.e. a
multimap, this is issue #1.

Lastly, the fix would be largely on client, i.e. the UI and
cloudmonkey for example to send POST for certain apis and GET. I'm not
in favour of making a non-rest api server behave like a rest one, so
atmost we should fix #0 and #1 and accept only GET and POST, GET for
all read apis and POST for all the create, delete and update apis. I'm
in favor of deprecated the current api server for say next 1-2 years
and start working on a full REST-compliant JAX-RS powered api server,
issue #3

#0 - https://issues.apache.org/jira/browse/CLOUDSTACK-1091
#1 - https://issues.apache.org/jira/browse/CLOUDSTACK-1092
#2 - https://issues.apache.org/jira/browse/CLOUDSTACK-1093

Assigned all of them to myself, feel to reassign.

Regards.

On Wed, Jan 30, 2013 at 10:48 AM, Chip Childers
<ch...@sungard.com> wrote:
> On Wed, Jan 30, 2013 at 3:17 AM, Koushik Das <ko...@citrix.com> wrote:
>>
>>
>>> -----Original Message-----
>>> From: Ram Ganesh [mailto:Ram.Ganesh@citrix.com]
>>> Sent: Wednesday, January 30, 2013 1:06 PM
>>> To: cloudstack-dev@incubator.apache.org
>>> Subject: RE: [DISCUSS] DeployVirtualMachine userdata enhancements
>>>
>>> > -----Original Message-----
>>> > From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On
>>> Behalf
>>> > Of Rohit Yadav
>>> > Sent: 30 January 2013 10:30
>>> > To: cloudstack-dev@incubator.apache.org
>>> > Subject: Re: [DISCUSS] DeployVirtualMachine userdata enhancements
>>> >
>>> > On Tue, Jan 29, 2013 at 8:30 PM, Nitin Mehta <Ni...@citrix.com>
>>> > wrote:
>>> > > Good point Rohit, but I suggest making only those API's POST which
>>> > create
>>> > > a resource (like deployVm here) and not all of them.
>>> >
>>> > > Ideally, we need to be using the right http methods for a true
>>> > restful web
>>> > > service.
>>> >
>>> > Nice suggestion, while we can use GET for all read/list apis and POST
>>> > for rest kind of apis would work; so we should use correct HTTP
>>> > request type, for example for general crud apps:
>>> >
>>> > create apis: POST
>>> > list/read apis: GET
>>> > update apis: PUT or POST
>>> > delete apis: DELETE or POST
>>> >
>>> Per HTTP specs for update api we could use PUT. For delete apis we could
>>> stick with DELETE. That is true REST.
>>>
>>
>> CS has explicit APIs to update/delete entities. In case of PUT/DELETE there is no need to pass any api name as long as the entity can be uniquely identified.
>>
>>>
>>>
>>> > > Also about the length part, how then we allow user data to be of
>>> > > size
>>> > 2kb
>>> > > currently ?
>>> >
>>> > It's was a known issue, while it would work with most modern age
>>> > browsers this was paid less attention. As Mice suggests, should we
>>> > increase length of tags?
>>> >
>>> > Regards.
>>> >
>>> > >
>>> > > On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:
>>> > >
>>> > >>+1 But if we are sending base64 encoded userdata as part of POST, we
>>> > >>can increase the limit even further.
>>> > >>
>>> > >>-1 If userdata will be sent as part of GET query, based on the rfc
>>> > [1]
>>> > >>and from the widely used ugliest web browser [2] the GET url length
>>> > >>should be <= 2000 (we're already exceeding that how we send userdata
>>> > >>request at present).
>>> > >>
>>> > >>Suggestion: Make POST as the default way of requesting apis from
>>> > >>mgmt server.
>>> > >>
>>> > >>[1] http://www.faqs.org/rfcs/rfc2616.html
>>> > >>[2] http://support.microsoft.com/kb/q208427
>>> > >>
>>> > >>Regards.
>>> > >>
>>> > >>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan
>>> > >><ha...@citrix.com>
>>> > >>wrote:
>>> > >>> Hello All,
>>> > >>>
>>> > >>> I wish to propose increasing the size of userdata to be passed
>>> > along
>>> > >>>with DeployVirtualMachine API - I have added some info here
>>> >
>>> >>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtua
>>> > >>>l
>>> > Machi
>>> > >>>ne+userdata+enhancements
>>> > >>>  along with a JIRA ticket
>>> > >>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>>> > >>>
>>> > >>>
>>> > >>> Please review and comment
>>> > >>>
>>> > >>> Hari Kannan
>>> > >
>>
>
> Does this proposal (and the technical discussion above) mean that we
> want our next feature release to break backward compatibility with 4.0
> (and soon 4.1)?  If so, can someone please start a specific discuss
> thread about that (elevating the decision from being tied to a
> specific feature)?

Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Chip Childers <ch...@sungard.com>.
On Wed, Jan 30, 2013 at 3:17 AM, Koushik Das <ko...@citrix.com> wrote:
>
>
>> -----Original Message-----
>> From: Ram Ganesh [mailto:Ram.Ganesh@citrix.com]
>> Sent: Wednesday, January 30, 2013 1:06 PM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: RE: [DISCUSS] DeployVirtualMachine userdata enhancements
>>
>> > -----Original Message-----
>> > From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On
>> Behalf
>> > Of Rohit Yadav
>> > Sent: 30 January 2013 10:30
>> > To: cloudstack-dev@incubator.apache.org
>> > Subject: Re: [DISCUSS] DeployVirtualMachine userdata enhancements
>> >
>> > On Tue, Jan 29, 2013 at 8:30 PM, Nitin Mehta <Ni...@citrix.com>
>> > wrote:
>> > > Good point Rohit, but I suggest making only those API's POST which
>> > create
>> > > a resource (like deployVm here) and not all of them.
>> >
>> > > Ideally, we need to be using the right http methods for a true
>> > restful web
>> > > service.
>> >
>> > Nice suggestion, while we can use GET for all read/list apis and POST
>> > for rest kind of apis would work; so we should use correct HTTP
>> > request type, for example for general crud apps:
>> >
>> > create apis: POST
>> > list/read apis: GET
>> > update apis: PUT or POST
>> > delete apis: DELETE or POST
>> >
>> Per HTTP specs for update api we could use PUT. For delete apis we could
>> stick with DELETE. That is true REST.
>>
>
> CS has explicit APIs to update/delete entities. In case of PUT/DELETE there is no need to pass any api name as long as the entity can be uniquely identified.
>
>>
>>
>> > > Also about the length part, how then we allow user data to be of
>> > > size
>> > 2kb
>> > > currently ?
>> >
>> > It's was a known issue, while it would work with most modern age
>> > browsers this was paid less attention. As Mice suggests, should we
>> > increase length of tags?
>> >
>> > Regards.
>> >
>> > >
>> > > On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:
>> > >
>> > >>+1 But if we are sending base64 encoded userdata as part of POST, we
>> > >>can increase the limit even further.
>> > >>
>> > >>-1 If userdata will be sent as part of GET query, based on the rfc
>> > [1]
>> > >>and from the widely used ugliest web browser [2] the GET url length
>> > >>should be <= 2000 (we're already exceeding that how we send userdata
>> > >>request at present).
>> > >>
>> > >>Suggestion: Make POST as the default way of requesting apis from
>> > >>mgmt server.
>> > >>
>> > >>[1] http://www.faqs.org/rfcs/rfc2616.html
>> > >>[2] http://support.microsoft.com/kb/q208427
>> > >>
>> > >>Regards.
>> > >>
>> > >>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan
>> > >><ha...@citrix.com>
>> > >>wrote:
>> > >>> Hello All,
>> > >>>
>> > >>> I wish to propose increasing the size of userdata to be passed
>> > along
>> > >>>with DeployVirtualMachine API - I have added some info here
>> >
>> >>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtua
>> > >>>l
>> > Machi
>> > >>>ne+userdata+enhancements
>> > >>>  along with a JIRA ticket
>> > >>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>> > >>>
>> > >>>
>> > >>> Please review and comment
>> > >>>
>> > >>> Hari Kannan
>> > >
>

Does this proposal (and the technical discussion above) mean that we
want our next feature release to break backward compatibility with 4.0
(and soon 4.1)?  If so, can someone please start a specific discuss
thread about that (elevating the decision from being tied to a
specific feature)?

RE: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Koushik Das <ko...@citrix.com>.

> -----Original Message-----
> From: Ram Ganesh [mailto:Ram.Ganesh@citrix.com]
> Sent: Wednesday, January 30, 2013 1:06 PM
> To: cloudstack-dev@incubator.apache.org
> Subject: RE: [DISCUSS] DeployVirtualMachine userdata enhancements
> 
> > -----Original Message-----
> > From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On
> Behalf
> > Of Rohit Yadav
> > Sent: 30 January 2013 10:30
> > To: cloudstack-dev@incubator.apache.org
> > Subject: Re: [DISCUSS] DeployVirtualMachine userdata enhancements
> >
> > On Tue, Jan 29, 2013 at 8:30 PM, Nitin Mehta <Ni...@citrix.com>
> > wrote:
> > > Good point Rohit, but I suggest making only those API's POST which
> > create
> > > a resource (like deployVm here) and not all of them.
> >
> > > Ideally, we need to be using the right http methods for a true
> > restful web
> > > service.
> >
> > Nice suggestion, while we can use GET for all read/list apis and POST
> > for rest kind of apis would work; so we should use correct HTTP
> > request type, for example for general crud apps:
> >
> > create apis: POST
> > list/read apis: GET
> > update apis: PUT or POST
> > delete apis: DELETE or POST
> >
> Per HTTP specs for update api we could use PUT. For delete apis we could
> stick with DELETE. That is true REST.
> 

CS has explicit APIs to update/delete entities. In case of PUT/DELETE there is no need to pass any api name as long as the entity can be uniquely identified.

> 
> 
> > > Also about the length part, how then we allow user data to be of
> > > size
> > 2kb
> > > currently ?
> >
> > It's was a known issue, while it would work with most modern age
> > browsers this was paid less attention. As Mice suggests, should we
> > increase length of tags?
> >
> > Regards.
> >
> > >
> > > On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:
> > >
> > >>+1 But if we are sending base64 encoded userdata as part of POST, we
> > >>can increase the limit even further.
> > >>
> > >>-1 If userdata will be sent as part of GET query, based on the rfc
> > [1]
> > >>and from the widely used ugliest web browser [2] the GET url length
> > >>should be <= 2000 (we're already exceeding that how we send userdata
> > >>request at present).
> > >>
> > >>Suggestion: Make POST as the default way of requesting apis from
> > >>mgmt server.
> > >>
> > >>[1] http://www.faqs.org/rfcs/rfc2616.html
> > >>[2] http://support.microsoft.com/kb/q208427
> > >>
> > >>Regards.
> > >>
> > >>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan
> > >><ha...@citrix.com>
> > >>wrote:
> > >>> Hello All,
> > >>>
> > >>> I wish to propose increasing the size of userdata to be passed
> > along
> > >>>with DeployVirtualMachine API - I have added some info here
> >
> >>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtua
> > >>>l
> > Machi
> > >>>ne+userdata+enhancements
> > >>>  along with a JIRA ticket
> > >>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
> > >>>
> > >>>
> > >>> Please review and comment
> > >>>
> > >>> Hari Kannan
> > >

RE: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Ram Ganesh <Ra...@citrix.com>.
> -----Original Message-----
> From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On Behalf
> Of Rohit Yadav
> Sent: 30 January 2013 10:30
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: [DISCUSS] DeployVirtualMachine userdata enhancements
> 
> On Tue, Jan 29, 2013 at 8:30 PM, Nitin Mehta <Ni...@citrix.com>
> wrote:
> > Good point Rohit, but I suggest making only those API's POST which
> create
> > a resource (like deployVm here) and not all of them.
> 
> > Ideally, we need to be using the right http methods for a true
> restful web
> > service.
> 
> Nice suggestion, while we can use GET for all read/list apis and POST
> for rest kind of apis would work; so we should use correct HTTP
> request type, for example for general crud apps:
> 
> create apis: POST
> list/read apis: GET
> update apis: PUT or POST
> delete apis: DELETE or POST
> 
Per HTTP specs for update api we could use PUT. For delete apis we could stick with DELETE. That is true REST.



> > Also about the length part, how then we allow user data to be of size
> 2kb
> > currently ?
> 
> It's was a known issue, while it would work with most modern age
> browsers this was paid less attention. As Mice suggests, should we
> increase length of tags?
> 
> Regards.
> 
> >
> > On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:
> >
> >>+1 But if we are sending base64 encoded userdata as part of POST, we
> >>can increase the limit even further.
> >>
> >>-1 If userdata will be sent as part of GET query, based on the rfc
> [1]
> >>and from the widely used ugliest web browser [2] the GET url length
> >>should be <= 2000 (we're already exceeding that how we send userdata
> >>request at present).
> >>
> >>Suggestion: Make POST as the default way of requesting apis from mgmt
> >>server.
> >>
> >>[1] http://www.faqs.org/rfcs/rfc2616.html
> >>[2] http://support.microsoft.com/kb/q208427
> >>
> >>Regards.
> >>
> >>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan <ha...@citrix.com>
> >>wrote:
> >>> Hello All,
> >>>
> >>> I wish to propose increasing the size of userdata to be passed
> along
> >>>with DeployVirtualMachine API - I have added some info here
> >>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtual
> Machi
> >>>ne+userdata+enhancements
> >>>  along with a JIRA ticket
> >>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
> >>>
> >>>
> >>> Please review and comment
> >>>
> >>> Hari Kannan
> >

Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Rohit Yadav <bh...@apache.org>.
On Tue, Jan 29, 2013 at 8:30 PM, Nitin Mehta <Ni...@citrix.com> wrote:
> Good point Rohit, but I suggest making only those API's POST which create
> a resource (like deployVm here) and not all of them.

> Ideally, we need to be using the right http methods for a true restful web
> service.

Nice suggestion, while we can use GET for all read/list apis and POST
for rest kind of apis would work; so we should use correct HTTP
request type, for example for general crud apps:

create apis: POST
list/read apis: GET
update apis: PUT or POST
delete apis: DELETE or POST

> Also about the length part, how then we allow user data to be of size 2kb
> currently ?

It's was a known issue, while it would work with most modern age
browsers this was paid less attention. As Mice suggests, should we
increase length of tags?

Regards.

>
> On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:
>
>>+1 But if we are sending base64 encoded userdata as part of POST, we
>>can increase the limit even further.
>>
>>-1 If userdata will be sent as part of GET query, based on the rfc [1]
>>and from the widely used ugliest web browser [2] the GET url length
>>should be <= 2000 (we're already exceeding that how we send userdata
>>request at present).
>>
>>Suggestion: Make POST as the default way of requesting apis from mgmt
>>server.
>>
>>[1] http://www.faqs.org/rfcs/rfc2616.html
>>[2] http://support.microsoft.com/kb/q208427
>>
>>Regards.
>>
>>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan <ha...@citrix.com>
>>wrote:
>>> Hello All,
>>>
>>> I wish to propose increasing the size of userdata to be passed along
>>>with DeployVirtualMachine API - I have added some info here
>>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtualMachi
>>>ne+userdata+enhancements
>>>  along with a JIRA ticket
>>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>>>
>>>
>>> Please review and comment
>>>
>>> Hari Kannan
>

Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Nitin Mehta <Ni...@citrix.com>.
Mice - I suggest you to open an enhancement for this. Resource tags
limitation might be due to the fact that some of the tags in the db table
should not exceed size of 255.

Thanks,
-Nitin

On 30/01/13 10:22 AM, "Mice Xia" <mi...@tcloudcomputing.com> wrote:

>+1 for using right http method for true restful web service in the future.
>
>And by the way, does 'create resource tag(s) API' have the same
>requirement? Max length of tag value is 255 now.
>
>Regards
>Mice
>
>-----Original Message-----
>From: Nitin Mehta [mailto:Nitin.Mehta@citrix.com]
>Sent: Wednesday, January 30, 2013 12:31 PM
>To: cloudstack-dev@incubator.apache.org
>Subject: Re: [DISCUSS] DeployVirtualMachine userdata enhancements
>
>Good point Rohit, but I suggest making only those API's POST which create
>a resource (like deployVm here) and not all of them.
>Ideally, we need to be using the right http methods for a true restful
>web service.
>
>Also about the length part, how then we allow user data to be of size 2kb
>currently ?
>
>On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:
>
>>+1 But if we are sending base64 encoded userdata as part of POST, we
>>can increase the limit even further.
>>
>>-1 If userdata will be sent as part of GET query, based on the rfc [1]
>>and from the widely used ugliest web browser [2] the GET url length
>>should be <= 2000 (we're already exceeding that how we send userdata
>>request at present).
>>
>>Suggestion: Make POST as the default way of requesting apis from mgmt
>>server.
>>
>>[1] http://www.faqs.org/rfcs/rfc2616.html
>>[2] http://support.microsoft.com/kb/q208427
>>
>>Regards.
>>
>>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan <ha...@citrix.com>
>>wrote:
>>> Hello All,
>>>
>>> I wish to propose increasing the size of userdata to be passed along
>>>with DeployVirtualMachine API - I have added some info here
>>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtualMa
>>>chi
>>>ne+userdata+enhancements
>>>  along with a JIRA ticket
>>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>>>
>>>
>>> Please review and comment
>>>
>>> Hari Kannan
>


RE: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Mice Xia <mi...@tcloudcomputing.com>.
+1 for using right http method for true restful web service in the future.

And by the way, does 'create resource tag(s) API' have the same requirement? Max length of tag value is 255 now.

Regards
Mice

-----Original Message-----
From: Nitin Mehta [mailto:Nitin.Mehta@citrix.com] 
Sent: Wednesday, January 30, 2013 12:31 PM
To: cloudstack-dev@incubator.apache.org
Subject: Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Good point Rohit, but I suggest making only those API's POST which create a resource (like deployVm here) and not all of them.
Ideally, we need to be using the right http methods for a true restful web service.

Also about the length part, how then we allow user data to be of size 2kb currently ?

On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:

>+1 But if we are sending base64 encoded userdata as part of POST, we
>can increase the limit even further.
>
>-1 If userdata will be sent as part of GET query, based on the rfc [1] 
>and from the widely used ugliest web browser [2] the GET url length 
>should be <= 2000 (we're already exceeding that how we send userdata 
>request at present).
>
>Suggestion: Make POST as the default way of requesting apis from mgmt 
>server.
>
>[1] http://www.faqs.org/rfcs/rfc2616.html
>[2] http://support.microsoft.com/kb/q208427
>
>Regards.
>
>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan <ha...@citrix.com>
>wrote:
>> Hello All,
>>
>> I wish to propose increasing the size of userdata to be passed along 
>>with DeployVirtualMachine API - I have added some info here 
>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtualMa
>>chi
>>ne+userdata+enhancements
>>  along with a JIRA ticket
>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>>
>>
>> Please review and comment
>>
>> Hari Kannan


Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Nitin Mehta <Ni...@citrix.com>.
Good point Rohit, but I suggest making only those API's POST which create
a resource (like deployVm here) and not all of them.
Ideally, we need to be using the right http methods for a true restful web
service.

Also about the length part, how then we allow user data to be of size 2kb
currently ?

On 30/01/13 9:43 AM, "Rohit Yadav" <bh...@apache.org> wrote:

>+1 But if we are sending base64 encoded userdata as part of POST, we
>can increase the limit even further.
>
>-1 If userdata will be sent as part of GET query, based on the rfc [1]
>and from the widely used ugliest web browser [2] the GET url length
>should be <= 2000 (we're already exceeding that how we send userdata
>request at present).
>
>Suggestion: Make POST as the default way of requesting apis from mgmt
>server.
>
>[1] http://www.faqs.org/rfcs/rfc2616.html
>[2] http://support.microsoft.com/kb/q208427
>
>Regards.
>
>On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan <ha...@citrix.com>
>wrote:
>> Hello All,
>>
>> I wish to propose increasing the size of userdata to be passed along
>>with DeployVirtualMachine API - I have added some info here
>>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtualMachi
>>ne+userdata+enhancements
>>  along with a JIRA ticket
>>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>>
>>
>> Please review and comment
>>
>> Hari Kannan


Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Rohit Yadav <bh...@apache.org>.
+1 But if we are sending base64 encoded userdata as part of POST, we
can increase the limit even further.

-1 If userdata will be sent as part of GET query, based on the rfc [1]
and from the widely used ugliest web browser [2] the GET url length
should be <= 2000 (we're already exceeding that how we send userdata
request at present).

Suggestion: Make POST as the default way of requesting apis from mgmt server.

[1] http://www.faqs.org/rfcs/rfc2616.html
[2] http://support.microsoft.com/kb/q208427

Regards.

On Tue, Jan 29, 2013 at 7:40 PM, Hari Kannan <ha...@citrix.com> wrote:
> Hello All,
>
> I wish to propose increasing the size of userdata to be passed along with DeployVirtualMachine API - I have added some info here https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtualMachine+userdata+enhancements
>  along with a JIRA ticket https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>
>
> Please review and comment
>
> Hari Kannan

Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Abhinandan Prateek <Ab...@citrix.com>.
+1 

I agree we should increase the size of user data to >=44KB that can hold
32KB of real data that is base64 encoded.

-abhi

On 30/01/13 9:10 AM, "Hari Kannan" <ha...@citrix.com> wrote:

>Hello All,
>
>I wish to propose increasing the size of userdata to be passed along with
>DeployVirtualMachine API - I have added some info here
>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtualMachin
>e+userdata+enhancements
> along with a JIRA ticket
>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>
>
>Please review and comment
>
>Hari Kannan


Re: [DISCUSS] DeployVirtualMachine userdata enhancements

Posted by Abhinandan Prateek <Ab...@citrix.com>.
+1 

I agree we should increase the size of user data to >=44KB that can hold
32KB of real data that is base64 encoded.

-abhi

On 30/01/13 9:10 AM, "Hari Kannan" <ha...@citrix.com> wrote:

>Hello All,
>
>I wish to propose increasing the size of userdata to be passed along with
>DeployVirtualMachine API - I have added some info here
>https://cwiki.apache.org/confluence/display/CLOUDSTACK/DeployVirtualMachin
>e+userdata+enhancements
> along with a JIRA ticket
>https://issues.apache.org/jira/browse/CLOUDSTACK-1086
>
>
>Please review and comment
>
>Hari Kannan