5671 Commits

Author SHA1 Message Date
Pranith Kumar K
0c05cde4a1 cluster/afr: Handle NULL fdctx in fsync
Problem:
If fdctx is NULL in afr_fsync, process crashes because
of NULL dereference.

Fix:
if fdctx is NULL, always say witnessed unstable write so
that fsyncs are done properly. Handled fdctx being null
in afr_delayed_changelog_post_op otherwise fsync stub is
never resumed and the mount was hanging.

Change-Id: Icacc900e9be63c29db3325cb0e19cc250adebaac
BUG: 978794
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5258
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-27 23:34:29 -07:00
Pranith Kumar K
4bea8a2cfe protocol/server: Initialize connection variable
Change-Id: I46badd812e9b936911ddd2793cef7ce30ec220a6
BUG: 979237
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5266
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-27 23:31:52 -07:00
Niels de Vos
75ee14ffbe build: declare lvm_lv_from_name() if it is missing from lvm2app.h
The bd-xlator can not be built successfully on certain Debian
distributions due to a missing declaration of lvm_lv_from_name(). This
function is available for linking, but it does not exist in the header
file.

This change adds a detection for lvm_lv_from_name() in both the library
for linking, and the declaration in the header file. If the 1st is
missing, the bd-xlator can not be built, and if only the 2nd one is
missing, we'll declare lvm_lv_from_name() ourselves. This makes it
possible to build the bd-xlator on the affected Debian distributions
too.

Change-Id: I0c823a7861b02bb5d9c1abb76ebfff92f272f9eb
BUG: 976946
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5250
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-27 04:37:53 -07:00
Rajesh Amaravathi
e00fb41778 nfs/auth: reject mounts if getaddrinfo fails
When nfs.addr-namelookup is turned on, if the
getaddrinfo call fails while authenticating client's
ip/hostname, the mount request is denied

Change-Id: I744f1c6b9c7aae91b9363bba6c6987b42f7f0cc9
BUG: 947055
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/5143
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-26 23:00:00 -07:00
Niels de Vos
8404ec28e4 rpm: move the mount/api xlator to the glusterfs-api sub-package
The main glusterfs package included the xlator/api.so file which caused
a dependency on the glusterfs-api package:

  # rpm -i glusterfs-3.4.0-0.6.beta3.el6.x86_64.rpm
  error: Failed dependencies:
  libgfapi.so.0()(64bit) is needed by glusterfs-3.4.0-0.6.beta3.el6.x86_64

Moving the mount/api xlator to the glusterfs-api package will prevent
the automatic dependency generator to add the dependency to the main
package.

Change-Id: I4650c40cdfe610b9b69bab07d262093854aa6583
BUG: 950083
Reported-by: Vijay Bellur <vbellur@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5255
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-26 06:35:03 -07:00
Kaleb S. KEITHLEY
f7b1245ca2 build: sync glusterfs.spec.in with Fedora glusterfs.spec
* add glusterfs-api and glusterfs-api-devel sub-packages
 * add extras/systemd/glusterd.service. Use it (or extras/init.d/glusterd)
   instead of the Fedora versions.
 * restores ability to build glusterfs RPMs from the dist tarball with
   'rpmbuild {-ts,-tb,-ta} glusterfs-XXX.tar.gz'
 * other minor cleanups mostly to sync with fedora .spec and to build
   from the dist tarball. Any differences will be resolved in the fedora
   .spec in the next release (i.e. beta4 or GA).

(still considering whether to add fedora glusterfsd.{init,service} files
to glusterfs or remove them from fedora.)

BUG: 950083
Change-Id: Ibda3cd57b24ef5c2a27446703e718e5044ec546c
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/5230
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Bala FA <barumuga@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2013-06-26 04:36:47 -07:00
Vijay Bellur
183546aa2d doc: Move admin-guide to markdown format.
Editing markdown is probably more easier than xml.

pandoc can then be used for conversion to html, pdf and any other necessary
formats. Note that pandoc has the following input and output formats:

Input: markdown and (subsets of) Textile, reStructuredText, HTML, LaTeX, and
DocBook XML.

Output:plain text, markdown, reStructuredText, XHTML,  HTML  5,  LaTeX
(including beamer slide shows), ConTeXt, RTF, DocBook XML, OpenDocument XML,
ODT, Word docx, GNU Texinfo, MediaWiki markup, EPUB, Textile, groff man pages,
Emacs Org-Mode, AsciiDoc, and Slidy, Slideous, DZSlides, or S5 HTML slide shows.
It can also  pro‐ duce PDF output on systems where LaTeX is installed.

