test: print excess debugging when the '-debug' flag is provided

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: avoid transactions for 'internal' store nodes

When we store internal data in the persistent store, we have only
a single writer (us) and hence there is no chance of conflict.
Therefore we can avoid transactions and don't have to worry about
what to do if a transaction is aborted.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
transactions: further simplify by replaying all transactions

A transaction is now considered a stored program which should
be executed on 'commit' against the state of the system when
the 'transaction_begin' was received.

When the user requests 'transaction_commit', we re-run the
program and verify the responses we sent to the user previously
are still valid (e.g. Reads return the same data, Writes are
accepted). If the responses all match then we re-run the program
a second time against the live store.

This avoids the need to persist the store contents (keys, values
and quotas) for each transaction to allow us to implement an O(1)
commit operation. We can store the intermediate state of transactions
in the regular heap and simply abort the transactions if we crash.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: add a persistent map (PMap), base our persistent queue on it

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
add missing OASIS autogen files

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Remove dead code

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: add a persistent reference cell

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: persist quota limits in the database

The global default settings are stored in persistent reference
cells (module PRef) while the per-domain overrides are stored
in persistent maps (module PMap).

The actual limits in force for a particular domain are computed
in the Lwt-based packet processing loop and passed down to the
pure Store/Transaction/Node modules.

This patch removes the ability to add a per-domain override for
the maximum length of watch event queues. Implementing this is
awkward because domid x generates the watch event, but the limits
for domid y (where x may not be equal to y) need to apply.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: attach introspection on /tool/xenstored/connection/<scheme>/<idx>

In particular the watch events are per-connection, not per-domain.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: introspect ring and channels via /tool/xenstored/transport/<scheme>/<idx>

It's cleaner to mount the ring introspection data in a different
place to the connection data (watch queues etc).

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: rename 'socket' to 'unix' in introspection data

We now use <scheme>/<idx> everywhere we need to name a connection.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>