From c5bcaaaf25e781c21d29dfb0f39b0aeb7edb8283 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Sun, 15 Jan 2017 13:59:04 +0530 Subject: gluster-blockd: daemonize the utility this patch, deprecate ssh way of communicating between server nodes/pods Reason: ssh way is hard to be accepted in container world (Kube). An another option kubeExec way seems to be a bit weird, to have uniform way of communication in container and non container worlds, we prefer RPC. From now we communicate via RPC, using a static port 24009 Hence, we have two components, server component -> gluster-blockd (daemon) client component -> gluster-block (cli) Signed-off-by: Prasanna Kumar Kalever --- rpc/block_clnt.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 rpc/block_clnt.c (limited to 'rpc/block_clnt.c') diff --git a/rpc/block_clnt.c b/rpc/block_clnt.c new file mode 100644 index 0000000..9e5b585 --- /dev/null +++ b/rpc/block_clnt.c @@ -0,0 +1,25 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include /* for memset */ +#include "block.h" + +/* Default timeout can be changed using clnt_control() */ +static struct timeval TIMEOUT = { 25, 0 }; + +blockTrans * +block_exec_1(char **argp, CLIENT *clnt) +{ + static blockTrans clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); + if (clnt_call (clnt, BLOCK_EXEC, + (xdrproc_t) xdr_wrapstring, (caddr_t) argp, + (xdrproc_t) xdr_blockTrans, (caddr_t) &clnt_res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +} -- cgit