summaryrefslogtreecommitdiffstats
path: root/rpc/block_xdr.c
Commit message (Collapse)AuthorAgeFilesLines
* cli: deprecate volserver optionPrasanna Kumar Kalever2017-02-171-6/+0
| | | | | | | volserver can be considered as "localhost", as we anyway tieing-up glusterd, gluster-blockd and cli processes. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
* gluster-block: do not need --block-host option for list | info |deletePrasanna Kumar Kalever2017-01-301-6/+0
| | | | | | From now we read the block-hosts from journal i.e targets meta file. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
* gluster-blockd: consider spare nodes to satisfy the multipath requestPrasanna Kumar Kalever2017-01-301-0/+2
| | | | | | | | | | | In case if number of block hosts are more than the multipath request, consider that spare nodes to satify the request. Lets say we need multipath of 3, but the admin provides 5 block-hosts. If any of the node fail to configure target from first three, then consider configuring fourth node to satify the HA request. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
* gluster-blockd: implement transaction frameworkPrasanna Kumar Kalever2017-01-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduce the transaction locking also, start maintaining meta data journaling per block Every request is follows transaction, at the start of any transaction we take blocking lock on "/block-meta/meta.lock" file and at the end we unlock. Meanwhile while, when the transaction is in progress we do journaling, while performing series of operations, used for future purposes and roll backing. A sample journal file looks like: $ cat /mnt/block-meta/LUN1 GBID: xyz-abc SIZE : 5GiB HA: 3 ENTRYCREATE: INPROGRESS ENTRYCREATE: SUCCESS NODE1: INPROGRESS NODE2: INPROGRESS NODE3: INPROGRESS NODE2: SUCCESS NODE3: FAIL NODE1: SUCCESS NODE4: INPROGRESS NODE4: SUCCESS NODE3: CLEANUPSUCCESS <EOF> Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
* gluster-block: add list and info rpcPrasanna Kumar Kalever2017-01-301-0/+4
| | | | Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
* gluster-block: add delete rpcPrasanna Kumar Kalever2017-01-301-0/+46
| | | | Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
* gluster-block: listen on unix and inetPrasanna Kumar Kalever2017-01-301-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from now We basically have 2 RPC connections, 1. Between gluster block CLI and local gluster-blockd This connection is basically UNIX/local netid ,listening on /var/run/gluster-blockd.socket file. The CLI always Send/Receive the commands to/from the local gluster-blockd via local rpc. 2. Between gluster-blockd's, i.e local (to cli) gluster-blockd and the gluster-blockd's running on remote(blockhost) This is the tcp connection. The rpc requests are listening on 24006 Also from now gluster-blockd is multi threaded (As of now 2 threads) Lets consider the Create Request to understand what each thread solves Thread1 (THE CLI THREAD) * Listening on local RPC * Generate the GBID (UUID) and create the entry with name GBID in the given volume with a requested size. * And Send the Configuration requests to remote hosts, waits for the replies (HINt: after this point Read Thread2 and come back) * Return to CLI. Thread 2 (THE SERVER THREAD) * Listens on 24006 * On Receiving an event, read the structure. * Executes the required "targetcli bla bla bla" command locally * Fills the command exitcode and the output in the RPC reply structure and send reply Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
* gluster-blockd: daemonize the utilityPrasanna Kumar Kalever2017-01-161-0/+16
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 <prasanna.kalever@redhat.com>