All documentation changes can be submitted as changes to markdown and we can
attempt a periodic documentation refresh on gluster.org.

Change-Id: I5dcf7f79184cd6b6d62ce7065d2faa352622f6ac
Reviewed-on: http://review.gluster.org/5232
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-06-25 10:36:45 -07:00
Pranith Kumar K
fb064ec4e3 nfs: Remove afr split-brain handling in nfs
We added this code as an interim fix until afr can
handle split-brains even when opens are not issued.
Afr code has matured to reject fd based fops when
there are split-brains so we can remove it.

Change-Id: Ib337f78eccee86469a5eaabed1a547a2cea2bdcf
BUG: 974972
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5227
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-25 09:40:39 -07:00
Pranith Kumar K
03f5172dd5 cluster/afr: Fix fd/memory leak on fsync
Change-Id: I764883811e30ca9d9c249ad00b6762101083a2fe
BUG: 976800
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5248
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2013-06-24 09:45:19 -07:00
shishir gowda
de31ac4219 cluster/dht: In reconfig handle removed decommissioned nodes
If no decommissioned nodes options are set in the options, then
clear the conf->decommissioned_bricks.

Change-Id: I426d2bcc874aab21b2eba0b16a580b9a26672ea2
Signed-off-by: shishir gowda <sgowda@redhat.com>
BUG: 973073
Reviewed-on: http://review.gluster.org/5199
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-21 10:38:55 -07:00
Rajesh Amaravathi
3f72e52c93 rpc: duplicate request cache for nfs
Duplicate request cache provides a mechanism for detecting
duplicate rpc requests from clients. DRC caches replies
and on duplicate requests, sends the cached reply instead of
re-processing the request.

Change-Id: I3d62a6c4aa86c92bf61f1038ca62a1a46bf1c303
BUG: 847624
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4049
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-21 10:33:49 -07:00
Anand Avati
4cde70a0e5 glusterfsd: consider xlator type too in topology check
When cluster.nufa option is enabled, we only change the translator
type, but leave the translator name as-is. This results in the
topology change check to conclude that a graph switch is not needed.

Change-Id: I4f4d0cec2bd4796c95274f0328584a4e7b8b5cd3
BUG: 975599
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5244
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
2013-06-21 02:40:05 -07:00
Niels de Vos
bc27b7a9e4 store: move glusterd_store functions from mgmt/glusterd to libglusterfs
Making the glusterd_store_* functions re-usable will help with future
changes that need to read/write lists of items.

BUG: 904065
Change-Id: I99fb8eced76d12d5a254567eccff9790b43d8da3
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4676
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-20 06:48:54 -07:00
Anand Avati
d7e80787fc gfapi: fix read past EOF in glfs_preadv()
When syncop_preadv() returns 0, we are returning @size as-is
(without modifying user passed buffer). This results in
junk data being read when read offset is at or beyond EOF.

Change-Id: I8aa9c957359f9a52833b944b452f501b6f5538d3
BUG: 953694
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5236
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: José Rivera <jrivera@redhat.com>
Tested-by: José Rivera <jrivera@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-20 01:45:50 -07:00
Pranith Kumar K
cc9ca7d2b2 cluster/afr: Perform delayed changelog wakeups for anon fd
Problem:
Nfs xlator never does open on a file for performing writes,
afr does not perform changelog wakeup for this fd so operations
which do metadata operations as soon as the data operations are
completed perceive a delay of 'post-op-delay-secs'.

Fix:
Perform changelog wakeup on anon-fd if the fd with same pid is
not present in inode-list.

Note:
This approach is a short-term fix. A proper fix needs a new domain
for taking metadata locks so that data/metadata locks don't compete
with each other.

Change-Id: I253afb289eadf30c7951e56fb2c4840d7132f5e4
BUG: 966018
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5066
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-20 01:44:37 -07:00
Michael Brown
bb1d5e826f nfs/mount3: fix crash in subdir resolution
* __mnt3_resolve_export_subdir_comp: if nfs_entry_loc_fill fails,
  mres->resolveloc does not contain valid data
