| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ cat /mnt/block-meta/block
VOLUME: sample
GBID: 9d278e06-b2d1-4050-bd92-c8e8b40a5654
HA: 3
ENTRYCREATE: INPROGRESS
SIZE: 9663676416
ENTRYCREATE: SUCCESS
192.168.0.104: CONFIGSUCCESS
192.168.0.105: CONFIGFAIL
192.168.0.106: CLEANUPFAIL
$ gluster-block info sample/block
NAME: block
VOLUME: sample
GBID: 9d278e06-b2d1-4050-bd92-c8e8b40a5654
SIZE: 9.0 GiB
HA: 3
PASSWORD:
EXPORTED ON: 192.168.0.104
ENCOUNTERED FAILURES ON: 192.168.0.105 192.168.0.106
$ gluster-block info sample/block --json-pretty
{
"NAME":"block",
"VOLUME":"sample",
"GBID":"9d278e06-b2d1-4050-bd92-c8e8b40a5654",
"SIZE":"9.0 GiB",
"HA":3,
"PASSWORD":"",
"EXPORTED ON":[
"192.168.0.104"
],
"ENCOUNTERED FAILURES ON":[
"192.168.0.105",
"192.168.0.106"
]
}
Change-Id: I3d47e75f64719b9eeab661006bf4ccaa629a8408
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ex: When 192.168.124.179 goes while create is in progress,
$ gluster-block create sample/1 ha 3 192.168.124.208,192.168.124.8,\
192.168.124.179 1GiB --json-pretty;
{
"IQN":"iqn.2016-12.org.gluster-block:451cfb72-bf63-45ce-83d9-d059c010cbdd",
"PORTAL(S)":[
"192.168.124.208:3260",
"192.168.124.8:3260",
"192.168.124.179:3260"
],
"ROLLBACK FAILED ON":[
"192.168.124.179"
],
"ROLLBACK SUCCESS ON":[
"192.168.124.8",
"192.168.124.208"
],
"RESULT":"FAIL"
}
Change-Id: Ibb947304154055f7477b80f1850184fb1965416d
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ gluster-block help
gluster-block (0.3)
usage:
gluster-block <command> <volname[/blockname]> [<args>] [--json*]
commands:
[...]
delete <volname/blockname> [unlink-storage <yes|no>] [force]
delete block device.
[...]
supported JSON formats:
--json|--json-plain|--json-spaced|--json-pretty
Change-Id: I64bc99a8519be6f90a7e8bc5558b0d7518661995
Fixes: #19
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ gluster-block help
gluster-block (0.3)
usage:
gluster-block <command> <volname[/blockname]> [<args>] [--json*]
commands:
create <volname/blockname> [ha <count>]
[auth <enable|disable>]
[prealloc <full|no>]
[storage <filename>]
<host1[,host2,...]> <size>
create block device [defaults: ha 1, auth disable, prealloc no, size in bytes]
[...]
supported JSON formats:
--json|--json-plain|--json-spaced|--json-pretty
Fixes: #18
Change-Id: I5d9b4abb58596bd2297cffb294c6d31f752d53e9
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
| |
Change-Id: If98ce7b7e50901ee130bbe190a12664ec0adb8c2
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. create conf in new node
2. delete conf from old node
3. replace portals from nodes hosting other paths (HA)
$ gluster-block create sample/block ha 3 192.168.124.57,192.168.124.26,192.168.124.30 1GiB --json-pretty
{
"IQN":"iqn.2016-12.org.gluster-block:d516bb5c-5f56-4d9c-96a7-385df19c2e2c",
"PORTAL(S)":[
"192.168.124.57:3260",
"192.168.124.26:3260",
"192.168.124.30:3260"
],
"RESULT":"SUCCESS"
}
$ gluster-block help
gluster-block (0.3)
usage:
gluster-block <command> <volname[/blockname]> [<args>] [--json*]
commands:
[...]
replace <volname/blockname> <old-node> <new-node> [force]
replace operations.
[...]
supported JSON formats:
--json|--json-plain|--json-spaced|--json-pretty
$ gluster-block replace sample/block 192.168.124.26 192.168.124.56 --json-pretty
{
"NAME":"block",
"CREATE SUCCESS":"192.168.124.56",
"DELETE SUCCESS":"192.168.124.26",
"REPLACE PORTAL SUCCESS ON":[
"192.168.124.57",
"192.168.124.30"
],
"RESULT":"SUCCESS"
}
Fixes: #4
Change-Id: I0411d15c407111db0d423052d9a6bc075174bf90
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
| |
Change-Id: Ic63f7c9fa169ee37b796093554c59016fbbfaa46
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we are just checking for blockname in targetcli list output, if it
exist we will delete the backend.
We do not check if block belongs to a given volume (say vol1), because of which
a rollback on a failure to create block with same name, on same node but on a
different volume (say vol2) deletes block backend belonging to vol1.
Solution:
only if blockname + gbid matches continue delete.
Change-Id: I396c228dad3cf4f51cc6676a266b837bdf6040c7
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
| |
This was fixed in an attempt to clean the sockfd leaks
Change-Id: Icd82635134050c83167a48b451b347f5c2b9bf39
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blockResponse *
block_delete_1(blockDelete *argp, CLIENT *clnt)
{
static blockResponse clnt_res; <<<<<<-------- Same memory is used by everyone
memset((char *)&clnt_res, 0, sizeof(clnt_res)); <<<<<---- Here memset is happening
if (clnt_call (clnt, BLOCK_DELETE,
(xdrproc_t) xdr_blockDelete, (caddr_t) argp,
(xdrproc_t) xdr_blockResponse, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res); <<<<<---- ptr to this memory is returned.
}
So while Thread-1 is returned "return (&clnt_res);" another thread could be
doing "memset((char *)&clnt_res, 0, sizeof(clnt_res));"
This seem to be a day-1 gluster-blockd bug from the looks of it.
Change-Id: I3fc76d7814c4fe5b286577586ec44d752dcc73f0
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
| |
Change-Id: I11274ad59925ec3d034baefc2cc2e307afa45479
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
| |
Change-Id: Ic2317843a8bd882fc26233373a4b4c35b13f24c6
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, on each targetcli create call, rtslib will rebuild its bs_cache, so
as the /sys/kernel/config/target/core dir gets more entries this takes longer
and longer to scan. Hence using repetitive targetcli in the block create
for creating iqn, backend, setting acls, setting globals will induce too
much delay in block create. As the number of blocks on the node increases,
the delay will be too longer.
This does not happen if we open targetcli in interactive mode and just do
multiple create commands form it, since the bs_cache is build once.
Read More:
https://goo.gl/8aYT38
Change-Id: I2be78a748e013f253ce8f99746989a1cf735a56f
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the default logdir is DATADIR /log/gluster-block/
This patch will provide a way to change this default logdir via Env variable
$ export GB_LOGDIR=/var/log/gluster-block-new-path/
Note: make sure to restart the processes (cli & daemon) after you set GB_LOGDIR
Change-Id: Id142e4a4dfe7b6ebc9cf8296b8ceb8bff37691b8
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ gluster-block help
gluster-block (0.2.1)
usage:
gluster-block <command> <volname[/blockname]> [<args>] [--json*]
commands:
[...]
delete <volname/blockname> [force]
delete block device.
[...]
Change-Id: I64ac01ec148e2e1d4d0ba0d4c5560df9334d58f5
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
| |
Change-Id: If729b80a8139add989170d3b590e92706128c37e
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the previous patch,
`commit f2e46779c0175e5063ce07256023f1977b333f2d
Author: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Date: Fri Jul 7 15:51:38 2017 +0530
tcmu: backstore attribute set cmd_time_out=0
[...]`
unintentionally saveconfig was left inside the loop. Hence fixing this by
pushing it outside.
Problem:
Currently, while populating 'exec' variable the following line after saveconfig
i.e. at line GB_FREE(tmp); the 'tmp' variable is made NULL; Hence in each
loop, condition if(!tmp) is always true, and the 'else' set of statements will
never be executed.
Impact:
On block create with HA > 1, only for Nth(last) node portal gets created for
rest of the nodes portal and their attr will never be created/set. As a
result block is not exported correctly.
Also, remove duplicated DEVNULLPATH redirection with attr setting
Change-Id: I1f77461de6b89af4e4af098e0444ea3526669030
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
currently, runner is not supporting the non-zero cmd timeouts (cmd_time_out !=0)
The tcmu cmd timer just fails the kernel command after cmd_time_out seconds,
leaving the runner command running. When it is zero, it means do not run the
timer, so both the kernel and runner wait for the command to complete.
This patch sets the backstore attribute cmd_time_out=0
Change-Id: Ib7a80c82d0aafe345ff4e79ce88dc92848306f4e
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
As of now, if an EntryCreate (backend storage create) fails for some reasons
like no space left, we only clean storage, leaving metafile.
This patch will delete metafile along with backend storage from the volume.
Change-Id: I89247b98602c5b991367f671134de496c294f984
Fixes: #32
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
| |
Change-Id: If7a232e4a1d550b3912402282c21d0d033aa00d2
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
| |
Change-Id: I4fc56e3fdcbccfde3a70a98f2697744444797e06
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
|
|
| |
Change-Id: I266e081dc318c1ccf29751059992beeadb9d8665
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
| |
check if the child terminated normally before checking for exit status
of the child.
Change-Id: I00357f636f4ee55c10052b4e6071cb08493d32e2
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also s/BLOCK CONFIG NODE(S)/EXPORTED NODE(S)/ in the info output
$ gluster-block info sample/block
NAME: block
VOLUME: sample
GBID: 6bd70984-be2c-43ac-9e9d-bad04010e42f
SIZE: 1.0 GiB
HA: 1
PASSWORD:
EXPORTED NODE(S): 192.168.0.105
Change-Id: I473b854b939c96b99be8e0b172ac6957b8bc6006
Fixes: #23
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, we can further narrow down the reason for command
failure on remote node.
We get to know if:
* targetcli is installed
* tcmu-runner is running
* user:glfs is listed
Change-Id: Ib39ec525f951ca510008327b59ab99d8f7645ced
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the asan trace:
==26769==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000007b60 at pc 0x7ffff6e9429b bp 0x7ffff1afd800 sp 0x7ffff1afcfa8
WRITE of size 2 at 0x602000007b60 thread T1
#0 0x7ffff6e9429a (/lib64/libasan.so.3+0x5f29a)
#1 0x406b64 in removeDuplicateSubstr /root/gluster-block/rpc/block_svc_routines.c:147
#2 0x41ad4c in blockCreateCliFormatResponse /root/gluster-block/rpc/block_svc_routines.c:1570
#3 0x41ff91 in block_create_cli_1_svc /root/gluster-block/rpc/block_svc_routines.c:1826
#4 0x405e63 in gluster_block_cli_1 /root/gluster-block/rpc/rpcl/block_svc.c:132
#5 0x7ffff57d62a0 in svc_getreq_common (/lib64/libc.so.6+0x13a2a0)
#6 0x7ffff57d63e6 in svc_getreq_poll (/lib64/libc.so.6+0x13a3e6)
#7 0x7ffff57d9d00 in svc_run (/lib64/libc.so.6+0x13dd00)
#8 0x403c61 in glusterBlockCliThreadProc /root/gluster-block/daemon/gluster-blockd.c:130
#9 0x7ffff6c1e6c9 in start_thread (/lib64/libpthread.so.0+0x76c9)
#10 0x7ffff57a3f6e in clone (/lib64/libc.so.6+0x107f6e)
0x602000007b60 is located 0 bytes to the right of 16-byte region [0x602000007b50,0x602000007b60)
allocated by thread T1 here:
#0 0x7ffff6efc020 in calloc (/lib64/libasan.so.3+0xc7020)
#1 0x42d2c3 in gbAllocN /root/gluster-block/utils/utils.c:194
#2 0x406ae9 in removeDuplicateSubstr /root/gluster-block/rpc/block_svc_routines.c:138
#3 0x41ad4c in blockCreateCliFormatResponse /root/gluster-block/rpc/block_svc_routines.c:1570
#4 0x41ff91 in block_create_cli_1_svc /root/gluster-block/rpc/block_svc_routines.c:1826
#5 0x405e63 in gluster_block_cli_1 /root/gluster-block/rpc/rpcl/block_svc.c:132
#6 0x7ffff57d62a0 in svc_getreq_common (/lib64/libc.so.6+0x13a2a0)
#7 0x7ffff5a60a5f (/lib64/libc.so.6+0x3c4a5f)
Thread T1 created by T0 here:
#0 0x7ffff6e66488 in __interceptor_pthread_create (/lib64/libasan.so.3+0x31488)
#1 0x40545f in main /root/gluster-block/daemon/gluster-blockd.c:325
#2 0x7ffff56bc400 in __libc_start_main (/lib64/libc.so.6+0x20400)
Change-Id: Id16fa0c00223f7272c3c977efb268ba5d72bd04b
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When reply->out is NULL, gluster-blockd is crashing in serializing the response.
Unfortunately the function where we can handle this error is auto-generated, so
I added catch-all errors with a generic-message if errMsg is not set.
Also improved errMsg in somecases where it is not setting by collecting the
error messages from all the config-nodes.
Change-Id: I706d8af9e8e6140d21c0d1268ae57dd5f364aa54
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
| |
Change-Id: I7a2f8804b7d33c58101bbfb58dcff15370239311
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
-------
1. Currently, each cli command take ~5 secs for execution. The Maximum
latency is due to initializing a glfs object (glfs_init() and friends).
2. OOM kills due to glfs_fini() leaks (~10MB per object)
Solution:
--------
Caching bipasses glfs_init() calls from the very next command, as in the first
command it goes via the glfs_init route, since there will be cache miss.
Hence with caching cli command on a local machine should take ~1 sec.
ATM, the cache query looks at the volume name only, as the host name will be
localhost in our case and transport will be tcp 24007 always.
The default cache capacity is 5 i.e there can be a max of five glfs entries in
the cache, anything more will lead to release of least recently used object.
This way, if there are <= 5 volume in use for block, there will be no
glfs_fini() calls, hence no leaks, no OOM's.
The next patch will help in making cache capacity configurable.
Change-Id: Ia891451cb92cf09959c1aff85976d78302ec7014
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
[ndevos: correct compiling+linking against libgfapi.so]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
When the config node is given as an address that has no route,
connection to the node fails with EHOSTUNREACH(No route to Host).
Since the code doesn't treat it as special errno, the config
ends up updating its status as CONFIGFAIL and as part of cleanup
it attempts to delete it, but fails again because the host is
not reachable. So the block file lingers on in that state forever.
Fix:
Irrespective of errno, unless we don't send an rpc we know that
we don't need to move the status to CONFIGFAIL, so get that info
and act accordingly irrespective of the errno.
Change-Id: Ie3fb9413f089a4875b5612c60ed3d65bc5b5bba1
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
status GB_CLEANUP_INPROGRESS means someone attemped a delete, but node was not
in contact/reach. So the configuration on that node is untouched. Hence such
nodes need to be shown in configured list or so called 'BLOCK CONFIG NODE(S):'
as part of info command.
Change-Id: I56f26fdb3fe6e0ac57fae08c58256d8ccb4dc10d
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The connect() in daemon takes too long to return for invalid IP addresses,
the delay is much higher that the CLI RPC Timeout, hence the CLI returns
before the daemon returns. Hence SIGPIPE is issued.
The issue can be fixed by increasing the CLI RPC clnt_call() TIMEOUT.
This should actually be handled like:
struct timeval tv;
CLIENT *cl;
cl=clnt_create("somehost", SOMEPROG, SOMEVERS, "tcp");
if (cl=NULL) {
exit(1);
}
tv.tv_sec=60; /* change timeout to 1 minute */
tv.tv_usec=0;
clnt_control(cl, CLSET_TIMEOUT, &tv);
But currently there is a bug in sun RPC which ignores TIMEOUT set using
cln_control. See [1]
Hence using regex to override default TIMEOUT generated in rpc code.
[1] https://lists.gnu.org/archive/html/bug-glibc/2000-10/msg00095.html
Change-Id: I75eceea6b9f362f8bf8c2fcb687155635efc65d7
Fixes: #15
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently from the initiator side we need to login to mpath no. of
nodes individually for establishing connect with all multipathed
block devices from the client side, thus we need to execute mpath no.
of login commands (i.e. login to each server)
This can be minimized to single login command per target by configuring
all gateways for a particular target in all gateways.
Currently,
$ gluster-block create VOL/BLOCK ha 3 HOSTx,HOSTy,HOSTz 10GiB
Creates only one TPG i.e tpg1 (Read as Target Portal Group with Tag 1)
on each node/server, with one portal listening on respective IP. All
the gateways/nodes emulate same backend as target LUN with same WWN
(for multipath representation)
So at client side. we need to execute 3 commands to login all gateways
$ iscsiadm -m discovery -t st -p HOSTy -l
$ iscsiadm -m discovery -t st -p HOSTz -l
$ iscsiadm -m discovery -t st -p HOSTx -l
In the above case, user may login in any fashion, which is out of our
control. Since we have failover multipath configuration, at a given
time only one gateway can TX RX the data. so predicting active
path/connection is not possible.
With this patch,
$ gluster-block create VOL/BLOCK ha 3 HOSTx,HOSTy,HOSTz 10GiB
Creates 3 TPG's, tpg1(portal HOSTx), tpg2(portal HOSTy) and
tpg3(portal HOSTz) on all the three gateways/nodes (IN same order).
Basically, each gateway is define to every other gateway - but the
other (other than local) gateway entries are in a disabled state.
When the client starts the login sequence it issues the RPTG to the
one nodes, but now that node can respond with portal IP's for all of
the gateways.
e.g.
GW1 GW2 GW3
- tpg1/enabled - tpg1/disabled - tpg1/disabled
- tpg2/disabled - tpg2/enabled - tpg2/disabled
- tpg3/disabled - tpg3/disabled - tpg3/enabled
Advantage,
* Only one login command is needed, unlike 3 login's before,
$ iscsiadm -m discovery -t st -p ANYONEHOST -l
* Always tpg1 will be tried for making an active path/connection,
hence we can predict that the first host in the list {HOSTx,HOSTy,HOSTz}
will be tried for active connection. Hence we can be able to better
manage load on each nodes, by selectively supplying Hosts in the list.
Change-Id: I70f73b1d46812cb1bd8dc80f771ec20b0f0415bf
Fixes: #9
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch add support to enable auth while create.
The schematics of authentication setting for/while create, looks like
$ gluster-block create block-test/sample-block ha 1 auth enable \
192.168.0.105 1GiB --json-pretty
{
"IQN":"iqn.2016-12.org.gluster-block:dc6cca79-f9b7-44f5-acaf-ac81c9cc7c2e",
"USERNAME":"dc6cca79-f9b7-44f5-acaf-ac81c9cc7c2e",
"PASSWORD":"ae48635a-6902-454c-949a-f2ad0e056086",
"PORTAL(S)":[
"192.168.0.105:3260"
],
"RESULT":"SUCCESS"
}
Change-Id: Ib8f5ddd904cb879e0ee05f6a7c3c381c6615a0e4
Fixes: #5
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduce or rather implement modify command for
enabling authentication for block devices.
The schematics of authentication setting, looks like
$ gluster-block modify block-test/sample-block auth enable --json-pretty
{
"SUCCESSFUL ON":[
"192.168.0.105"
],
"IQN":"iqn.2016-12.org.gluster-block:8917def2-e90d-4406-8c9c-6d06b6851bbe",
"USERNAME":"8917def2-e90d-4406-8c9c-6d06b6851bbe",
"PASSWORD":"a3e75362-a446-45af-98d0-a1ed7e10d7f0",
"RESULT":"SUCCESS"
}
As an effect it brings changes in 'info' command response, note PASSWORD
$ gluster-block info block-test/sample-block --json-pretty
{
"NAME":"sample-block",
"VOLUME":"block-test",
"GBID":"8917def2-e90d-4406-8c9c-6d06b6851bbe",
"SIZE":1073741824,
"HA":1,
"PASSWORD":"a3e75362-a446-45af-98d0-a1ed7e10d7f0",
"BLOCK CONFIG NODE(S)":[
"192.168.0.105"
]
}
The schematics of auth disabling, looks like
$ gluster-block modify block-test/sample-block auth disable --json-pretty
{
"SUCCESSFUL ON":[
"192.168.0.105"
],
"IQN":"iqn.2016-12.org.gluster-block:add99c38-3c14-42d7-bf23-7d02f388e1e7",
"RESULT":"SUCCESS"
}
Change-Id: I06d095b50401c131ac89cc142497f21d2205164a
Fixes: #5
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is how cli response looks like, on supplying '--json*' flag to cmd-args:
$ gluster-block create block-test/sample-block1 ha 1 localhost.localdomain 1GiB --json
(or)
$ gluster-block create block-test/sample-block2 ha 1 localhost.localdomain 1GiB --json-spaced
{ "IQN": "iqn.2016-12.org.gluster-block:681af106-85f1-4a02-a122-57c80903458c", \
"PORTAL(S)": [ "localhost.localdomain:3260" ], "RESULT": "SUCCESS" }
$ gluster-block create block-test/sample-block3 ha 1 localhost.localdomain 1GiB --json-plain
{"IQN":"iqn.2016-12.org.gluster-block:0fdf6647-57f2-477f-8dd4-54a3de06e410",\
"PORTAL(S)":["localhost.localdomain:3260"],"RESULT":"SUCCESS"}
$ gluster-block create block-test/sample-block4 ha 1 localhost.localdomain 1GiB --json-pretty
{
"IQN":"iqn.2016-12.org.gluster-block:e92ca4a0-5325-4c4b-a407-9e75790e4c7f",
"PORTAL(S)":[
"localhost.localdomain:3260"
],
"RESULT":"SUCCESS"
}
Change-Id: Ie51039e3dee0b3357d2347b4087e0fbe299aa29e
Fixes: #3
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
currently,
GLOBAL CONFIG GROUP
===================
[...]
logfile=hello
-------------
Logfile to use.
[...]
i.e. configshell logs are collected at 'hello' file.
This patch will redirect configshell logs to
'GB_LOGDIR/gluster-block-configshell.log'
Change-Id: I487c6197578c24412fbec72cb8c354725614de59
Fixes: #13
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all generated files and have them generated when needed. This
build a libgbrpcxdr.la archive with the .o files that gets linked into
the libgbrpc.la archive. 'rpcgen' generates .c code that triggers
warnings for various compilers. This is not something that can easily be
fixed, so add rpc-pragmas.h (like GlusterFS does) to prevent these
warnings.
There are some functions used by gluster-blockd.c that are not part of
the header and were manually added to block.h. Because block.h get
regenerated now, these functions have been added to a new file
block_svc.h.
Note that generated and compiled files land in $(top_builddir). This
directory does not need to be the same as $(top_srcdir).
Change-Id: I0e764d159d6d785699537eed4e24b16883218038
Fixes: #2
Signed-off-by: Niels de Vos <ndevos@redhat.com>
|
|
|
|
|
|
|
|
|
| |
portal create with FQDN or hostname seems to be not working i.e.
iscsiadm fails to discover the nodes or the otherway targetcli is unable
to export the LUN right.
Change-Id: Ibe0e2aa1b365d6c74a7974b2faf502d2c2ac38ad
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new parsed output of create and delete command will look like:
$ gluster-block create sample/sample-block ha 2 ${HOST1} ${HOST2} 1GiB
IQN: iqn.2016-12.org.gluster-block:aafea465-9167-4880-b37c-2c36db8562ea
PORTAL(S): ${HOST1}:3260 ${HOST2}:3260
RESULT: SUCCESS
$ gluster-block delete sample/sample-block
SUCCESSFUL ON: ${HOST1} ${HOST2}
RESULT: SUCCESS
Change-Id: Id98e643c62a898a1f7298b6cfeb6ddfa10397b7f
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
currently remote connect(b/w gluster-blockd's) failed cases such as,
ECONNREFUSED
No-one listening on the remote address.
ENETUNREACH
Network is unreachable.
ETIMEDOUT
Timeout while attempting connection ...
are considered as CONFIGFAIL, this patch defend on these errno's.
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
problem:
say because of some reasons create failed to config on node, so it will
log CONFIGFAIL in the metafile. At the time of delete since config
failed it is obvious that block will not exist. since delete cannot find
it now it fails to delete hence returning -1.
solution:
treat delete success if there is no block with given name on that node.
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
| |
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
| |
fix filename in GB_METAUPDATE_OR_GOTO()
i.e change gbid to blockname
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
| |
improve strings
add missing log messages wherever helpful
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
| |
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
| |
partial success is treated as failure.
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
GB_METAUPDATE_OR_GOTO used an already opened glfs fd to update the
meta data, since we have mpath number of threads writing to the same
metadata file simultaneously, this will lead to thread concurrency and
data consistency issues.
Hence this patch protects GB_METAUPDATE_OR_GOTO with a lock and removes
fd sharing by moving glfs_creat/open and glfs_close within the MACRO.
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
| |
Reported-by: Pranith Kumar K <pkarampu@redhat.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|