6843 Commits

Author SHA1 Message Date
Humble Chirammal
c74ff569ca compress: Change variable name
'writen' and 'total_writen' variables has been defined in compress
xlator. This patch replaced those with proper name.

Change-Id: If8e38fae8f997a92686a891d64cbaf6b0b69129a
BUG: 1075417
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/8268
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-07-15 04:39:38 -07:00
Venkatesh Somyajulu
78128afce1 cli: Changed "rebalance start" output
Change-Id: Ie87f1a2107b07a6e519ed894a74edf3b3e0a8340
BUG: 1063230
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/6946
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-14 10:33:41 -07:00
Raghavendra Talur
f924f8e28b glusterd: Fix for resource leak coverity bug 1223045.
Change-Id: I96261e7f5cd7b5550d3100750c80190dd932a8ab
BUG: 789278
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/8252
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2014-07-14 10:30:31 -07:00
Humble Chirammal
fc84c5af7b gfapi : remove gfapi.py to avoid confusion
python binding of libgfapi is evolving via libgfapi-python
project. The example available here confuses end users,
so removing it from this path.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Bug Id: 1119328
> Reviewed-on: http://review.gluster.org/7920
> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
> Tested-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
> Reviewed-by: Thiago da Silva <thiago@redhat.com>
> Reviewed-by: Prashanth Pai <ppai@redhat.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>

Change-Id: I17b3aa0f0505342496019ce012cca21d84184027
Reviewed-on: http://review.gluster.org/8237
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-14 09:47:36 -07:00
Pranith Kumar K
7c74e9c24a cluster/afr: Fix dirent leak
afr does itransform by taking the list of entries given by client xlator
to separate list but doesn't free that list.

Change-Id: Ibb4d38b4934b2bb924385c88f9d7942fad933cb9
BUG: 1117243
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8261
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
2014-07-14 09:29:19 -07:00
Humble Chirammal
8d8abc19b0 Autoload fuse module in centos5/el5 versions.
This patch dynamically load 'fuse' module with the installation
of glusterfs-fuse package in centos/el5 distributions.

Change-Id: I4988a025bd18716fd6d355431196540e140224b3
BUG: 1108669
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/8116
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-07-14 07:12:13 -07:00
Humble Chirammal
25ceba47ff changelog: variable 'writen' is changed
This patch change the variable name to 'written' in changelog, along
with few other typo fixing.

Change-Id: I1d3cbea5c89fc0a15233bb6e61b4fbd4bfdd3a67
BUG: 1075417
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/8267
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-07-14 07:02:43 -07:00
Venky Shankar
23ae9f3ad7 test: utility to create files with a specific gfid
python test utility that uses setxattr() interface to
create files with a predefined gfid (which is also used
by geo-replication). this utility aids in writing test
cases for gfid-access translator.

Change-Id: Ib11248844a094cc02dae74d969f2e9212f94ede4
BUG: 1111490
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/8275
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-14 06:42:50 -07:00
Emmanuel Dreyfus
210a59e48a Regression test portability: dd usage
NetBSD, FreeBSD, and MacOS X dd(1) bs argument uses m for megabyte, while
Linux uses M. Use bs=1024k instead of bs=1M for better compatibility.

BUG: 764655
Change-Id: I603f57adbc9b31f6d634b918726437fbfce42e03
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8278
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Justin Clift <justin@gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-14 06:29:15 -07:00
Pranith Kumar K
f637f2f101 protocol/server: Add extra space between words
Change-Id: Id658db992a43202602e0c30d2c8ca639c4aeadd6
BUG: 1119167
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8304
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2014-07-14 06:27:44 -07:00
Venky Shankar
eeab758c7c features/gfid-access: error handling for entry creation
Proceed with setattr() only on a successfull entry creation.
Winding a setattr() using a freshlyOC initiated inode would
most likely fail in one translator or the other (e.g. DHT
expecting the layout information to be set in the inode
context), which is the case if the inode was not looked up.

Therefore, gfid-access handles failure entry creations and
passes the _correct_ errno back to the client instead of
continuing with setattr() call and probably returning back
incorrect errno. Also, filling up inode->gfid is required
as the new inode is not looked up and ->gfid would be
certainely required for inode operations.

Change-Id: Ie92f5647a89bf558c07710ab0400bce69d59fc31
BUG: 1111490
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/8260
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-14 06:26:55 -07:00
Avra Sengupta
23455c034a glusterd/snapshot: Update fstype for local bricks only
While creating snapshot, update fstype for local bricks only
and not for bricks hosted on other nodes

