summaryrefslogtreecommitdiffstats
path: root/rpc
Commit message (Collapse)AuthorAgeFilesLines
* rpc-clnt*: several code changes to reduce conn lock timesYaniv Kaul2018-11-123-55/+25
| | | | | | | | | | | | | | Assorted code refactoring to reduce lock contention. Also, took the opportunity to reorder structs more properly. Removed dead code. Hopefully, no functional changes. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I5de6124ad071fd5e2c31832364d602b5f6d6fe28
* libglusterfs multiple files: remove dead initilizationYaniv Kaul2018-11-111-8/+2
| | | | | | | | | | | | | Per newer GCC releases and clang-scan, some trivial dead initialization (values that were set but were never read) were removed. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: Ia9959b2ff87d2e9cb46864e68ffe7dccb984db34
* all: fix the format string exceptionsAmar Tumballi2018-11-051-2/+2
| | | | | | | | | | | | | | | | Currently, there are possibilities in few places, where a user-controlled (like filename, program parameter etc) string can be passed as 'fmt' for printf(), which can lead to segfault, if the user's string contains '%s', '%d' in it. While fixing it, makes sense to make the explicit check for such issues across the codebase, by making the format call properly. Fixes: CVE-2018-14661 Fixes: bz#1644763 Change-Id: Ib547293f2d9eb618594cbff0df3b9c800e88bde4 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* rpc-transport/socket: NULL pointer dereferencing clang fixShwetha Acharya2018-10-302-3/+3
| | | | | | | | | | | | Problem: ctx and res can be NULL. Solution: introduced a VALIDATE_OR_GOTO statement, hence removed the null check for ctx; added a check for res. Updates: bz#1622665 Change-Id: Ifee4c73e260530ab44c0a34c5ff5568f38f92c94 Signed-off-by: Shwetha Acharya <sacharya@redhat.com>
* transport: log socket closures more verboseMilind Changire2018-10-261-11/+43
| | | | | | | | | | | | Problem: Intentional and unintentional socket closures cannot be identified Solution: Log intentional socket closures with at least INFO log level Change-Id: Ic02c882b16ab2193e57f8c3e6c3a82c4fe0f6875 fixes: bz#1642800 Signed-off-by: Milind Changire <mchangir@redhat.com>
* rpc/rpc-lib: Uninitialized argument value of a functionHarpreet Lalwani2018-10-231-0/+3
| | | | | | | | | | | trav->saved_at.tv_sec is not initialized. Calling "list_empty" function before initializing "trav". Updates: bz#1622665 Change-Id: Ib5c2703a07a9c56ccd115001aca500f7a23c4a2e Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
* rdma: coverity fixesBhumika Goyal2018-10-211-6/+7
| | | | | | | | Fixes CID: 1382442 1382415 1382379 1382355 Change-Id: Ia712e37cb5a6db452d3178386394f87f83b85d38 updates: bz#789278 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* socket: use accept4/paccept for nonblocking socketKrishnan Parthasarathi2018-10-121-16/+6
| | | | | | | | | | | | | | | | | This reduces the no. of syscalls on Linux systems from 2, accept(2) and fcntl(2) for setting O_NONBLOCK, to a single accept4(2). On NetBSD, we have paccept(2) that does the same, if we leave signal masking aside. Added sys_accept which accepts an extra flags argument than accept(2). This would opportunistically use accept4/paccept as available. It would fallback to accept(2) and fcntl(2) otherwise. While at this, the patch sets FD_CLOEXEC flag on the accepted socket fd. BUG: 1236272 Change-Id: I41e43fd3e36d6dabb07e578a1cea7f45b7b4e37f fixes: bz#1236272 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
* socket: set FD_CLOEXEC on all socketsKrishnan Parthasarathi2018-10-111-3/+3
| | | | | | | | | For more information, see http://udrepper.livejournal.com/20407.html BUG: 1236272 Change-Id: I25a645c10bdbe733a81d53cb714eb036251f8129 fixes: bz#1236272 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
* socket: clear return value if error is going to be handled in event threadKinglong Mee2018-10-101-0/+3
| | | | | | Change-Id: Ibce94f282b0aafaa1ca60ab927a469b70595e81f updates: bz#1626313 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* rpc: coverity fixesMilind Changire2018-10-091-1/+1
| | | | | | | | | | | | | CID: [1] 1394646 Unchecked return value from library CID: [2] 1394633 Unused value CID: 1382443 Sleeping while holding a lock [This is intentional] [1] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159112&defectInstanceId=26360786&mergedDefectId=1394646 [2] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159365&defectInstanceId=26360919&mergedDefectId=1394633 Change-Id: I03086f7a9672c9f50a2bc44cdbce0006c887357b updates: bz#789278 Signed-off-by: Milind Changire <mchangir@redhat.com>
* rpc: make binding to port 0 as the default if no option is providedAmar Tumballi2018-10-024-23/+38
| | | | | | | | | | | | | | | | | | | | | | | Right now, if no option is provided, the default port is assumed, which is 24007. Ideally, for 'glusterfsd' processes, it is better to not assume there are any ports given, so it can start listening on any port which is available. This helps us to cleanup the dependencies on glusterd from glusterfsd at the moment. No changes would be done to glusterd code, but making the right defaults helps to make glusterfsd more independent process later. NOTE: This patch is a reduced version of below set of patches: * https://review.gluster.org/14613/ & * https://review.gluster.org/14670/ & * https://review.gluster.org/14671/ Credits: Prasanna Kumar Kalever <pkalever@redhat.com> updates: bz#1343926 Change-Id: Ib874e10505e7366dc56ba754458252b67052e653 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* rpc: failed requests immediately if rpc connection is downKinglong Mee2018-09-271-1/+4
| | | | | | | | | | | | In the case glfs_fini is ongoing, some cache xlators like readdir-ahead, continues to submit requests. Current rpc submit code ignores connection status and queues these internally generated requests. These requests then got cleaned up after inode table has been destroyed, causing crash. Change-Id: Ife6b17d8592a054f7a7f310c79d07af005087017 updates: bz#1626313 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* socket: set 42 as default tpc-user-timeoutXavi Hernandez2018-09-141-3/+3
| | | | | | | | | | | | | | | | | The 'tcp-user-timeout' option is define in the 'socket' module, but it's configured in 'protocol/server' and 'protocol/client', which are the parents of the 'socket' module. However, current options management logic only takes into consideration default values specified in the 'socket' module itself, ignoring values defined in the owner xlator. This patch simply sets the default value of tcp-user-timeout in the 'socket' module so that server and client use the expected value. Change-Id: Ib8ad7c4ac6aac725b01a78f8c3d10cf4063d2ee6 fixes: bz#1628605 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* Land part 2 of clang-format changesGluster Ant2018-09-1220-17095/+16413
| | | | | Change-Id: Ia84cc24c8924e6d22d02ac15f611c10e26db99b4 Signed-off-by: Nigel Babu <nigelb@redhat.com>
* Land clang-format changesGluster Ant2018-09-1221-3129/+3214
| | | | Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
* Modify log message 'DH ciphers are disabled' from ERROR to INFOOmar Kohl2018-09-101-1/+1
| | | | | | | | | | Per the latest comment in bz#1398237 this message is confusing for users because it suggests an error where none exists. Fixes: bz#1626319 Change-Id: I2f05999da157b11e225bf3d95edb597e964f9923 Signed-off-by: Omar Kohl <omarkohl@gmail.com>
* glusterd: Fix Buffer size issuesSanju Rakonde2018-09-041-4/+4
| | | | | | | | This patch fixes buffer size issue 1138522. Change-Id: Ia12fc8f34f75704f8ed3efae2022c4fd67a8c76c updates: bz#789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* multiple files: calloc -> mallocYaniv Kaul2018-09-043-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xlators/cluster/stripe/src/stripe-helpers.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible xlators/cluster/dht/src/tier.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible xlators/cluster/dht/src/dht-layout.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible xlators/cluster/dht/src/dht-helper.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible xlators/cluster/dht/src/dht-common.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible xlators/cluster/afr/src/afr.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible xlators/cluster/afr/src/afr-inode-read.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible tests/bugs/replicate/bug-1250170-fsync.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible tests/basic/gfapi/gfapi-async-calls-test.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible tests/basic/ec/ec-fast-fgetxattr.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible rpc/xdr/src/glusterfs3.h: Move to GF_MALLOC() instead of GF_CALLOC() when possible rpc/rpc-transport/socket/src/socket.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible rpc/rpc-lib/src/rpc-clnt.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible extras/geo-rep/gsync-sync-gfid.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible cli/src/cli-xml-output.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible cli/src/cli-rpc-ops.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible cli/src/cli-cmd-volume.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible cli/src/cli-cmd-system.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible cli/src/cli-cmd-snapshot.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible cli/src/cli-cmd-peer.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible cli/src/cli-cmd-global.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible It doesn't make sense to calloc (allocate and clear) memory when the code right away fills that memory with data. It may be optimized by the compiler, or have a microscopic performance improvement. In some cases, also changed allocation size to be sizeof some struct or type instead of a pointer - easier to read. In some cases, removed redundant strlen() calls by saving the result into a variable. 1. Only done for the straightforward cases. There's room for improvement. 2. Please review carefully, especially for string allocation, with the terminating NULL string. Only compile-tested! updates: bz#1193929 Original-Author: Yaniv Kaul <ykaul@redhat.com> Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Signed-off-by: Amar Tumballi <amarts@redhat.com> Change-Id: I16274dca4078a1d06ae09a0daf027d734b631ac2
* Various files: strncpy()->sprintf(), reduce strlen()'sYaniv Kaul2018-08-311-4/+6
| | | | | | | | | | | | | | | | | | | | strncpy may not be very efficient for short strings copied into a large buffer: If the length of src is less than n, strncpy() writes additional null bytes to dest to ensure that a total of n bytes are written. Instead, use snprintf(). Check for truncated output where applicable. Also: - save the result of strlen() and re-use it when possible. - move from strlen to SLEN (sizeof() ) for const strings. Compile-tested only! Change-Id: I54e80d4f4a80e98d3775e376efe05c51af0b29eb updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* rpc: log fuse unique ID along with gluster XIDMilind Changire2018-08-301-8/+12
| | | | | | | | | | for better traceability between fuse requests and gluster requests a mapping needs to be established in the logs between the two IDs BUG: 1623408 Change-Id: I0ef82fe69c1ad7d0ce9e3ac4f35cd82aa6e9bca9 fixes: bz#1623408 Signed-off-by: Milind Changire <mchangir@redhat.com>
* rpc/rpc-lib/src/rpc-clnt-ping.c:move to GF_MALLOC() instead of GF_CALLOC() whenYaniv Kaul2018-08-231-1/+1
| | | | | | | | | | | | | | | | It doesn't make sense to calloc (allocate and clear) memory when the code right away fills that memory with data. It may be optimized by the compiler, or have a microscopic performance improvement. Please review carefully, especially for string allocation, with the terminating NULL string. Only compile-tested! Change-Id: Ifb30412ddf1bfa509f52e0454454929b266e5658 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* mgmt/glusterd: Code cleanup in glusterd-volgen.cVijay Bellur2018-08-191-0/+2
| | | | | | | | | | | | | | | This patch does the following: 1. Addresses CID: 1124815,124816,1124833,1291724,1325535,1325536,1357858 - by adding some null checks - by handling return values from functions - by using an appropriate buffer length in strncpy 2. Cleans up some commented code Change-Id: I5a7079f34e3e460d5a6267734c3bc84bf4ad72f5 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* All: remove memset() before sprintf()Yaniv Kaul2018-08-142-2/+0
| | | | | | | | | | | | It's not needed. There's a good chance the compiler is smart enough to remove it anyway, but it can't hurt - I hope. Compile-tested only! Change-Id: Id7c054e146ba630227affa591007803f3046416b updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* Fix a grammar error in the logsNigel Babu2018-08-131-1/+1
| | | | | | Change-Id: Ie4fe18d5094c051fa20de71f7fc841085cc6aaee Fixes: bz#1614142 Signed-off-by: Nigel Babu <nigelb@redhat.com>
* socket: Remove code duplicationKrutika Dhananjay2018-08-021-69/+13
| | | | | | | | | | | | | While I was reading code, I saw that socket_submit_request() and socket_submit_reply() are identical except for @a_byte and the source of @msg object being different. This patch moves all of the common code to a new function with the differing vars passed as parameters by the callers. Change-Id: I7a62ae72f10c34dc8de01b250d89a77ec5ab490d fixes: bz#1608991 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* rpc: fix return value in rpc destroyZhang Huan2018-07-281-0/+2
| | | | | | Change-Id: I73a113e2d40f508fd53b273a990a2371692c87bf fixes: bz#1607689 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* rpc: add missing free of rpc->dnscacheZhang Huan2018-07-281-0/+8
| | | | | | Change-Id: I3fa97b99bf23459cf548205d75d2cc7936b2310e fixes: bz#1607689 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* build: rename event.h to gf-event.hNiels de Vos2018-07-274-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Newer FreeBSD versions (noticed with 10.3-RELEASE) provide a event.h file that on occasion gets included instead of the libglusterfs file. When this happens, 'struct event_pool' will not be defined and building will fail with errors like: autoscale-threads.c:18:55: error: incomplete definition of type 'struct event_pool' int thread_count = pool->eventthreadcount; ~~~~^ autoscale-threads.c:17:16: note: forward declaration of 'struct event_pool' struct event_pool *pool = ctx->event_pool; ^ This problem is caused by 'pkg-config --cflags uuid' that adds /usr/local/include to the GF_CPPFLAGS. The use of libuuid is preferred so that the contrib/uuid/ directory can be removed. By renaming event.h to gf-event.h there is no conflict between the different event.h files anymore and compiling on FreeBSD works without issues. Change-Id: Ie69f6b8a4f8f8e9630d39a86693eb74674f0f763 Updates: bz#1607319 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* rpc: merge ssl infra with epoll infraMilind Changire2018-07-272-748/+814
| | | | | | | | | | | | | | | | | Patch attempts to use the epoll infra for handling SSL connections as well instead of the socket_poller() thread func. This essentially makes priv->own_thread flag redundant. SSL_connect()/SSL_accept() is now non-blocking which has done away with the localised poll() in ssl_do(). So, ssl_do() has been updated appropriately. own_thread and coincidently socket_poller() thread for SSL processing is now deprecated. Change-Id: I1ce54c06ddb643c16baa143598e7e4fbf16bae0a fixes: bz#1561332 Signed-off-by: Milind Changire <mchangir@redhat.com>
* rpc: rpc_clnt_connection_cleanup is crashed due to double freeMohit Agrawal2018-07-251-3/+17
| | | | | | | | | | | | | Problem: gfapi client is getting crashed in rpc_clnt_connection_cleanup at the time of destroying saved_frames Solution: gfapi client is getting crashed because saved_frame ptr is already freed in rpc_clnt_destroy.To avoid the same update code in rpc_clnt_destroy Change-Id: Id8cce102b49f26cfd86ef88257032ed98f43192b fixes: bz#1607783 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* All: run codespell on the code and fix issues.Yaniv Kaul2018-07-227-13/+14
| | | | | | | | | | | | Please review, it's not always just the comments that were fixed. I've had to revert of course all calls to creat() that were changed to create() ... Only compile-tested! Change-Id: I7d02e82d9766e272a7fd9cc68e51901d69e5aab5 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* changelog: fix br-state-check.t crash for brick_muxMohit Agrawal2018-07-111-2/+3
| | | | | | | | | | | | Problem: br-state-check.t is getting crash Solution: Check condition in rpcsvc_request_create before allocate memory from rxpool BUG: 1597776 Change-Id: I4fde1ade6073f603c32453f1840395db9a9155b7 fixes: bz#1597776 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* Fix compile warningsXavi Hernandez2018-07-102-9/+18
| | | | | | | | | | | This patch fixes compile warnings that appear with newer compilers. The solution applied is only to remove the warnings, but it doesn't always solve the problem in the best way. It assumes that the problem will never happen, as the previous code assumed. Change-Id: I6e8470d6c2e2dbd3bd7d324b5fd2f92ffdc3d6ec updates: bz#1193929 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* rpc/clnt: Don't let consumers manage "connected" stateRaghavendra G2018-06-043-53/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state management of "connected" in rpc is ad-hoc as far as the responsibility goes. Note that there is nothing wrong with functionality itself. rpc layer manages this state in disconnect codepath and has exposed an api to manage this one from consumers. Note that rpc layer never sets "connected" to true by itself, which forces the consumers to use this api to get a working rpc connection. The situation is best captured from a comment in code from Jeff Darcy in glusterfsd/src/gf-attach.c: -/* - * In a sane world, the generic RPC layer would be capable of tracking - * connection status by itself, with no help from us. It might invoke our - * callback if we had registered one, but only to provide information. Sadly, - * we don't live in that world. Instead, the callback *must* exist and *must* - * call rpc_clnt_{set,unset}_connected, because that's the only way those - * fields get set (with RPC both above and below us on the stack). If we don't - * do that, then rpc_clnt_submit doesn't think we're connected even when we - * are. It calls the socket code to reconnect, but the socket code tracks this - * stuff in a sane way so it knows we're connected and returns EINPROGRESS. - * Then we're stuck, connected but unable to use the connection. To make it - * work, we define and register this trivial callback. - */ Also, consumers of rpc know about state of connection only through the notifications sent by rpc-clnt. So, consumers don't have any extra information to manage the state and hence letting them manage the state is counter intuitive. This patch cleans that up and instead moves the responsibility of state management of rpc layer into itself. Change-Id: I31e641a60795fc480ca753917f4b2579f1e05094 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Fixes: bz#1585585
* rpc: Don't reset auth_value in disconnectKotresh HR2018-05-241-12/+48
| | | | | | | | | | | | | The auth_value was being reset to AUTH_GLUSTERFS_v2 during rpc disconnect. It shoud not be reset. The disconnect during portmap request can race with handshake. If handshake happens first and disconnect later, auth_value would set to default value and it never sets back to actual auth_value fixes: bz#1579276 Change-Id: Ib46c9e01a97f6defb3fd1e0423fdb4b899b4a361 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* rpc: set listen-backlog to high valueMilind Changire2018-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | Problem: On node reboot, when glusterd starts volumes rapidly, there's a flood of connections from the bricks to glusterd and from the self-heal daemons to the bricks. This causes SYN Flooding and dropped connections when the listen-backlog is not enough to hold the pending connections to compensate for the rate at which connections are accepted by the RPC layer. Solution: Increase the listen-backlog value to 1024. This is a partial solution. Part of the solution is to rearm the listener socket early for quicker accept() of connections. See commit 6964640a977cb10c0c95a94e03c229918fa6eca8 (change 19833) Change-Id: I62283d1f4990dd43839f9a6932cf8a36effd632c fixes: bz#1564600 Signed-off-by: Milind Changire <mchangir@redhat.com>
* rpc: rearm listener socket earlyMilind Changire2018-04-071-3/+3
| | | | | | | | | | | | | | | Problem: On node reboot, when glusterd starts volumes, a setup with a large number of bricks might cause SYN Flooding and connections to be dropped if the connections are not accepted quickly enough. Solution: accept() the connection and rearm the listener socket early to receive more connection requests as soon as possible. Change-Id: Ibed421e50284c3f7a8fcdb4de7ac86cf53d4b74e fixes: bz#1564600 Signed-off-by: Milind Changire <mchangir@redhat.com>
* rpc: update tirpc registration to "force" unregister old mapping before ↵Shreyas Siravara2018-03-282-0/+8
| | | | | | | | | | | | re-registering > Reviewed-on: https://review.gluster.org/16849 > Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I05ed6b7c715a71e5819fbe8116e7c3146010f836 BUG: 1521030 Signed-off-by: Kevin Vigor <kvigor@fb.com> Signed-off-by: Amar Tumballi <amarts@redhat.com>
* rpc: simplify parameters when a saved frame is forced to unwindZhang Huan2018-03-281-4/+2
| | | | | | | | | When a saved frame is to be forced unwind, there is no need to pass an empty iovector without any data pointed to. Change-Id: I6e858fb38644326e22239b83272b15db656035e5 BUG: 1523122 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* rpc: fix incorrect return value when xdr decode failsZhang Huan2018-03-281-1/+0
| | | | | | | | | | | | | xdr_replymsg is called to decode reply message, and it returns failure if the message is corrupted. However, retrieving return value from the global errno is 0 even xdr_replymsg fails. Fix this issue by simply returning a negative value if call to xdr_replymsg fails. Change-Id: I2b9a1dc97652fbb6cf6568ea617f120713784a55 BUG: 1523122 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* socket: Improve error logging when loading SSL files failsNiklas Hambüchen2018-03-211-2/+6
| | | | | | | | | | * Say which file had the problem * Dump openssl error stack Fixes gluster/glusterfs#431. Change-Id: I66e9a0ae7758e9d7d8a5f19cc8ff898f01f2b491 Signed-off-by: Niklas Hambüchen <mail@nh2.me>
* glusterd: TLS verification fails while using intermediate CAMohit Agrawal2018-03-191-4/+8
| | | | | | | | | | | | | | | | | | | | | Problem: TLS verification fails while using intermediate CA if mgmt SSL is enabled. Solution: There are two main issue of TLS verification failing 1) not calling ssl_api to set cert_depth 2) The current code does not allow to set certificate depth while MGMT SSL is enabled. After apply this patch to set certificate depth user need to set parameter option transport.socket.ssl-cert-depth <depth> in /var/lib/glusterd/secure_acccess instead to set in /etc/glusterfs/glusterd.vol. At the time of set secure_mgmt in ctx we will check the value of cert-depth and save the value of cert-depth in ctx.If user does not provide any value in cert-depth in that case it will consider default value is 1 BUG: 1555154 Change-Id: I89e9a9e1026e37efb5c20f9ec62b1989ef644f35 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* cleanup: xlator_t structure's 'client_latency' variable is not usedSven Fischer2018-03-191-2/+0
| | | | | | | | | | | | | | | | | - Removed unused struct member and its one time usage. - cleaned up wrong white space member 'client_latency' was not used otherwise since it was added by commit 07cc8679cdf3b29680f4f105d0222da168d8bfc1 Author: Kevin Vigor <kvigor@fb.com> Date: Tue Mar 21 08:23:25 2017 -0700 Halo Replication feature for AFR translator Change-Id: Ibb0ea828d4090bbe8897f6af326b317884162a00 BUG: 1495153 Signed-off-by: Sven Fischer <sven@fischer-abc.de>
* build: address linkage issuesKaleb S. KEITHLEY2018-03-056-1/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have the following undefined symbol error from protocol/server.so: glusterfs_mgmt_pmap_signout glusterfs_autoscale_threads See https://review.gluster.org/19225 (bz#1532238) and https://review.gluster.org/19657 (bz#1550895) (why are there two different bzs for the same bug?) IMO this is a cleaner solution. I.e. moving the above two functions to libgfrpc (.../rpc/rpc-lib/...) I would also, for (foolish) consistency sake, like to see glusterfs_mgmt_pmap_signin() moved from glusterfsd to libgfrpc as well. This works on f28/rawhide, with its new, more restrictive run-time link semantics. The smoke and regression tests on earlier fedora and centos will confirm that it works on those platforms too. Change-Id: I9cfbd1cc15e7ebd9fc31b56ac791287fa2c584de BUG: 1550895 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* rpcsvc: scale rpcsvc_request_handler threadsMilind Changire2018-02-263-17/+123
| | | | | | | | | | | | Scale rpcsvc_request_handler threads to match the scaling of event handler threads. Please refer to https://bugzilla.redhat.com/show_bug.cgi?id=1467614#c51 for a discussion about why we need multi-threaded rpcsvc request handlers. Change-Id: Ib6838fb8b928e15602a3d36fd66b7ba08999430b Signed-off-by: Milind Changire <mchangir@redhat.com>
* socket: options update for GD2Mohit Agrawal2018-02-191-4/+36
| | | | | | | All socket options update for GD2 Change-Id: I227c16965e92018a5ab5aacd9c2617fb2735268c Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* Fetch backup volfile servers from glusterd2Prashanth Pai2018-02-161-0/+5
| | | | | | | | | | | | | | | | Clients will request for a list of volfile servers from glusterd2 by setting a (optional) flag in GETSPEC RPC call. glusterd2 will check for the presence of this flag and accordingly return a list of glusterd2 servers in GETSPEC RPC reply. Currently, this list of servers returned only contains servers which have bricks belonging to the volume. See: https://github.com/gluster/glusterd2/issues/382 https://github.com/gluster/glusterfs/issues/351 Updates #351 Change-Id: I0eee3d0bf25a87627e562380ef73063926a16b81 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* rpc: Adds rpcbind6 programs to libgfrpc symbolsSheena Artrip2018-02-131-0/+2
| | | | | | | | | | | | | Building with --with-default-ipv6 causes shared components of gluster calling the rpcbind6 functions to fail. Adding the symbols in the list is all that is necessary. Building without ipv6 keeps the same behavior. No test cases as this is a build-specific fix. Change-Id: I248d3291bf17326b07d152d9b79cdcfaf9068f0d BUG: 1544961 Signed-off-by: Sheena Artrip <sheenobu@fb.com>
* protocol: utilize the version 4 xdrAmar Tumballi2018-02-013-2/+151
| | | | | | | updates #384 Change-Id: Id80bf470988dbecc69779de9eb64088559cb1f6a Signed-off-by: Amar Tumballi <amarts@redhat.com>