387 Commits

Author SHA1 Message Date
Venkatesh Somyajulu
1cc57ff832 rpc: For AF_UNIX sockets, do not set keepalive option.
Change-Id: I65df52e89fe7783ff00c2b7a49be571d15e8f0d0
BUG: 920009
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4684
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-03-18 21:30:49 -07:00
Rajesh Amaravathi
8403f9a2d9 rpc: change dict key for fqdn
changed the key from "client.fqdn", which could be wrongly
construed as belonging to protocol/client, to "fqdn".

Change-Id: Ib5f4a875a00b99cd903a29da19bafeb70baaab4e
BUG: 906119
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4536
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-02-18 09:34:16 -08:00
Raghavendra Bhat
614529c591 rpc: bring in root-squashing behavior in rpc
* requests coming in as root are converted to nfsnobody

* with open-behind some acl checks wont happen and nfsnobody
  can read the file "whose owner is root and other users do not
  have permission to read the file". This is becasue open-behind
  does not send the open to the brick and sends success to the
  application, thus the acl related tests on the file wont happen
  which would have prevented the file from being opened.

Change-Id: I73afbfd904f0beb3a2ebe807b938ac2fecd4976b
BUG: 887145
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4516
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 12:01:55 -08:00
Anand Avati
d3e7881ecd Use proper libtool option -avoid-version instead of bogus -avoidversion
Change-Id: I1c9541058c7d07786539a3266ca125a6a15287d8
BUG: 859835
Signed-off-by: Anand Avati <avati@redhat.com>
Original-author: Kacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com>
Signed-off-by: Kacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com>
Reviewed-on: http://review.gluster.org/3967
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-02-07 15:12:56 -08:00
Rajesh Amaravathi
0b7cdbf50d rpc: get hostnames of client to allow FQDN based authentication
If FQDNs are used to authenticate clients, then from
this commit forth, the client ip(v4,6) is reverse looked up
using getnameinfo to get a hostname associated with it,
if any, thereby making FQDN-based rpc authentication possible.

Change-Id: I4c5241e7079a2560de79ca15f611e65c0b858f9b
BUG: 903553
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4439
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 16:15:54 -08:00
Rajesh Amaravathi
2197c8b414 nfs/nlm: use req's uid and gid for open_and_resume
Previously, NLM was setting the frame->root->{uid,gid}
to root by default. This causes permission problems with
root squashing for lock calls. Now, we obtain the uid and
gid from rpc request. And duplicate #defines are removed
from rpcsvc.h

Change-Id: I5d6c87aed8d04aab2619bb913408048c0a02d1e7
BUG: 906884
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4466
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 16:14:55 -08:00
Raghavendra G
c2953ea34c rpcsvc/dump: return correct return value
fix e8d09b9ab9 resulted in rpcsvc_dump returning large non-zero
values to caller in case of success. This patch fixes that issue
by returning 0

Change-Id: I594703dada74da17b33c98b073627a3378d170c5
BUG: 903113
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/4477
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 13:02:47 -08:00
Kaushal M
d831290deb glusterd: Use client-op-versions during "volume set"
The supported op-versions of the client and the name of the requested volume,
are saved during server_getspec(). These are used during the staging of volume
set. If the option being set is not supported by any of the clients which
currently have the volume mounted, then set will fail.

Change-Id: I4e6b60b274d5200508762dc0204cfa848a6c0aa4
BUG: 907311
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4424
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 12:17:49 -08:00
Raghavendra G
e8d09b9ab9 rpcsvc: Fix memory corruption caused by rpcsvc_dump returning non-zero
The convention followed is that any actor should return non-zero
value only if it has not attempted to send the reply back. If an
actor returns non-zero, rpcsvc_handle_rpc_call tries to send an
error reply. Since, rpcsvc_submit_generic frees the rpc_req, its wrong
to invoke it more than once on same rpc_req. When the transport is not
connected, rpcsvc_dump used to pass the non-zero value it got from
 transport to rpcsvc resulting in memory corruption. Hence this patch
makes rpcsvc_dump to return 0.

Change-Id: I1b6f28969ee546c44d193d3d33debccb65585b69
BUG: 903113
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/4183
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2013-02-05 13:35:16 -08:00
Jeff Darcy
26d9d2bd27 socket: restructure disconnect/poll-thread interactions
Change-Id: I792c28f52068e4ed666069b740739662685160bc
BUG: 906401
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4456
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-03 12:09:54 -08:00
Jeff Darcy
fed0752313 socket: null out priv->ssl_ssl on disconnect
This prevents problems when a socket transport is reused for a non-SSL
connection (e.g. glusterd portmapper) after having been used for an SSL
connection (e.g. a brick).  In that case, ssl_ssl will still be non-null from
the first connection, even though the structure it points to has actually been
freed.