Also returning ret as 0, in case no cleanup is required in
post-validation, so that a post-validation failure is not
logged, every time a pre-validation failure happens.

Change-Id: I6364e33cfd9528e0a988ee48f3443239ee884336
BUG: 1111060
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/8272
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-07-14 05:30:42 -07:00
Rajesh Joseph
656e6b3818 cli/snapshot: provide --xml support for all snapshot command
Now --xml option can be used with all snapshot command. It
will form the cli output in xml form.

Change-Id: Ifc0ac31d2a9f91e136e87f3b51a629df7dba94e8
BUG: 1096610
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/7663
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-12 09:50:25 -07:00
Jeff Darcy
99685f18f1 dht: support heterogeneous brick sizes
Calculation of layouts now considers the size of each brick, so that
smaller bricks don't get an "unfair" share of allocations and start
returning ENOSPC while the larger bricks still have plenty of space.

The observation has been made that some clients might get ENOTCONN when
trying to fetch disk-size information, and end up calculating layouts
differently.  The following meta-observations can be made.

(1) This scenario is extremely unlikely in configurations with AFR.

(2) The most likely consequence of this scenario is that some files will
be placed sub-optimally by the client with the obsolete (non-weighted)
layout.  They'll still be found anyway, so this isn't a show stopper.

(3) Without this patch it's *guaranteed* that some files will be placed
sub-optimally, because any layout that fails to account for brick sizes
is sub-optimal.

(4) We shouldn't be doing fix-layout from two nodes simultaneously
anyway.  That's inefficient at best.  Any instances of such behavior are
separate bugs, which should be fixed separately.

(5) In the most extreme edge case, two nodes doing weighted and
non-weighted layout fixes could race and end up creating an internally
inconsistent layout.  This condition is still transient; it will be
detected and repaired automatically the next time anyone fetches the
layout.  (If it's not that's also a preexisting bug that can show up in
other contexts.)

In conclusion, it's not the purpose of this patch to fix bugs elsewhere
in DHT.  Its purpose is to make life incrementally better for users who
add new hardware with larger disks etc. than the older equipment.  It's
only one part of an ongoing process to improve layout management and
repair, all the way up to support for multiple hash rings or tiering.

Change-Id: I05eb6f9eface9cdaf8622e0260c8c7f29020447f
BUG: 1114680
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/8093
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-12 09:20:52 -07:00
Nithya Balachandran
d5ec66032f DHT/Logging
Changed the log level of a message from none to debug as none does
not print a log level in the log file.

Change-Id: I463d1095d69bbd0036958282da13cb8e0226f34f
BUG: 1116797
Signed-off-by: Nithya Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/8253
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-12 09:16:54 -07:00
Xavier Hernandez
1392da3e23 cli/glusterd: Added support for dispersed volumes
Two new options have been added to the 'create' command of the cli
interface:

    disperse [<count>] redundancy <count>

Both are optional. A dispersed volume is created by specifying, at
least, one of them. If 'disperse' is missing or it's present but
'<count>' does not, the number of bricks enumerated in the command
line is taken as the disperse count.

If 'redundancy' is missing, the lowest optimal value is assumed. A
configuration is considered optimal (for most workloads) when the
disperse count - redundancy count is a power of 2. If the resulting
redundancy is 1, the volume is created normally, but if it's greater
than 1, a warning is shown to the user and he/she must answer yes/no
to continue volume creation. If there isn't any optimal value for
the given number of bricks, a warning is also shown and, if the user
accepts, a redundancy of 1 is used.

If 'redundancy' is specified and the resulting volume is not optimal,
another warning is shown to the user.

A distributed-disperse volume can be created using a number of bricks
multiple of the disperse count.

Change-Id: Iab93efbe78e905cdb91f54f3741599f7ea6645e4
BUG: 1118629
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/7782
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-11 10:34:24 -07:00
Xavier Hernandez
ad112305a1 cluster/ec: Added erasure code translator
Change-Id: I293917501d5c2ca4cdc6303df30cf0b568cea361
BUG: 1118629
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/7749
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-11 10:33:40 -07:00
Xavier Hernandez
6b4702897b tests: Fixed spurious failure in bug-887098-gmount-crash.t
This script was trying to see if the mount process died by doing a
'ps ax' and a grep of the original pid in the results. After that
the pid of the first line returned by grep was compared to the
original pid.

This method can lead to false negatives because it's possible that
the original pid appears in some other part of the 'ps ax' list.