* gf_log should use 'gfid' instead of mres->resolveloc.inode->gfid
* fixes a crash if program flow gets to this line

Change-Id: Idb0d6f97ea73eaf9056d28267ad7a42aa8cf6579
Signed-off-by: Michael Brown <michael@netdirect.ca>
Reviewed-on: http://review.gluster.org/4948
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2013-06-19 00:16:22 -07:00
Raghavendra G
1d6f6a65d7 protocol/server: print connection-id in fop failure logs.
Currently we have tuple (server-xlator-name, callid) for identifying
a call. However it does not uniquely identify the operation when there
are multiple clients (since operations from all clients go through same
server). Adding connection-id resolves this ambiguity.
Also printing connection-id helps diagnose failures associated with
connection state (like fds, locks).

Change-Id: I13563bd06ee9b72fc1a10d239f77db5183658573
BUG: 963540
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/5011
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-18 23:27:20 -07:00
Krutika Dhananjay
78a2e27ec7 glusterd: Log peer op status at the appropriate time
Change-Id: Ia8e1af082078f2f791708ba4faa4992bf291dd6e
BUG: 961339
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/5023
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-18 22:15:12 -07:00
Krishnan Parthasarathi
bb5ded9bee glusterd: Disable transport before cleaning up rpc object
Problem:
rpc_transport object, which is part of rpc_clnt, is destroyed
prematurely. This is because, rpc_transport object is ref'd by socket
layer and rpc layer. These ref's, until the synctask'izing of
operations, were unref'd sequentially in the epoll thread.
With more threads at play, the sequential unref guarantee is off.

Fix:
Shutting down the transport before proceeding with cleaning up of
rpc_clnt object would serialize the unref's on the rpc_transport object
and thus eliminating the race.

Also, we don't store the address of brickinfo in brick's rpc notify
function, to avoid the possibility of referring a freed brickinfo.
Instead we use a string based id to 'reach' the corresponding brickinfo.

Change-Id: If2739e2eeaee1e8b071ab2b6754b7ea0f81cfceb
BUG: 962619
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5000
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-18 22:10:39 -07:00
Rajesh Amaravathi
bda60de187 nfs: log stale mount errors occasionally
log the state mount errors only occasionally so
as not to fill log file with too many of them.

Change-Id: Ib5a2485dc2ce3a181cff34bbb6d7aba17a2e4d4d
BUG: 804301
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/5229
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-18 20:28:04 -07:00
Niels de Vos
eb6b81e1fc protocol/rpc: move latest added procedures to the end of the array
While looking at the newly introduced procedures FALLOCATE and DISCARD,
it seems that these were added with already existing procedure numbers.
This makes the protocol incompatible with existing roll-outs.

It is very confusing when new procedures are added somewhere in the
middle of the array. This will cause the number of existing procedures
to change. It is much preferred to add new procedures at the end of the
array. This changes not only corrects the enum that generates the
procedure numbers, but also the ordering in the client and server
fops-array for clarity.

Correcting this greatly simplifies adding support for these new
procedures in Wireshark and will prevent confusion to the people reading
network traces (with or without Wireshark).

Change-Id: Ib9e7978531d016c7230d756b855cb94cb0793b0f
BUG: 974976
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5215
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-17 09:34:56 -07:00
Krishnan Parthasarathi
74fe305727 rpc: Cleanup rpc object in TRANSPORT_CLEANUP event
rpc_transport object should be alive as long as the rpc_clnt object is
alive. To ensure this, on rpc_clnt's last unref, we cleanup the
corresponding rpc_transport object and complete the rpc_clnt cleanup
later, in a bottom-up fashion.

Introduced rpc_clnt_is_disabled, to allow higher layers to differentiate
between the 'final'[1] disconnect triggered from upper layers, and a
normal disconnect. This differentiation helps in cleaning up resources,
at higher layers, in a race-free manner.

[1] - 'final' here means that the rpc and the associated connection, is
not going to be used anymore. eg - glusterd_brick_disconnect on
volume-stop.

Change-Id: I2ecf891a36e3b02cd9eacca964e659525d1bbc6e
BUG: 962619
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5107
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-15 22:34:28 -07:00
Rajesh Amaravathi
d6e5c6d8c4 nfs: option to disable acl
1. Option to disable or enable acl with nfs.acl boolean
   option.

2. Deregister the acl service with the portmapper service
   when no longer required.