I'm not sure why/how we would reuse a socket transport in this way (the case of
SSL after non-SSL has been common for a long time) but recent glusterd changes
seem to have had that effect.

Change-Id: I46f1ff3c409c122478bf720a7f02d92abcc32bed
BUG: 902684
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4449
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 10:01:01 -08:00
Amar Tumballi
4faeedc992 "gcc -pedantic": made 'inline' functions as 'static inline' functions
for passing the build with -pedantic flag

Change-Id: I80fd9528321e4c6ea5bec32bf5cdc54cc4e4f65e
BUG: 875913
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.org/4186
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-23 11:12:15 -08:00
Avra Sengupta
777d395fea core: fixes for gcc's '-pedantic' flag build
* warnings on 'void *' arguments
* warnings on empty initializations
* warnings on empty array (array[0])

Change-Id: Iae440f54cbd59580eb69f3ecaed5a9926c0edf95
BUG: 875913
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4219
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-21 22:17:36 -08:00
Rajesh Amaravathi
9036bd1a7b nlm: use virtual ip of server to connect to client
In cases where the servers use virtual ip's, this commit
makes sure we use them and not the physical ip.

This change also refactors code around nlm4_establish_callback
by sending granted msg only after a connection establishment,
and removing the separate thread creation.

Change-Id: I087362c547a25aa52ef7fc6653845a3863466ee6
BUG: 888283
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4326
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-01-18 03:50:33 -08:00
Krishnan Parthasarathi
a65a482dc2 socket: Don't log readv failures if read-fail-log is false
Change-Id: I6903d62cbc7107eb8498bcd81d07667b36890a02
BUG: 764888
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4377
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-01-15 02:25:11 -08:00
Raghavendra G
439166bd0a rpc-transport/rdma: use 24008 as default listen port.
Change-Id: I021d5e2dbe3653d4303b64fe1ada0556cd4b7966
BUG: 878883
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/4323
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-18 15:42:58 -08:00
Kaushal M
07c40a2d14 rpcsvc: Add an extra log message
Adds an extra log message in rpcvsc_check_and_reply_error().
Also, makes a small change in the test-script.

Change-Id: I2b686e6fa86529cc4fbf0066df64057a9784b849
BUG: 884452
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4285
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-10 14:09:15 -08:00
Kaushal M
ff33ea5175 rpcsvc: do a 'iobuf_ref()' on buffer while synctaskizing actor
Starting rpc actors using synctask causes rpcsvc to return before the actor
actually finishes its actions. This would cause the buffer to be unreffed by
socket and be possibly reused, before the actor used it, leading to failures
in the actor.
This patch makes rpcsvc take a ref on the buffer when synctaskizing the actor
and store it in the request structure, and then later unref it when the request
structure is destroyed. This makes sure that the buffer is not reused before the
actor has finished.

Change-Id: I8f81e1fef8f3719db220471d2d8ffb8916958956
BUG: 884452
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4277
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-09 21:59:41 -08:00
Anand Avati
6d1607becc Revert "glusterd: add "volume label" command"
This reverts commit dad16a51ba7e6b1c57529423c57257dbce97ee93

Test script causing "silent" failures during execution.

Change-Id: I26dbb8ed22256071cb415cc3aff572ef8372600e
Reviewed-on: http://review.gluster.org/4268
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 16:27:48 -08:00
Anand Avati
98879ebddd rpc-transport/socket: implement read-ahead of RPC headers
This reduces the number of read() system calls on the socket to
complete the full RPC fragment reading.

Change-Id: I421a53af195ead4aad70e09e0172a61ad7912d83
BUG: 821087
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/3855
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-12-04 14:46:04 -08:00
Jeff Darcy
924702de35 glusterd: add "volume label" command
This command is necessary when the local disk/filesystem containing a brick
is unexpectedly lost and then recreated.  Since 961bc80c, trying to start
the brick will fail because the trusted.glusterfs.volume-id xattr is
missing, and if we can't start it then we can't replace-brick or self-heal
so we're stuck in a permanently degraded state.  This command provides a
way to label the empty brick with the proper volume ID so that further
repair actions become possible.

