[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] OCaml xenstore: max value size is configure to be 2048 bytes - consistent with C xenstore?


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Christian Lindig <christian.lindig@xxxxxxxxxx>
  • Date: Thu, 27 Apr 2017 13:30:37 +0000
  • Accept-language: en-GB, en-US
  • Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxx>, Lars Kurth <lars.kurth@xxxxxxxxxx>
  • Delivery-date: Thu, 27 Apr 2017 13:30:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHSv1p0KaHkHVjORUyj5eZ82m1aPA==
  • Thread-topic: OCaml xenstore: max value size is configure to be 2048 bytes - consistent with C xenstore?

We recently had a case where XenServer installation showed errors because the 
data stored in OCaml xenstore exceeded 2048 bytes:

[root@dt87 tmp]# xenstore-write /local/domain/1/foo $(cat /dev/zero | tr '\0' X 
| dd bs=1 count=2048)
2048+0 records in
2048+0 records out
2048 bytes (2.0 kB) copied, 0.00743674 s, 275 kB/s
[root@dt87 tmp]# xenstore-write /local/domain/1/foo $(cat /dev/zero | tr '\0' X 
| dd bs=1 count=2049)
2049+0 records in
2049+0 records out
2049 bytes (2.0 kB) copied, 0.00714459 s, 287 kB/s
xenstore-write: could not write path /local/domain/1/foo


This limit is configured in quota-maxsize:

https://github.com/mirage/xen/blob/master/tools/ocaml/xenstored/oxenstored.conf.in#L50

This could be a surprise because in quota.ml it is initialised to 4096 and 
later reset when the config file is read.

https://github.com/mirage/xen/blob/master/tools/ocaml/xenstored/quota.ml#L24

My questions: is this behaviour consistent with the C xenstore implementation 
and if not, should this be documented or changed? Should the OCaml 
implementation made more consistent by using the 2048 for the initial value?

— Christian


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.