Change-Id: I6562b6b40138d040aa2bf1e5641f4c0e0e9f9d09
BUG: 970070
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/5136
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-15 22:32:18 -07:00
Krishnan Parthasarathi
f857def763 glusterd: Ignore directories matching *.tmp in store
store being glusterd's persistent store under /var/lib/glusterd/

Change-Id: I1c01a09a8ce4a73ea612f05e7f14d4ab39ad1628
BUG: 971796
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5177
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-13 19:16:40 -07:00
Venkatesh Somyajulu
dccd014947 cluster/afr: Improvement in logging of self heal completion status
Problem:
As the end of the self heal, message logged by
"afr_self_heal_completion_cbk" is inadequate to determine what exactly failed
during the course of afr self heal. It is worth to have knowledge of what all
types of self heal got triggered for an entity and whether the status is success
or failure.

Fix:
At the end of self heal, it will log information about out of 4 types of self
heal (gfid or missing entry self heal, metadata, data and entry self heal),
who all got triggered and who all got failed or successful at the end.

Change-Id: I5360762fbd7d391ac4c6af6706b4835c5801835a
BUG: 968301
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/5106
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-13 18:52:10 -07:00
Venkatesh Somyajulu
77e6caa440 libglusterfs: Fix circular buffer to dump entries if count is less than 1024
Problem:
To dump the values present in the circular buffer, index always
moves from current index to used_len. But if circular buffer is not
completely filled even once then next index to be filled  and used length
value are always same which means it will never dump any value.

Fix: Modified the logic of buffer traversing to dump values so that  it
will still maintain FIFO and cover both the cases where buffer is either
partially filled or being used more than once.

Change-Id: If73a5e481cca1751d57aba1136c2d25d23ce073c
BUG: 972459
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/5197
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
2013-06-13 18:30:22 -07:00
Niels de Vos
4ec4ae08c3 rpm: correct AutoRequires filtering on recent Fedora
Recent Fedora releases (F17 and newer) do not need the
__requires_exclude macro for filtering automatically generated Requires
for <xlator>.so files anymore. It is already sufficient to filter each
<xlator>.so from the Provides.

This prevents the following (harmless) warning from being printed during
build:

    Ignoring invalid regex -P ^(?!lib).*.so.*$

BUG: 972465
Change-Id: Icc36f421d283ddb993c8f31e0dfdaa4f27135bb7
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5203
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-13 16:29:13 -07:00
Brian Foster
cede8eb3d0 gfapi: async discard support
From: Bharata B Rao <bharata@linux.vnet.ibm.com>

Add glfs_discard_async() to meet QEMU's discard requirements.

BUG: 963678
Change-Id: I97723107fca88dd96cddc08cd67a286645a37922
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/5144
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-13 14:38:57 -07:00
Brian Foster
17f2871724 glusterfs: discard (hole punch) support
Add support for the DISCARD file operation. Discard punches a hole
in a file in the provided range. Block de-allocation is implemented
via fallocate() (as requested via fuse and passed on to the brick
fs) but a separate fop is created within gluster to emphasize the
fact that discard changes file data (the discarded region is
replaced with zeroes) and must invalidate caches where appropriate.

BUG: 963678
Change-Id: I34633a0bfff2187afeab4292a15f3cc9adf261af
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/5090
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-13 14:37:43 -07:00
Brian Foster
d1ccc4e400 gluster: add fallocate fop support
Implement support for the fallocate file operation. fallocate
allocates blocks for a particular inode such that future writes
to the associated region of the file are guaranteed not to fail
with ENOSPC.

This patch adds fallocate support to the following areas:

	- libglusterfs
	- mount/fuse
	- io-stats
	- performance/md-cache,open-behind
	- quota
	- cluster/afr,dht,stripe
	- rpc/xdr
	- protocol/client,server
	- io-threads
	- marker
	- storage/posix
	- libgfapi

BUG: 949242
Change-Id: Ice8e61351f9d6115c5df68768bc844abbf0ce8bd
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/4969
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-13 14:37:21 -07:00
Pranith Kumar K
328ea4b16a mgmt/glusterd, socket: Change logging for brick disconnects
For unix path based sockets, the socket path is
cryptic (md5sum of path) and may not be useful for
the user in debugging so log it in DEBUG.

Changed logging in brick_rpc_notify to log brickinfo
for disconnects.