This patch uses get_mount_process_pid() from volume.rc to check if
the process is still alive.

Change-Id: I0285366e601a146793c47e9c1156a4bb36d6fcb3
BUG: 1092850
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8286
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-11 00:12:01 -07:00
Venky Shankar
6532a65b56 features/changelog: prevent deadlock on thread cancellation
helper threads (fsync, rollover) wake up periodically and perform
their respective operation under a lock (crt->lock). These threads
are also subjected to cancellation under some circumstance such as
disabling changelog. This is inherently dangerous when funtions
which are cancellation points for pthread_cancel(3) are used
in the locked region.

Consider this

         pthread_mutex_lock(&mutex);
         {
                /* ... */
                ret = fsync (fd);   <-- cancellation point
                /* ... */
         }
         pthread_mutex_unlock(&mutex);

A pthread_cancel(3) by another thread just before fsync(3) but
after pthread_mutex_lock(3) would result in the thread getting
cancelled when fsync(3) is invoked, thereby never unlocking the
mutex. Moreover, in case of changelog translator, the locked
region (under crt->lock in changelog-rt.c) is also the code
path for fop changelog updation. Therefore, unlocking the
mutex in thread cleanup handler (pthread_cleanup_pop(3)) might
prematurely release the mutex during fop updation path.

This patch fixes such problems existing in fsync and rollover
threads. Fix is to enter the locked region with cancellation
disabled and enable it after mutex unlock. Also, test for a
cancellation request early on in case none of the functions
are cancellation points.

Change-Id: I1795627a12827609c1da659d07fc1457ffa033de
BUG: 1110917
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/8106
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-07-11 00:08:57 -07:00
Joseph Fernandes
c7251ebfe8 glusterd/regression: Temp fix for spurious err
As discussed in the mail,
Disabling the checking of snap brick status until
the investigation is done on the port bind issue.

Change-Id: I8854cee050de1b7f843e3d40631b6cb61fd8583e
BUG: 1112559
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/8259
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-10 11:12:00 -07:00
Jeff Darcy
b42688786f socket/glusterd/client: enable SSL for management
The feature is controlled by presence of the following file:

	/var/lib/glusterd/secure-access

See the comment near the definition of SECURE_ACCESS_FILE in glusterfs.h
for the rationale.  With this enabled, the following rules apply to
connections:

	UNIX-domain sockets never have SSL.

	Management-port sockets (both connecting and accepting, in
	daemons and CLI) have SSL based on presence of the file.

	Other IP sockets have SSL based on the existing client.ssl and
	server.ssl volume options.

Transport multi-threading is explicitly turned off in glusterd (it would
otherwise be turned on when SSL is) due to multi-threading issues.
Tests have been elided to avoid risk of leaving a file which will cause
all subsequent tests to run with management SSL still enabled.

IMPLEMENTATION NOTE
The implementation is a bit messy, and consists of two stages.  First we
decide whether to set the relevant fields in our context structure, based
on presence of the sentinel file OR a command-line override.  Later we
decide whether a particular connection should actually use SSL, based on the
context flags plus what kind of connection we're making[1] and what kind of
daemon we're in[2].

[1] inbound, outbound to glusterd port, other outbound
[2] glusterd, glusterfsd, other

TESTING NOTE
Instead of just running one special test for this feature, the ideal
would be to run all tests with management SSL enabled.  However, it
would be inappropriate or premature to set up an optional feature in the
patch itself.  Therefore, the method of choice is to submit a separate
patch on top, which modifies "cleanup" in include.rc to recreate the
secure-access file and associated SSL certificate/key files before each
test.

Change-Id: I0e04d6d08163893e24ec8c031748c5c447d7f780
BUG: 1114604
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/8094
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-10 07:37:12 -07:00
Nithya Balachandran
0f5719a359 Gluster/Doc : Updated admin guide diagrams
Updated the diagrams for the sections on setting up
distributed replicated volumes and striped replicated volumes

Change-Id: I44ecd2aba75816fdb2f6324c4337cf5fb621ecae
BUG: 1113842
Signed-off-by: Nithya Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/8256
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-09 23:40:06 -07:00
Meghana Madhusudhan
2e831d70c7 Changing the position of nfs-ganesha.log
Changing the position of ganesha.log from /tmp/ganesha.log
to /var/log/nfs-ganesha/ganesha.nfsd.log

