History | View | Annotate | Download (16.1 kB)
Limit size of request locking
...as we currently move the whole configuration over thenetwork.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Petr Pudlak <pudlak@google.com>
Allow closing a RPC client, keeping its file descriptors
The purpose is to keep the communication channel open, while replacing a'Client' with something else.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Separate client and server config for Luxi communication
The daemon identity is only required for server connections to set theaccess mode to its socket appropriately. For client connections it'snot needed and requiring it prevents creating standalone clients, for...
Allow creation if bi-directional pair of Luxi-like clients
This allows a process and its forked child to communicate with eachother using our standard infrastructure.
Separate read and write handle in the Luxi Client data type
This is required for inter-process pipes, which are fully supported onlyas uni-directional.
Move buildCall and validateResult from Luxi to UDSServer
.. to that they're available for other Luxi-like RPC clients as well.
While at it, rename validateResult to parseResponse to be consistentwith the names of the other functions.
Signed-off-by: Petr Pudlak <pudlak@google.com>...
Allow clients of UDSServer to use different monads
.. as long as they're instances of "MonadBaseControl IO" and "MonadLog".This allows the UDSServer to call functions like "fork" within monadssuch as "ResultT e IO" or "ReaderT IO".
luxid: give stern warnings about debug mode
Luxid as it is can leak private and secret parameters by loggingall requests as they arrive, before any preprocessing is done.
Warn the user stern warnings about this.
Signed-off-by: Santi Raffa <rsanti@google.com>...
Generalize and reuse Unix domain sockets
Refactor module 'Ganeti.UDSServer' so the KVM daemon can reuse codedeclared in this module to handle Unix domain sockets.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Move the generalized IO client from Luxi to UDSServer
No code is changed in this patch (except imports and qualifiers), onlymoved.
Generalize the IO client handling in Luxi
... to be usable for WConfd as well. A daemon handler is encapsulatedinto `Handler` data type, which is then passed to a generic `listener`.
The changes are done in Luxi.hs so that the differences are visible and...
Generalize "validateCall" to be usable outside LUXI
Return the method (as any instance of JSON) and the arguments of a call.
Add the Unix domain socket path to the Server data type
This simplifies code for closing such a socket.
Encapsulate a server socket and its parameters
Instead of passing a bare server socket around, we pass it encapsulatedin a data type together with parameters such as read/write timeouts.
Rename getClient/Server to getLuxiClient/Server
Later they will be split into LUXI-specific and general parts.
Split Luxi.hs into LUXI-specific functions and general ones
This will allow WConfD to use the general functions without importingLuxi.hs.