6305 Commits

Author SHA1 Message Date
Lalatendu Mohanty
1ffc3ac963 core: Coverity issue "Use of uninitialized scalar variable"
Issue:
1. In "unlink (export_path)" "export_path" might contain an arbitrary value left from earlier
 computations.
2. In "(msg[0] != '\0')"  msg might contain an arbitrary value

Change-Id: Icca8f557fd6b5e046dff1d5a84a72061975868d0
BUG: 789278
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/6701
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-18 08:47:17 -08:00
Varun Shastry
63638748d7 features/quota: Handle the corner case in statfs call
Problem: Even though limit is not set quota used to send 'quota-deem-statfs'
key in the dictionary resulting in incorrect calculations.

Change-Id: I643cb35cca6648e40f1c745135280876958ddaa9
BUG: 1046894
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6607
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2014-01-17 01:21:12 -08:00
Varun Shastry
c0a14c00bf features/quota: Make grep search more accurately
The hook script was searching the info file for "features.quota" to know the
quota status (enable/disabled). When features.quota-deem-statfs the grep is not
accurate. Fixed this issue.

Change-Id: I4104a93c1c1e0ac9fd7ef7bfef993425ab50e651
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6380
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 21:30:32 -08:00
Krishnan Parthasarathi
a20e79ab3d quota: fix recording of last alert log message
PROBLEM:

Alert log messages, corresponding to disk usage crossing soft-limit on a
directory, weren't being logged as often as expected.

CAUSE:

The mechanism in place to log alert messages, once every alert-time
seconds, set the previous logged time incorrectly.

FIX:

Update previous logged time only if we logged an alert message, ie. when
the "time was right" to alert.

Change-Id: Iafcb7be11e3240e2d04b0bb29ddb88e4f4a1bd25
BUG: 969461
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/6532
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 21:23:21 -08:00
Varun Shastry
39968c0962 features/quota: Metadata cleanup
Quota and marker uses 'trusted.glusterfs.quota*' and 'trusted.pgfid*' xattrs to
store its configurations and accounting information and also to build the
parent inode chain in case of absense of path.

Problem:
After disabling and then enabling quota back, the xattrs may contain stale data
leading to impaired accounting and thus improper enforcement.

Solution:
Clean up all the quota related xattrs after quota disable.

Marker xlator implements a virtual xattr to cleanup quota and pgfid xattrs. In
this approach glusterd mounts an auxiliary mount and sends the below command to
all the files by crawling the mountpoint.

 #setfattr -n "glusterfs.quota-xattr-cleanup" -v 1 <path/to/file>

Credit:
Krishnan Parthasarathi <kparthas@redhat.com>
Varun Shastry          <vshastry@redhat.com>
Change-Id: I9380eca58a285dc27dd572de1767aac8f2cd8049
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6369
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 02:01:23 -08:00
Raghavendra Talur
902276ebd7 test: Remove unnecessary code from test.
We have not meddled with mount point to check for it again.

Change-Id: I88eed777b6573a320065b9e14c2031db964e36d0
BUG: 1053362
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/6675
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 01:00:45 -08:00
Lalatendu Mohanty
c9008fe6a1 libgfapi: Fixing possible dereferencing of null pointer "glfd"
Fix: Putting a check so that pointer derefrence does not happen
when "gfld" is null

Change-Id: I281b10be445bbeec3a2728fc139d5ac94372e5b6
BUG: 789278
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/6697
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 00:58:49 -08:00
ndarshan
de557c602c cli: Addition of new child elements under brick in volume info xml.
Added new child elements; name and hostUuid under brick in
volume info xml where name and host uuid of the bricks are stored.
This does not break backward compatibility as the old value under
brick is not removed.