Change-Id: Iff95fbc7fc690f4fdbc1789d84f3e41aaca9045b
BUG: 1116723
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8249
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-09 23:38:04 -07:00
Ravishankar N
f5f972189b libgfapi: succeed lookup of "/.."
For the root dir, ".." should resolve to itself.

i.e. when
        glfs_h_lookupat (fs, NULL, "/..", &stat)
(or)
        glfs_h_lookupat (fs, root, "..", &stat)

is performed, stat must contain root dir's information.

Change-Id: I1c92091cdc4ff00e6b17e5fa349009c6dfc441c1
BUG: 1114814
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/8207
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
2014-07-09 21:14:54 -07:00
Pranith Kumar K
c690c11312 tests: Print EXPECT style error messages rather than 'not ok'
Change-Id: Ib23426c5ede0ab71387a6a112b313aa448b872cd
BUG: 1092850
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8263
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-09 11:45:09 -07:00
Krutika Dhananjay
b9f1d1a120 rpc: Do not reset @ping_started to 0 in ping callback
This is to avoid indefinite recursion of the following kind, that could
lead to a stack overflow:

rpc_clnt_start_ping() -> rpc_clnt_ping() -> rpc_clnt_submit() ->
rpc_clnt_start_ping() -> rpc_clnt_ping() -> rpc_clnt_submit() ...
and so on,

since it is possible that before rpc_clnt_start_ping() is called a
second time by the thread executing this codepath, the response to
previous ping request could ALWAYS come by and cause epoll thread to
reset conn->ping_started to 0.

This patch also fixes the issue of excessive ping traffic, which was
due to the client sending one ping rpc for every fop in the worst case.

Also removed dead code in glusterd.

Change-Id: I7c5e6ae3b1c9d23407c0a12a319bdcb43ba7a359
BUG: 1116243
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8257
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-07-09 06:57:20 -07:00
Pranith Kumar K
82e0fb290d client_t: Fix memory leaks
- Assign frame->root->client so that gf_client_unref happens
  in server_connection_cleanup_flush_cbk
- Avoid taking extra ref in gf_client_get

TODO:
The whole reason why there are two types of refs
bind, ref-count is to avoid lock inside lock which
is not the case now. I will be sending one more patch
which will accomplish that as well as changing the
tablearray to list

Change-Id: Ic9971cf248c5ee2cdbfdef8e9ff6d54e3ec60ced
BUG: 1116672
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8247
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-09 05:09:26 -07:00
Aravinda VK
56c7b07c74 geo-rep: Avoid duplicate stat in xsync changelog processing
When A file/dir is identified for metadata sync, it was doing
duplicate stat to get the metadata to sync.

With this patch it avoids doing one additional stat call. Xsync
performance will improve.

rsync will copy files metadata, so no need to include for
processing.

BUG: 1111490

Change-Id: I79dad6375fa4742d9aaca7d9856993c184a744dc
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/8124
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-07-09 01:52:24 -07:00
Niels de Vos
72d96e27b3 tests/rpm.t: delete the working directory in case it exists
Change-Id: Iea15d296e22a36b119f04aff61a975811054c20b
BUG: 1092850
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7916
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-07 10:38:34 -07:00
Niels de Vos
ec74ceedaa nfs: prevent assertion error with MOUNT over UDP
The MOUNT service over UDP runs in a separate thread. This thread does
not have the correct *THIS xlator set. *THIS points to the global (base)
xlator structure, but GF_CALLOC() requires it to be the NFS-xlator so
that assertions can get validated correctly.

This is solved by passing the NFS-xlator to the pthread function, and
setting the *THIS pointer explicitly in the new thread.

It seems that on occasion (needs further investigation) MOUNT over UDP
does not unregister itself. There can also be issues when the kernel NLM
implementation has been registered at portmap/rpcbind, so adding some
unregister procedures in the cleanup of the test-cases.

Change-Id: I3be5a420fc800bbcc14198d0b6faf4cf2c7300b1
BUG: 1116503
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/8241
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-07 10:28:47 -07:00
Pranith Kumar K
d6cc24f748 Changes in statedump for stack, frame, locks
Internal call-stacks don't have lk-owner so it is a bit
difficult to confirm if a stack hung by comparing two
statedump files. This change prints call-stack, frame's
address. This should solve the comparison problem.

Lock times and log times don't have same timezone because
of which one has to manually convert the times for debugging
the issues. This change prints blocked, granted times also
in UTC.

Also fixed line truncation issue when client-unique-string
is big.