Change-Id: I1c1e5273a018b7a6b8d0852daf111ddc3fddfdc2
BUG: 860297
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4259
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 14:42:30 -08:00
Raghavendra Bhat
fa1607ea59 socket,rdma: before binding to any port check if it is a reserved port
* The list of ports which are reserved is obtained by reading the file
  /proc/sys/net/ipv4/ip_local_reserved_ports.

Change-Id: I3a832f53efbb79dd719b34a30cbaf28269f25816
BUG: 762989
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4131
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-12-03 03:02:55 -08:00
Rajesh Amaravathi
ab52eb7d9f core: remove ref/unref while unwinding frames
Change-Id: Ib196ffdf8122a9510cc7c5953303a6e730091302
BUG: 853373
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4062
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-11-30 00:01:53 -08:00
M. Mohan Kumar
983d290f7b BD Backend: CLI to create a full/linked clone of a image
A new CLI command added to support cloning/snapshotting of a LV device

Syntax is:
$ gluster bd clone <volname>:<vg>/<lv> <newlv>

$ gluster bd snapshot <volname>:<vg>/<lv> <snap_lv> <size>

BUG: 805138
Change-Id: Idc2ac14525a3998329c742bf85a06326cac8cd54
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/3719
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-29 09:40:14 -08:00
M. Mohan Kumar
3c72850e8d BD Backend: CLI commands to create/delete image
Cli commands  added to create/delete a LV device.

The following command creates lv in a given vg.
$ gluster bd create <volname>:<vgname>/<lvname> <size>

The following command deletes lv in a given vg.
$ gluster bd delete <volname>:<vgname>/<lvname>

BUG: 805138
Change-Id: Ie4e100eca14e2ee32cf2bb4dd064b17230d673bf
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/3718
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-29 09:39:53 -08:00
Raghavendra Bhat
fbfcb0ad2a glusterd, cli: implement gluster system uuid reset command
A commonly faced problem among glusterfs users is: after a fresh
installation of glusterfs in a virtual machine, the VM image is
cloned to make multiple instances of the server. This breaks
glusterd because right after glusterfs installation on the first
boot glusterd would have created the node UUID and this gets
inherited into the clone. The result is wierd behavior at the time
of peer probe where glusterd does not (yet) deal with UUID
collisions in a user friendly way.

To handle it gluster peer reset command is implemented which upon
execution changes the uuid of local glusterd.

Change-Id: If207dd2ad93ab94ef1a3253f409c21c442975f87
BUG: 811493
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/3637
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-11-28 16:28:55 -08:00
Pranith Kumar K
7c23a94516 mgmt/glusterd: Implementation of server-side quorum
Feature-page:
http://www.gluster.org/community/documentation/index.php/Features/Server-quorum

Change-Id: I747b222519e71022462343d2c1bcd3626e1f9c86
BUG: 839595
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.org/3811
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-23 23:14:50 -08:00
Jeff Darcy
4a8f751b7c socket: fix double-free when ssl_setup_connection fails
Change-Id: I893b166da28f4c21e582ed477399c4bc0c1d20e1
BUG: 877903
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4208
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-23 02:10:43 -08:00
Krishna Srinivas
1c4cb52377 ACLv3 - Access Control Lists V3
Change-Id: I43e544d6cdeac5e3880141477461e7c22cbf6e91
BUG: 847622
Signed-off-by: Krishna Srinivas <ksriniva@redhat.com>
Reviewed-on: http://review.gluster.org/4045
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-11-13 23:24:46 -08:00
Jeff Darcy
128514fcb7 socket: fix SSL breakage from re/connect handling changes
Change-Id: Ia1f5aeec5628b61cad8a10a9cdc6d9f1c67ec653
BUG: 873367
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4158
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-12 07:17:13 -08:00
Kaushal M
d7cc779da4 glusterd: op-version handshake implementation
Brings in a new rpc program MGMT_HANDSHAKE, which implements the op-version
handshake. This is required for bringing in the op-version feature as described
in http://www.gluster.org/community/documentation/index.php/Features/Opversion

Change-Id: I4333fd2714dbbd3a2a3fca5862cbb3c56615529e
BUG: 814534
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/3688
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-10-30 10:18:58 -07:00
Raghavendra Bhat
8952b2729d glusterd: do not log rdma not found messages in error mode
Change-Id: Ie35b05ed2ee004bd6479ccdd3459cbcd9cf8c208
BUG: 867313
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4094
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-10-23 07:31:47 -07:00
Raghavendra G
92754cd1d1 client-handshake: synchronize config.remote_port setting b/w
rpc_clnt_reconnect and client_query_portmap_cbk