Change-Id: Ib9e388889c8dc0c7cd34dcc1871a59003f982f36
Signed-off-by: ndarshan <dnarayan@redhat.com>
Reviewed-on: http://review.gluster.org/6604
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-01-16 00:04:26 -08:00
Vijaykumar M
dd1f4a4805 dht: Ignore directory with missing xattrs, which have err == 0, and start == stop
From the history (Patch: http://review.gluster.org/4668/)

When subvols-per-directory is < available subvols, then there are layouts
which are not populated. This leads to incorrect identification of holes or
overlaps. We need to ignore layouts, which have err == 0, and start == stop.
In the current scenario (start == stop == 0).

Additionally, in layout-merge, treat missing xattrs as err = 0. In case of
missing layouts, anomalies will reset them.

For any other valid subvoles, err != 0 in case of layouts being zeroed out.
Also reverted back dht_selfheal_dir_xattr, which does layout calculation only
on subvols which have errors.

Change-Id: Idb72a869f1a6f103046bb7e6fe0019f6ac853fd4
BUG: 1047331
Signed-off-by: Vijaykumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/6618
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-01-15 17:20:09 -08:00
Santosh Kumar Pradhan
260e817b8a gNFS: Set default outstanding RPC limit to 16
With 64, NFS server hangs with large I/O load (~ 64 threads writing
to NFS server). The test results from Ben England (Performance expert)
suggest to set it as 16 instead of 64.

Change-Id: I418ff5ba0a3e9fdb14f395b8736438ee1bbd95f4
BUG: 1008301
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/6696
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: ben england <bengland@redhat.com>
2014-01-15 13:47:32 -08:00
Lalatendu Mohanty
f3e227d525 geo-rep: Fixing null pointer dereference of "op_value"
Change-Id: Id39743eaa5a52cc7fd4e2a1378a23384f5ef1fed
BUG: 789278
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/6700
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Tested-by: Avra Sengupta <asengupt@redhat.com>
2014-01-15 10:08:58 -08:00
Kaushal M
f139fc7e44 cli: Don't override cli mode when stdin in not a tty
Change-Id: I801c6e6ecd6c5a91e487e8e54ec5f684d450a080
BUG: 1047378
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/6687
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-14 22:27:09 -08:00
Kotresh H R
2f499e85a4 glusterd/geo-rep : Allow volume to stop if geo-rep is not active.
In staging phase of volume stop, code is added to read the state_file
for each slave of the master to which the volume belongs. If any of the
geo-rep session is active with at least one slave, volume is not
allowed to stop else it is allowed.

Change-Id: I4a01a357fc86b872e9635b3d19998cdbd9545114
BUG: 1049727
Signed-off-by: Kotresh H R <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/6663
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-14 22:24:58 -08:00
Krishnan Parthasarathi
7d89ec7776 socket: propogate connect failure in socket_event_handler
This patch prevents spurious handling of pollin/pollout events on an
'un-connected' socket, when outgoing packets to its remote endpoint are
'dropped' using iptables(8) rules.

For eg,
 iptables -I OUTPUT -p tcp --dport 24007 -j DROP


Change-Id: I1d3f3259dc536adca32330bfb7566e0b9a521e3c
BUG: 1048188
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/6627
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-01-14 01:04:27 -08:00
Vijay Bellur
54bf0ba469 consolidate code for #ifdef HAVE_LINKAT usage
sys_link() now does

ifdef HAVE_LINKAT
        linkat (...)
else
        link (...)
endif

Use sys_link() in all places where we previously had the
conditional behavior.

Change-Id: I8bce5ac1175efd2ba7ab4bb5b372f6d1e0365d28
BUG: 764655
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6633
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-01-14 00:31:20 -08:00
Vijay Bellur
3af42583dd storage/posix: UNWIND right op_error and op_errno in *setxattr()
1. errno was being set after gf_log() in posix_{f}handle_pair, this
would cause errno to be overwritten.

2. dht would expect -1 for indication of failure in setxattr
callback (dht_err_cbk()). posix_{f}setxattr has been changed to set
op_ret as -1 instead of -op_errno.

3. dict_foreach() has been changed to return an error if the invoked
fn() returns < 0.

Bug report and test case credits to Zorro Lang <zlang@redhat.com>

Change-Id: I96c15f12a5d7717b7584ba392f390a0b4f704a98
BUG: 1051896
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6684
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-01-14 00:23:52 -08:00
Anand Avati
aa3b01533e locks: various fixes
- implement ref/unref of entry locks (and fix bad pointer deref crashes)
- code cleanup and deleted various data types
- fix improper read/write lock conflict detection in entrylk
- fix indefinite hang of blocked locks on disconnect
- register locks in client_t synchronously, fix crashes in disconnect path

Change-Id: Id273690c9111b8052139d1847060d1fb5a711924
BUG: 849630
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6638
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-13 21:44:19 -08:00
Venkatesh Somyajulu
ce86c13234 cluster/afr: Unable to self heal symbolic links
Problem:
Under the entry self heal, readlink is done at the
source and sink. When readlink is done at the sink,
because link is not present at the sink, afr expects
ENOENT. AFR translator takes decisions for new link
creation based on ENOENT but server translator is modified
to return ESTALE because of which afr xlator is not able
to heal.

Fix:
The check for inode absence at server includes ESTALE as
well.

Change-Id: I319e4cb4156a243afee79365b7b7a5a7823e9a24
BUG: 1046624
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/6599
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-01-13 20:42:05 -08:00
Santosh Kumar Pradhan
5a26daaea9 gNFS: Server sets ACL mask wrongly in GETACL reply
FIX:
1. Set the ACL mask what was requested by client
2. Validate the ACL mask in SETACL routine

Change-Id: Icb8576a8fe2684e0beaf94e8db6a92bc70bbfe7f
BUG: 1051865
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/6683
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-12 23:48:15 -08:00
Varun Shastry
f7fcbc0ffe mgmt/glusterd: Improve the description in volume set help output
Change-Id: I785648970f53033a69922c23110b5eea9e47feb3
BUG: 1046030
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6573
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-12 23:46:15 -08:00
Lalatendu Mohanty
6992e4e37d glusterd: Comments for missing break in switchcase of glusterd_op_stage_quota
Change-Id: I3ac5b73b9703a390f1de9cd6a999dfd8ec27d379
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/6645
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-01-10 23:05:24 -08:00
Kaushal M
2edf1ec797 glusterd: Relocate rebalance sockfile
The defrag sockfile was moved from priv->workdir to
DEFAULT_VAR_RUN_DIRECTORY. The format for the new path of the defrag
sockfile is 'DEFAULT_VAR_RUN_DIRECTORY/gluster-rebalance-<vol-id>.sock'.

This was needed because the earlier location didn't have a fixed length
and could exceed UNIX_PATH_MAX characters. This could lead to the
rebalance process failing to start as the socket file could not be
created.

Also, for keeping backward compatiblity, glusterd_rebalance_rpc_create
will try both the new and old sockfile locations when attempting
reconnection.

Change-Id: I6740ea665de84ebce1ef7199c412f426de54e3d0
BUG: 1049726
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/6616
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-10 02:08:37 -08:00
M. Mohan Kumar
a2f772de44 MAINTAINERS: Update BD
BUG: 1040351
Change-Id: I2cbbae22e84fe7f8593db22a32ceb87ca97f46da
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/6679
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-01-09 23:33:41 -08:00
Lalatendu Mohanty
f9162911e8 libgfapi : Fixing some NULL pointer dereferencing issues.
1. Fixing dereferencing null pointer "gio"
2. Checking "frame" before calling STACK_DESTROY (frame->root)

Change-Id: If2ce8804a8e9f3f99f71a8c0d13900afb5635072
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/6313
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-09 22:45:05 -08:00
Lalatendu Mohanty
21ffbf9b92 geo-rep: Fixing an incorrect memcpy operation.
Currently we are copying a higher size variable to lower size
variable i.e. copying a NAME_MAX  to PATH_MAX sized variable
in "memcpy (sts_val->worker_status, monitor_status, strlen(monitor_status));"

Change-Id: I81dca8e81a4aea5545d5982aed20e05a5e08641c
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/6667
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-09 22:43:24 -08:00
Harshavardhana
2b05c1588a rpc/auth: Avoid NULL dereference in rpcsvc_auth_request_init()
Code section is bogus!
------------------------------------------
370:       if (!auth->authops->request_init)
371:              ret = auth->authops->request_init (req, auth->authprivate);
------------------------------------------

Seems to have been never been used historically since
logically above code has never been true to actually execute
"authops->request_init() --> auth_glusterfs_{v2,}_request_init()"

On top of that under "rpcsvc_request_init()"
verf.flavour and verf.datalen are initialized from what is
provided through 'callmsg'.
------------------------------------------
        req->verf.flavour = rpc_call_verf_flavour (callmsg);
        req->verf.datalen = rpc_call_verf_len (callmsg);

        /* AUTH */
        rpcsvc_auth_request_init (req);
        return req;
------------------------------------------

So the code in 'auth_glusterfs_{v2,}_request_init()'
performing this operation will over-write the original
flavour and datalen.

------------------------------------------
      if (!req)
                return -1;
        memset (req->verf.authdata, 0, GF_MAX_AUTH_BYTES);
        req->verf.datalen = 0;
        req->verf.flavour = AUTH_NULL;
------------------------------------------

Refactoring the whole code into a more understandable version
and also avoiding a potential NULL dereference

Change-Id: I1a430fcb4d26de8de219bd0cb3c46c141649d47d
BUG: 1049735
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6591
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-08 20:42:15 -08:00
Pranith Kumar K
88816bf4b2 cluster/afr: Stop index crawl on pending full crawl
Full crawl is executed when index self-heal is useless, like
disk replacement. So if there are on-going index crawls, they
should be stopped inorder to start full self-heals.

Change-Id: I9a1545f1ec4ad9999dc08523ce859e4fa152e214
BUG: 1049355
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6659
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-08 09:25:06 -08:00
Pranith Kumar K
c0767852b3 cluster/afr: Don't accept heal commands until graph is up
Change-Id: Icca6c23b6a5965f462db8b65af3eb2e141c7cd39
BUG: 1049355
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6658
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-08 04:20:02 -08:00
Santosh Kumar Pradhan
a1e26be05c gNFS: mnt3_find_export() by pass AUTH check
NFS subdir mount does not respect nfs.rpc-auth-reject option
in the volume. If the volume is being mounted, then it would
validate the AUTH by mnt3_check_client_net() but if the client
is mounting a subdir, the control takes a different code path
i.e. mnt3_find_export() which does not bother about the AUTH.

FIX:
Enforce the AUTH check in mnt3_parse_dir_exports() which is
invoked by mnt3_find_export() for subdir mount.

Change-Id: I6fdd3e6bd6cbd32b0d9ca620cc4c30fdaff9ca30
BUG: 1049225
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/6655
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-08 03:54:06 -08:00
Niels de Vos
1e4f2d08f1 build: the main glusterfs package should not provide glusterfs-libs
Because of this incorrect provides, there is no requirement to update
glusterfs-libs. Most users will get a newer glusterfs-libs when updating
anyway, but users that manually select RPMs for updating my skip the
package, which will break their system.

Change-Id: I636dfac3f0a521924f1c2e82948bb513b0a5c9f9
BUG: 950083
Fedora-BUG: 1048489
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6642
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-01-07 05:16:11 -08:00
Niels de Vos
b159d0a4c3 Add the MAINTAINERS file
Different projects (Linux kernel, QEMU, ...) have a MAINTAINERS file in
the root of the git repository. This file mostly lists the maintainers
or main committers for certain files and directories. On occasion it
would be very helpful to know who to add as a reviewer for proposed
patches.

Change-Id: Ide68779c7477529808ccb0e7d421db160e3222ea
BUG: 1040351
URL: http://lists.nongnu.org/archive/html/gluster-devel/2013-11/msg00045.html
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6480
Reviewed-by: Amar Tumballi <amarts@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-01-07 05:15:46 -08:00
Lalatendu Mohanty
0fbb9c7baf Crypt: Fixing incorrect placement of GF_FREE
i.e. we are trying access the memory after freeing it using GF_FREE

Change-Id: I2b22fd421131c618bd0d7c246ebf09f14751ad30
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/6626
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-04 04:55:32 -08:00
Atin Mukherjee
79cbf27b9b Glusterd : glusterd process generates core due to NULL store handle
Problem : glusterd crashed as backtrace revealed that store handle was
set to NULL.

Solution : In glusterd_store_global_info() function out block the
handle is dereferenced with out any NULL check which caused this
segmentation fault. A NULL check is introduced to avoid this. While
testing this fix, another issue was noticed where GF_ASSERT macro again
does not gurantee the NULL dereference check and hence this macro call
has been replaced by GF_VALIDATE_OR_GOTO macro call in places where
there is a danger of macro getting crashed due to NULL dereference
check.

Change-Id: Ic301aa45ce4bbdc2da751d2386439df7bb24c016
BUG: 1040844
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/6619
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-03 22:24:27 -08:00
Vijaykumar M
d062e09e0c pathinfo: Provide user namespace access.
Do not allow to setxattr for pathinfo
This change was missed out when submitted patch: http://review.gluster.org/5101/

Change-Id: Ifd32d95089b9bacc5dee80a8b924bb8713dca8a1
Signed-off-by: Vijaykumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/6535
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-01-03 22:21:25 -08:00
Santosh Kumar Pradhan
825b976ee3 gNFS: Small memory leak in rpcsvc_drc_init()
1. The routine rpcsvc_drc_init() is only used while initialization of
NFS xlator. It should just check for nfs.drc option and init DRC feature
accordingly. If it's set to OFF, then rpcsvc_drc_init() allocates memory
for svc.drc and set ret value to 0 and goes to out: block where drc is
leaked.

2. rpcsvc_drc_init() should just allocate svc.drc and init it. Here
svc.drc can never be valid.

3. If svc.drc gets init'd here, no point of checking for drc type here.

Change-Id: I4085771cdb8c9c15d1b9c548b77929a37f27c124
BUG: 1047902
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/6628
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-03 22:17:35 -08:00
Santosh Kumar Pradhan
311e3868bf gNFS: Possible SEGV crash in NFS while DRC is OFF
In rpcsvc_submit_generic(), FILE: rpc/rpc-lib/src/rpcsvc.c, while caching
the reply (DRC), the code does not check if DRC is ON and goes ahead
assuming DRC is on and try to take a LOCK on drc.

FIX: Put a check on svc->drc by rpcsvc_need_drc().

Change-Id: I52c57280487e6061c68fd0b784e1cafceb2f3690
BUG: 1048072
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/6632
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-03 22:15:01 -08:00
Raghavendra G
8ee2420266 performance/io-cache: reduce the severity of log-message
During a genuine error condition like network outage, the log grows
with redundant information.

Change-Id: I5a4f2f62da10ef656f14200c4c84a6917b1f0ddd
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
BUG: 1048084
Reviewed-on: http://review.gluster.org/6635
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-03 08:02:43 -08:00
Ravishankar N
d25d912835 glusterd: update volinfo->subvol_count in newly added peers
Update the subvol_count when a peer imports information about the friend
volumes.

Change-Id: Id3884bd5727ff22be7ed87f43a1ec1b5fe34813c
BUG: 1047955
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/6629
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-01-03 06:22:23 -08:00
Emmanuel Dreyfus
f54e9ca389 Use linkat() instead of link() for portability sake
POSIX does not says wether link(2) on symlink should link on
symlink itself or on target. Linux use symlink, most other
systems use target. Using linkat(2) allows the behavior to be
specified, so that the behavior is portable.

Also fix configure test for NetBSD linkat(2), which ceased to work.

BUG: 764655
Change-Id: I2633fde3b0828ca8c199e11c827720c513e15852
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6613
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-02 22:02:09 -08:00
Emmanuel Dreyfus
d1f8b7ebc7 Use linkat() instead of link() for portability sake
POSIX does not says wether link(2) on symlink should link on
symlink itself or on target. Linux use symlink, most other
systems use target. Using linkat(2) allows the behavior to be
specified, so that the behavior is portable.

Also fix configure test for NetBSD linkata(2), which ceased to work.

BUG: 764655
Change-Id: Iccd27ac076b7a74e40dcbaa1c4762fd3ad59da5f
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6539
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-02 22:01:48 -08:00
Vijay Bellur
2ce8918759 libglusterfs: Add missing goto in eh_new()
Change-Id: I64bbd8d5d919e78286a0521b62ca75f22ad296fa
BUG: 795419
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6623
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-01-01 23:22:22 -08:00
Pranith Kumar K
2401384fbc mount/fuse: Remove duplicate GET_STATE call
Change-Id: I5716cb0e9914f78489e3422a03efc689f5ebc413
BUG: 952029
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6579
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-01 17:45:14 -08:00
Niels de Vos
7e3dd526c6 rpc/server: add anonuid and anongid options for root-squash
Introduce new options to modify the behaviour of server.root-squash.
With server.anonuid and server.anongid the uid/gid can be specified and
the root user (uid=0 and gid=0) will be mapped to the given uid/gid
instead of nfsnobody (uid=65534 and gid=65534).

Many thanks to Vikhyat Umrao for writing the majority of the test-case!

Change-Id: I6379a3d2ef52b9b9707f2f6f0529657580c8d779
BUG: 1043886
CC: Vikhyat Umrao <vumrao@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6546
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Vikhyat Umrao <vumrao@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-12-30 19:49:43 -08:00
Harshavardhana
d85726d194 crypt: On calloc failure follow goto statement
At
--------------------------------------------
1423	if (local->vec.iov_base == NULL) {
--------------------------------------------

This condition being true leads to NULL pointer
to be passed into `memcpy` later at

----------------------------------------------------
1432	memcpy((char *)local->vec.iov_base + copied,
----------------------------------------------------

Avoid this by clean exit through a goto statement with
in the conditional.

Change-Id: I2546b7dd634dc251adae8ca39497c4c3ef520f62
BUG: 1030058
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6576
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Edward Shishkin <edward.shishkin@gmail.com>
Tested-by: Edward Shishkin <edward.shishkin@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-12-29 23:48:50 -08:00
Louis Zuckerman
efcfb60f87 Updating extras/Ubuntu with latest upstart configs (BUG: 1047007)
Change-Id: Ia769589f6af1d7ca3577185fd4c56eb9f43b3e2e
BUG: 1047007
Signed-off-by: Louis Zuckerman <me@louiszuckerman.com>
Reviewed-on: http://review.gluster.org/6611
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-12-29 23:03:52 -08:00
Vijay Bellur
a42d0938bf features/index: Minor improvement in log message.
Change-Id: Ic4f39785dab5ad64def4c06d7bd2f2dec09e19ab
BUG: 1045690
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6606
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-12-27 19:13:33 -08:00
Venkatesh Somyajulu
6b41a0b7df test: Modified bug-1037501.t script
Change-Id: I3114009681d49249fe292f94a464efc419c944cb
BUG: 1037501
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/6596
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-12-27 19:13:17 -08:00
Vijay Bellur
2909ef3ecb protocol/server: Change log message severity
Change-Id: Ia6aaf8a106c26fa7118c86fadb6805d2877bb6ee
BUG: 849630
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6610
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-12-27 19:11:43 -08:00
Harshavardhana
412e6ab758 build: fix day in the %changelog
This fixes `warnings` during build tests `rpm.t`

Change-Id: I706ceb1a39d046fe26f70f7b1b06f059abd5d3c0
BUG: 1000019
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6584
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-12-27 03:29:33 -08:00
Krishnan Parthasarathi
d4b8825436 socket: unix socket connect path can't be greater than UNIX_PATH_MAX characters
Change-Id: I74788b63dd1c14507aa6d65182ea4b87a2e1f389
BUG: 1046308
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/6589
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-12-26 03:36:30 -08:00