From 9d842f965655bf70c643b4541844e83bc4e74190 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Wed, 11 Feb 2015 17:13:45 +0530 Subject: glusterd: nfs,shd,quotad,snapd daemons refactoring This patch ports nfs, shd, quotad & snapd with the approach suggested in http://www.gluster.org/pipermail/gluster-devel/2014-December/043180.html Change-Id: I4ea5b38793f87fc85cc9d2cf873727351dedffd2 BUG: 1191486 Signed-off-by: Atin Mukherjee Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/9428 Tested-by: Gluster Build System Reviewed-by: Anand Nekkunti --- doc/daemon-management-framework.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doc/daemon-management-framework.md (limited to 'doc') diff --git a/doc/daemon-management-framework.md b/doc/daemon-management-framework.md new file mode 100644 index 00000000000..592192e665d --- /dev/null +++ b/doc/daemon-management-framework.md @@ -0,0 +1,38 @@ + +How to introduce new daemons using daemon management framework +============================================================== +Glusterd manages GlusterFS daemons providing services like NFS, Proactive +self-heal, Quota, User servicable snapshots etc. Following are some of the +aspects that come under daemon management. + +Data members & functions of different management objects + +- **Connection Management** + - unix domain sockets based channel for internal communication + - rpc connection for the communication + - frame timeout value for UDS + - Methods - notify + - init, connect, termination, disconnect APIs can be invoked using the + connection management object + +- **Process Management** + - Name of the process + - pidfile to detect if the daemon is running + - loggging directory, log file, volfile, volfileserver & volfileid + - init, stop APIs can be invoked using the process management object + +- **Service Management** + - connection object + - process object + - online status + - Methods - manager, start, stop which can be abstracted as a common methods + or specific to service requirements + - init API can be invoked using the service management object + + The above structures defines the skeleton of the daemon management framework. + Introduction of new daemons in GlusterFS needs to inherit these properties. Any + requirement specific to a daemon needs to be implemented in its own service + (for eg : snapd defines its own type glusterd_snapdsvc_t using glusterd_svc_t + and snapd specific data). New daemons will need to have its own service specific + code written in glusterd--svc.h{c} and need to reuse the existing + framework. -- cgit