problem:
-------
Theoretically there is a possibility that we could complete
querying the remote brick's port number before rpc_transport_connect
can return. If rpc_clnt_reconnect happens to be the caller of
rpc_transport_connect and we've already got the remote brick's port
number by the time rpc_transport_connect returns, without synchronization,
rpc_clnt_connect resets config.remote_port to zero even before we have
attempted a connection with remote brick.

fix:
---
By making only poll thread do setting and resetting of
config.remote_port, we avoid the race-condition.

Change-Id: I51879ba1cac651a80ff5c9c070ec7fe1ceea9e05
BUG: 765051
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/4044
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-11 16:35:52 -07:00
Jeff Darcy
565cf6625d build: libraries must be in LDADD/LIBADD
Libraries must not be listed in LDFLAGS, because _order is important_.
Details see
http://stackoverflow.com/questions/4241683/linker-flags-in-wrong-place
http://www.gentoo.org/proj/en/qa/asneeded.xml#doc_chap2_sect3

Change-Id: I0479456d6702748c555031bb20641ce430732ec7
BUG: 862082
Original-author: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4030
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-03 12:32:14 -07:00
Jeff Darcy
58e6296fa2 build: split CPPFLAGS from CFLAGS
Automake provides a separate variable for preprocessor flags
(*_CPPFLAGS). They are already uses in a few places, so make it
consistent and use it everywhere. Note that cflags obtained from
pkg-config often are cppflags, which is why LIBXML2_CFLAGS moves with
into AM_CPPFLAGS, for example.

Change-Id: I15feed1d18b2ca497371271c4b5876d5ec6289dd
BUG: 862082
Original-author: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4029
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-03 12:26:45 -07:00
Jeff Darcy
1ecbb7ca68 build: remove useless explicit -fPIC -shared from
CFLAGS

libtool will automatically add "-fPIC" to the compiler command line as
needed, so there is no need to specify it separately.

"-shared" is normally a linker flag and has an odd effect when used with
libtool --mode=compile, namely that it inhibits production of static
objects. For that however, using AC_DISABLE_STATIC is a lot simpler.

Change-Id: Ic4cba0fad18ffd985cf07f8d6951a976ae59a48f
BUG: 862082
Original-author: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4027
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-03 12:24:59 -07:00
Jeff Darcy
04371377f2 build: remove -nostartfiles flag
The "-nostartfiles" is a discouraged option and is documented to
potentially result in undesired behavior. Since I see no reason why it
should be in glusterfs, remove it.

Change-Id: I56f2b08874516ebad91447b2583ca2fb776bb7ab
BUG: 862082
Original-author: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4018
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-02 13:11:43 -07:00
Jeff Darcy
9059a76c67 build: consolidate common compilation flags into one variable
Some -D flags are present in all files, so collect them.
This adds -D${GF_HOST_OS} to some compiler command lines,
but this should not be a problem.

Change-Id: I1aeb346143d4984c9cc4f2750c465ce09af1e6ca
BUG: 862082
Original-author: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4013
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-01 16:44:50 -07:00
Varun Shastry
1ee65fe16f Fixed some general typing errors.
Eg: changed recieved to received

Change-Id: I360fcb99c97c8a0222e373fee20ea2fccfb938db
BUG: 860543
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/3998
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-09-27 11:20:20 -07:00
Anand Avati
38afd84faa rpcsvc: framework for executing actors as synctask
An rpcsvc_program can be registered by setting .synctask field
to 1 which will make actors of that program be executed in a
synctask, thus freeing up the rpc/poll thread while the actor
executes.

Change-Id: Idacef2ad3bcae0f354fd0fc16ca06ba7094d7b98
BUG: 762935
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/3833
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-09-19 23:18:08 -07:00
Varun Shastry
f7342ad3a9 Clean up of typepunning errors ( Strict aliasing warnings )
Change-Id: I48733967facc526fb523a8dc9bd068f8c5cc5971
BUG: 764282
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/3950
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-09-17 21:19:37 -07:00
Varun Shastry
54b71368ef rpc/socket: Wrong Log-File Error-Message
Problem:
The port changed in rpc-clnt.c:rpc_clnt_reconfig was not being
updated to the variable peerinfo.identifier before the logging.

