Feature #4081
Add option in oned.conf for XML message size
Status: | Closed | Start date: | 10/23/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Carlos Martín | % Done: | 0% | |
Category: | Core & System | |||
Target version: | Release 4.14.2 | |||
Resolution: | invalid | Pull request: |
Description
This is to add an option similar to that in the scheduler for XML message sizes.
Related issues
History
#1 Updated by Sara Vallero over 5 years ago
If the list of VMs belonging to a service and their attributes gets too large (> 512kB) the Abyss server with default configuration rejects the request. One can increase the max allowed size like this:
int RequestManager::start()
{
xmlrpc_limit_set(XMLRPC_XML_SIZE_LIMIT_ID, factor* XMLRPC_XML_SIZE_LIMIT_DEFAULT);
...
}
Where factor is an integer number, it would be good to be allowed to set this number from config.
#2 Updated by Ruben S. Montero over 5 years ago
- Related to Backlog #4096: Reduce vm information stored for each VM in a service document added
#3 Updated by Ruben S. Montero over 5 years ago
- Subject changed from Reduce vm information stored for each VM in a service document to Add option in oned.conf for XML message size
#4 Updated by Ruben S. Montero over 5 years ago
- Description updated (diff)
#5 Updated by Carlos Martín over 5 years ago
- Category changed from OneFlow to Core & System
- Assignee set to Carlos Martín
#6 Updated by Carlos Martín over 5 years ago
- Status changed from New to Closed
- Resolution set to invalid
Actually this value can be already set in oned.conf with the MESSAGE_SIZE attribute:
http://docs.opennebula.org/4.14/administration/references/oned_conf.html#xml-rpc-server-configuration
The default value for OpenNebula is 1024MB, much higher than libxmlrpc's default of 512KB
#7 Updated by Sara Vallero over 5 years ago
In my understanding the parameter MESSAGE_SIZE refers to the response size. The problem occurs when the server receives a too large message from client, i.e. when trying to update a template.
#8 Updated by Carlos Martín over 5 years ago
Hi,
In my understanding the parameter MESSAGE_SIZE refers to the response size. The problem occurs when the server receives a too large message from client, i.e. when trying to update a template.
MESSAGE_SIZE is set in two places:
1) In RequestManager.cc
https://github.com/OpenNebula/one/blob/master/src/rm/RequestManager.cc#L83
2) In Client.h
https://github.com/OpenNebula/one/blob/master/include/Client.h#L66
According to the docs, the xmlrpc_limit_set call we do in RequestManager.cc applies to any operation encoding/decoding XML:
http://xmlrpc-c.sourceforge.net/doc/libxmlrpc.html#limit
Actually I can see the server failing (HTTP-Error: 500) to perform a onetemplate update when I set the MESSAGE_SIZE to 512 and a big template is sent to oned.
For some reason the output of onetemplate list does not fail to return xml strings much bigger than 512 bytes... Maybe the responses are not processed as XML by libxmlrpc and this limit does not apply.
#9 Updated by Sara Vallero over 5 years ago
Ah now I understand: I'm using an older ON version (4.8) where the feature on server side was not in place yet.
I also cannot produce the failure when listing templates/vms etc... at least not with "one" cli. I have failures with boto though, but I'm not yet sure if it's related to the same issue.
Thanks!