xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* OCaml xenstore: max value size is configure to be 2048 bytes - consistent with C xenstore?
@ 2017-04-27 13:30 Christian Lindig
  2017-04-27 14:42 ` Ian Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Lindig @ 2017-04-27 13:30 UTC (permalink / raw)
  To: Xen-devel; +Cc: Ian Jackson, Lars Kurth

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@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-27 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-27 13:30 OCaml xenstore: max value size is configure to be 2048 bytes - consistent with C xenstore? Christian Lindig
2017-04-27 14:42 ` Ian Jackson
2017-04-27 15:58   ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).