Change-Id: I69174bbbbde8352d38837723e950ad8fc15232aa
BUG: 963153
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5009
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>
2013-06-11 07:52:16 -07:00
Pranith Kumar K
22d821969a cluster/dht: Make sure loc has gfid
Problem:
In some code paths neither loc->gfid nor loc->inode->gfid
is populated which leads to EINVAL for linkfile setattr
in dht_linkfile_attr_heal.

Fix:
Populate loc->gfid before dht_linkfile_attr_heal.

Change-Id: I062770e6f6eaead304eff1dae81f8588a3b97eed
BUG: 971805
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5178
Reviewed-by: Shishir Gowda <sgowda@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-10 18:45:48 -07:00
Krishnan Parthasarathi
214dccb317 glusterd: Add a cmd for getting uuid of local node
Usage: gluster system:: uuid get

This is needed since we generate uuid of a node in a lazy manner. ie, we
generate a uuid for the node only on the first volume or peer operation,
when the node needs an external identity.  With this command, we can
force[1] the uuid generation, without a volume or peer operation performed.

[1]: Querying for uuid (or uuid get), forces uuid to come into
existence.

Change-Id: I62c8b6754117756aa4d773dd48af4ddeb1a1d878
BUG: 971661
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5175
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2013-06-10 12:20:05 -07:00
Rajesh Joseph
50ae4e3eee nfs: gluster volume set help shows null as default value
Bug(967445): The default value for all nfs options is displayed as "(null)"

Fix: Changed nfs options to show default value.

Change-Id: I3b1f27439c19a6655f7dcc7891df40706db9e474
BUG: 967445
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/5098
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-06 12:03:15 -07:00
Pranith Kumar K
5eae1db04b cluster/dht: Fix unused-but-set-variable warnings
Change-Id: Ie2b2dc54aa0d500c35752c72d3b562bcc05b1fc2
BUG: 969336
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5123
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-06 03:59:05 -07:00
Pranith Kumar K
d68fbc3f81 mgmt/glusterd: Set task op at the time of task-id set
Problem:
If a remove-brick start is executed on m1 with brick from m2
on local subvolume no rebalance process is launched. Because of
this volinfo->rebal.op is not set. This leads to volume status
failures.

Fix:
Set rebal.op even when the reblance process is not started.

Change-Id: I71c7e6f09353be14c1e8edca3c8685ebfdf226d6
BUG: 964059
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5030
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-06 03:56:28 -07:00
shishir gowda
d402b07952 cluster/dht: Ignore ENOENT errors for unlink of linkfiles
If unlink of linkfile returns ENOENT, do not fail unlink.
Proceed with unlinking of cached file.

Change-Id: If7cec92b40c39d68dd9c3606c6c2c3a6bd67d27b
BUG: 966848
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/4971
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-06 03:55:49 -07:00
Krishnan Parthasarathi
31f5822181 template: A minimal example xlator to build on
This xlator is intended to save new GlusterFS developers
from fighting it with autotools.

How to add template xl onto the xlator graph?
[..]

volname-template
type testing/features/template
subvolumes volname-dht
end-volume

[..]

Change-Id: If513284bb590be7c3b093054108dba2883064190
BUG: 916985
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4604
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-05 05:32:21 -07:00
Venkatesh Somyajulu
68a97ece53 cli: Remove unused port info from peer status.
Problem: "gluster peer status" on some nodes gives port info and fails to give
on other. But it is a hard coded value.

Fix: Removing the port info from command

Change-Id: I919f0349f252e658bfc13e60bb8e171da32eaf25
BUG: 964026
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/5027
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-05 05:28:17 -07:00
Pranith Kumar K
7413ed951f cluster/afr: Avoid order mismatch in blocking entrylks
Problem:
When taking blocking entrylks, afr orders the entrylks based on
uuid_compare of gfids of parent dirs, if they are equal then it orders
them based on the basenames. While this approach works fine, the
implementation assumes loc->gfids to be populated at the time of
the comparison, but loc may have gfid in loc->inode->gfid instead
of loc->gfid which was leading to order mismatches and dead-locks.

Fix:
Implemented loc_gfid which gives gfid by checking both loc->gfid,
loc->inode->gfid. Used this for ordering the blocking entrylks.