Change-Id: I116372c0d63476823a36ca6dbfba91648f9234cc
BUG: 1114188
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8197
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-07 10:27:00 -07:00
Pranith Kumar K
2c5eb5c708 statedump: Don't print mem-type numbers
Change-Id: I381bfa9535fe60c37758761d34b98dbbc4e5f569
BUG: 1114188
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8239
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Justin Clift <justin@gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-06 21:21:58 -07:00
Pranith Kumar K
8202705f98 features/gfid-access: Fix entry operations
Problem:
When more than one aux-mounts are performing rmdir .gfid/<pargfid>/dir
simultaneously, then sometimes a hang is observed.  In gfid-access xlator When
virtual parent/inode are replaced with real parent/inode in loc, virtual
pargfid/gfid are not replaced with real pargfid/gfid respectively. Afr is using
parent_loc->gfids to order the entry locks. But parent_loc->gfid contains
random/virtual gfid generated by gfid-access xlator. Entrylk in client xlator
is using loc->inod->gfid for sending entrylk which has 'real' gfid. Because the
ordering is happening based on random gfids, One mount orders the locks as (L1,
L2) where as the other orders them as (L2, L1) leading to a dead-lock thus
a hang.

Fix:
Replace virtual pargfid/gfid with real pargfid/gfid when virtual-inodes are
replaced with real-inodes in loc.

BUG: 1114501
Change-Id: Ie94e816122ef9e7aad51605adbf49291de60827e
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8204
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-07-06 21:01:20 -07:00
Jeff Darcy
83c09b75a8 socket: add certificate-depth and cipher-list options for SSL
Change-Id: I82757f8461807301a4a4f28c4f5bf7f0ee315113
BUG: 1114604
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/8040
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-04 04:18:00 -07:00
Joseph Fernandes
9a50211cdb glusterd/snapshot: fixing glusterd quorum during snap operation
During a snapshot operation, glusterd quorum will be checked only
on transaction peers, which are selected in the begin of the
operation, and not on the entire peer list which is susceptible
for change for any peer attach operation.

Change-Id: I089e3262cb45bc1ea4a3cef48408a9039d3fbdb9
BUG: 1114403
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/8200
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Kaushal M <kaushal@redhat.com>
2014-07-04 01:27:22 -07:00
Venkatesh Somyajulu
dc46d5e84f cluster/dht: Added logging of new layout for dir-selfheal
Added a log which logs the new layout which will be used
for the directory self healing

It prints:

a) Subvolume name
b) Error --> Is needed because layout healing depends on
             the error and having it in log will help in
             debugging
c) Start     Starting of the layout range
d) Stop      Ending of the layout range

Change-Id: I48c9c697716a899165ed29b737362a75c62e09b3
BUG: 1113066
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/8173
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-03 09:22:37 -07:00
Rajesh Joseph
dedef037d6 glusterd/snapshot: Change file-system uuid to file-system label
Problem: In XFS changing file-system UUID with xfs_admin is causing
too much delay with large file-system. The time taken by xfs_admin
tool to change UUID is directly proportional to the size of the file
system.

Cause: In XFS file-system UUID is stored in file-system superblock.
Therefore for chaning UUID all the superblock needs to be changed.

Fix: Instead of using file-system UUID use file-system label.

Change-Id: Ifb4c668fb29cfc1c89d9b221abc8d09dc09589ec
BUG: 1115107
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/8215
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-07-03 06:53:12 -07:00
Jose Castillo
3df72ddcdb Avoid hard-coded x86_64 arch in tests/basic/rpm.t
tests/basic/rpm.t hard-codes x86_64 to pick the build-root for mock, causing
errors when called from a different architecture. With this patch, we use
'uname -i' to select the right architecture.

v2: Fixed typo as suggested by Justin Clift.

Change-Id: I07bc2af9317dc315bca460149ea3430071537780
BUG: 962169
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Reviewed-on: http://review.gluster.org/8214
Reviewed-by: Vikhyat Umrao <vumrao@redhat.com>
Reviewed-by: Justin Clift <justin@gluster.org>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-03 01:32:16 -07:00
Harshavardhana
5723645715 porting: Enable 64bit inode properly on Darwin
Usage of -D__DARWIN_64_BIT_INO_T was wrong, use

-D_DARWIN_USE_64_BIT_INODE instead