Change-Id: Ic56a74738c6f7664e9719b125a014126cea69141
BUG: 847211
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/3894
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Shishir Gowda <sgowda@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-09-05 08:21:04 -07:00
Deepak C Shetty
058a736f9e Add support for --enable-debug configure option
Currently default build adds -g -O2 to CFLAGS unconditionally
and there is no way to control them from configure.

This patch adds support for --enable-debug option to the
configure cmdline.

If yes, then only -g is added. If no, then -g -O2 is added.
Build defaults to --enable-debug=no.

Also fixes couple of Makefile.am's which had -g hardcoded.

v2:
   Adds -O0 for debug=yes case.
v3:
   Added bugID while submitting patch

Change-Id: I7505619be6fc683de463a0bd44ba5500b0bedfe1
BUG: 851092
Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
Reviewed-on: http://review.gluster.org/3822
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Deepak Shetty <dpkshetty@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-08-23 03:08:06 -07:00
Amar Tumballi
99a0fcb7a4 socket: code cleanup
* for more review friendly way

* reduce the level of indirections at each line.

Change-Id: I82ace7683fb281d97a64da724f054ece28215054
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 764890
Reviewed-on: http://review.gluster.org/3839
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-08-23 02:17:43 -07:00
Anand Avati
fb1d42df16 rpcsvc: remove .vector_actor and related changes
The .vector_actor method of rpcsvc_actor_desc is defunct now after
rpc unification. Remove the field and all related usage of it.

Change-Id: I53048cebeae78f50259e8c4a7fec3497691fe388
BUG: 762935
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/3832
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-08-20 20:41:11 -07:00
Kaleb S. KEITHLEY
623dbe5afc misleading/wrong keep-alive error message in log
Gluster NFS and brick logs contain the following log entries:

[2012-08-16 09:23:39.498998] W [socket.c:410:__socket_keepalive] 0-socket: failed to set keep idle on socket 8
[2012-08-16 09:23:39.499049] W [socket.c:1876:socket_server_event_handler] 0-socket.glusterfsd: Failed to set keep-alive: Operation not supported
[2012-08-16 09:23:42.673756] I [client-handshake.c:1636:select_server_supported_

Stepping through the code though, setting keep-alive did actually work,
it's the keep-idle that failed.

The actual problem is setting keep-idle on non-AF_INET sockets results
in the spurious error message in the log.

BUG: 848882
Change-Id: I3a54c96aea0642307f17a7945cca9f9438543243
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3823
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-08-19 09:28:53 -07:00
Kaushal M
6930c6950f rpc: Reduce frame-timeout for glusterd connections
Reduce frame-timeout for glusterd connections from 30mins to 10 mins. 30mins is
too long when compared to cli timeout of 2mins. Changing to 10mins reduces the
disparity between cli and glusterd.

Also, fix glusterfs_submit_reply() so that a reply is sent even if serialize
failed.

Change-Id: Id5f68f2ff28ea7453d9a62429fe12aa0c0a66952
BUG: 843003
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3803
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-08-17 01:12:36 -07:00
yinyin
91bf4e5137 rpc-lib: fix rpc_clnt_reconfig log on remote_host change
Change-Id: I5446d7fb975d4fb8105264e026fef165ae73a925
BUG: 764890
Signed-off-by: yinyin <maillistofyinyin@gmail.com>
Reviewed-on: http://review.gluster.com/3773
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-08-02 07:58:37 -07:00
Jeff Darcy
7e892ac95a rpc/socket: finish initialization in own thread
...if we have one, that is.  This addresses Avati's review comment on
ea7759f1240b1e97684273b9369472695173a66.

Change-Id: I71a272f7eeff8279981a75241d60620ca4975c99
BUG: 764731
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/3701
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-07-30 11:53:25 -07:00
Amar Tumballi
b4dbbe007d acl: enable handling of FMODE_EXEC flag
on linux systems, with open(), we can get below flag as per
'linux/fs.h'.

/* File is opened for execution with sys_execve / sys_uselib */

Instead of adding '#include <linux/fs.h>, its better to copy this
absolute number into other variable because then we have to deal
with declaring fmode_t etc etc..

With the fix, we can handle the file with '0711' permissions in
the same way as backend linux filesystems.

Change-Id: Ib1097fc0d2502af89c92d561eb4123cba15713f5
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/3739
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-07-27 21:39:08 -07:00