Change-Id: Ib0db36bbaf0df09fa87c3c3bb6a834db74fc2154
BUG: 965987
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5062
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>
2013-06-05 05:22:52 -07:00
Jeff Darcy
5c1710ed60 transport/socket: fix connect/disconnect races
We might receive a connect request while a disconnect is still in
progress, requiring more states and (the return of) poller generation
numbers to avoid redundant pollers.  We might also get either kind of
request from within our own rpc_transport_notify upcall, so we have to
avoid locking and use the PLEASE_DIE state instead.

Change-Id: Icbaacf96c516b607a79ff62c90b74d42b241780f
BUG: 970194
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/5137
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-04 15:37:54 -07:00
shishir gowda
dbfe779f30 cluster/dht: Prevent crash in dht_linkfile_lookup
Assign local = frame->local before dereferencing
local->linkfile.linkfile_cbk. Additionally, fail if
op_ret is non_zero.

Change-Id: I96a2f34ba29887da9ccaae38a644431cf7c43265
BUG: 966858
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/5141
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-04 13:27:48 -07:00
Kaushal M
0c1916f3e1 glusterd-syncop: Fix unlocking and collating errors
* Only those peers which were locked need to be unlocked.
* Fix location of collating errors in callbacks. The callback functions
  could miss collating errors if there was an rpc error.

Change-Id: Ie27c2f1ec197da4f5077a4d6e032127954ce87cd
BUG: 948686
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/5087
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-04 13:27:35 -07:00
Pranith Kumar K
a72e77f7bc cluster/dht: Set layout when inode is present
Problem:
Lookups in discovery fail with ENOENT so local->inode
is never set. dht_layout_set logs the callstack when
the function is called in that state.

Fix:
Don't set layout when lookups fail in discovery.

Change-Id: I5d588314c89e3575fcf7796d57847e35fd20f89a
BUG: 965434
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5055
Reviewed-by: Shishir Gowda <sgowda@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-06-04 07:49:26 -07:00
Raghavendra Bhat
3f5e575a07 system/posix-acl: check for the sticky bit of the parent directory
* While creating links, check if there is sticky bit set for the parent
  directory and whether the sticky bit permits the user to create the link.

Change-Id: Ic0d09d9ed579c4eb47462c71602a3a60cc7d3bc1
BUG: 958691
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4934
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-03 16:11:12 -07:00
Jeff Darcy
a3e593f9f1 cluster/dht: Return success in dht_discover if layout issues
We cannot heal in dht_discover, as it is a gfid based lookup, and not
path based. So, returning error here would lead to app's to see failure.

Also, update the layout in inode_ctx even if it has anomalies. Let
subsequent heals fix the issue.

Change-Id: I2358aadacf9a24e20a22ab0a6055c38c5eb6485c
BUG: 960348
Original-author: shishir gowda <sgowda@redhat.com>
Signed-off-by: shishir gowda <sgowda@redhat.com>
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4959
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-06-03 01:06:36 -07:00
Pranith Kumar K
9e974f9311 socket: Prevent extra logging in socket_rwv
Problem:
If the socket is not even connected socket_rwv fails
and the error log comes every 3 seconds for every
re-connect.

Fix:
Prevent this error log if the socket is not even
connected.

Change-Id: I963f1345c4b6779dd5491948f7f5c4357a507b67
BUG: 963088
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5008
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-05-31 11:22:24 -07:00
Pranith Kumar K
114c02e54a mgmt/glusterd: Make sure peerinfo->uuid_str is assigned
Change-Id: I9e2743ab61c8baee92a1dfd376ec4bb145776176
BUG: 963524
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5016
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-05-31 11:20:31 -07:00
Venkatesh Somyajulu
c9eb8d1a3f cluster/afr: Removed misleading log from afr_start_crawl
Problem: If it is fresh volume with no files created the xattrop directory is
         not present. If crawl happens in that time, lookup for xattrop
         directory will fail and it results in  printing a misleading log.

Fix:     Changed misleading log.

Change-Id: Iae5da3e8423564d64096f88abdaf8c98e4935840
BUG: 928575
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4993
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-05-31 11:18:42 -07:00
shishir gowda
3c22cf86ad cluster/dht: Handle linkfile creation with EEXIST error
If linkfile create fails with EEXISTS, then check if the file
is a linkfile for the same file. If not, return the error

Change-Id: Iab42db54422dea69de0049b5196365e65edadd91
BUG: 966858
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/5060
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-05-31 06:44:11 -07:00