Change-Id: I4b532232d0a61fe30f08c41ffeba50fff4ecd79e
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8219
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-02 17:26:32 -07:00
Harshavardhana
6718342a2c porting: Provide fallocate and fremovexattr for OSX
Change-Id: I563216f83edaff6d01a251ef0c1746a14aec700c
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8217
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-02 17:24:17 -07:00
Harshavardhana
1b74cf9929 porting: Port for FreeBSD rebased from Mike Ma's efforts
- Provides a working Gluster Management Daemon, CLI
- Provides a working GlusterFS server, GlusterNFS server
- Provides a working GlusterFS client
- execinfo port from FreeBSD is moved into ./contrib/libexecinfo
  for ease of portability on NetBSD. (FreeBSD 10 and OSX provide
  execinfo natively)
- More portability cleanups for Darwin, FreeBSD and NetBSD
- Provides a new rc script for FreeBSD

Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f
BUG: 1111774
Original-Author: Mike Ma <mikemandarine@gmail.com>
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8141
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-02 17:20:34 -07:00
Kaleb S. KEITHLEY
e4a3566681 libglusterfs/client_t: cliententries are never expanded
clienttable->cliententries are never expanded once all the available
entries have been used.

Also removed a couple chatty log messages.

Change-Id: Iff2d92fe1116cc6c6b72ff3d173aee26e69780ed
BUG: 1113745
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/8184
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-02 10:07:41 -07:00
Vikhyat Umrao
aa21473f0e build: glusterfs.spec.in, adding nfs-utils package dependency for server package
nfs-utils provides rpc.statd and it is a requirement for gluster-nfs

Change-Id: I054b7d6d8fb1efe0fed9c90077a93c4f559c1ef4
BUG: 1065654
Reported-by: Satheesaran Sundaramoorthi <sasundar@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
Reviewed-on: http://review.gluster.org/7966
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-02 06:29:42 -07:00
Vijaikumar M
ca6980d082 cli: Format the hostname column properly in the 'pool list' o/p
In the pool list output, if the hostname is lengthier, then the indentation was not proper.

Solution:
1) get the full list of hostnames first (prior to display)
2) Determine the maximum length of the hostname strings from that
3) Create an appropriate display padding amount, using the length from (2)

Change-Id: Icc3724975a5e30b02b8e06db709930cbac5e0875
BUG: 1028871
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/8127
Tested-by: Justin Clift <justin@gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-02 04:04:25 -07:00
Sachin Pandit
0e6cd39d55 TESTS : replace "umount" with "force_umount" giving 5 retries.
Change-Id: I89dd87b9843273c57843bb28706f284e32debc48
BUG: 1092850
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/8167
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-02 02:56:32 -07:00
Jeff Darcy
caa8a4ea50 rpc/auth: allow SSL identity to be used for authorization
Access to a volume is now controlled by the following options, based on
whether SSL is enabled or not.

 * server.ssl-allow: get identity from certificate, no password needed

 * auth.allow: get identity and matching password from command line

It is not possible to allow both simultaneously, since the connection
itself is either using SSL or it isn't.

Change-Id: I5a5be66520f56778563d62f4b3ab35c66cc41ac0
BUG: 1114604
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/3695
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-02 02:47:05 -07:00
Joseph Fernandes
831efecf92 glusterd/snapshot : Fix for snap create preval for remote peer err msg
Fix for the snap create prevalidation error collation when remote peer failed.

Change-Id: If9563580eae4d9bc4d4d795f0b434f2c85b94007
BUG: 1101993
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/7899
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-07-02 02:19:37 -07:00
Kaleb S. KEITHLEY
858b570a0c build/glusterfs.spec.in: %post server doesn't wait for old glusterd
'killall glusterd' needs to wait for the old glusterd to exit
before starting the updated one, otherwise the new process can't
bind to its socket ports

Change-Id: Ib43c76f232e0ea6f7f8469fb12be7f2b907fb7c8
BUG: 1113543
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/8185
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-02 01:39:30 -07:00
Pranith Kumar K
4e74cbf1da performance/md-cache: Guard against null dict
BUG: 1114677
Change-Id: Ica4f4ad97d7d1edc3e48e7f1a6ec70b14acffc66
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8205
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-01 23:48:20 -07:00
Niels de Vos
e19dc72102 Add contact data for the new port maintainers
New port maintainers have been announced. These should be included in
the MAINTAINERS file. Also include some corrections and add missing status
tags.

URL: http://supercolony.gluster.org/pipermail/gluster-devel/2014-June/041223.html
Change-Id: I0729c0ea5fec8a645f18543915c0c0c3fce34329
BUG: 1040351
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/8188
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-01 23:47:13 -07:00