5407 Commits

Author SHA1 Message Date
Krishnan Parthasarathi
79e4c7b2fa stack: use list_head for managing frames
PROBLEM
--------

statedump requests that traverse call frames of all call stacks in
execution may race with a STACK_RESET on a stack.  This could crash the
corresponding glusterfs process. For e.g, recently we observed this in a
regression test case tests/basic/afr/sparse-self-heal.t.

FIX
---

gf_proc_dump_pending_frames takes a (TRY_LOCK) call_pool->lock before
iterating through call frames of all call stacks in progress.  With this
fix, STACK_RESET removes its call frames under the same lock.

Additional info
----------------

This fix makes call_stack_t to use struct list_head in place of custom
doubly-linked list implementation. This makes call_frame_t manipulation
easier to maintain in the context of STACK_WIND et al.

BUG: 1229658
Change-Id: I7e43bccd3994cd9184ab982dba3dbc10618f0d94
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/11095
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-06-22 00:41:43 -07:00
Krutika Dhananjay
6b4add6b3f features/shard: Skip shards resolution if lookup on /.shard returns ENOENT
This change is done in [f]truncate, rename, unlink and readv.
Also, this patch also makes lookup in shard delete GF_CONTENT_KEY
as a workaround for the problems with read caching of sparse files
by quick-read. A proper solution would involve shard_lookup_cbk()
performing a readv, aggregating and ordering the responses and setting
it in the xdata before unwinding the response to upper translators, which
will be done in a separate patch.

Change-Id: Ie12edb9ba8c1fcea38fea0a797916cb2a98fb30c
BUG: 1223759
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/11065
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-06-22 00:21:00 -07:00
Manikandan Selvaganesh
4acd9d1bfc protocol/client : removing duplicate printing in gf_msg
Since the 3rd and 5th argument of gf_msg framework
prints the error string in case of strerror(),
5th argument is removed.

Change-Id: Ib1794ea2d4cb5c46a39311f0afcfd7e494540506
BUG: 1194640
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/11280
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-06-20 16:13:09 -07:00
Venky Shankar
a6e412c4fc features/bitrot: log scrub frequency & throttle values
Change-Id: I56d5236c37a413046b5766320184047a908f2c8d
BUG: 1231620
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/11190
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-06-20 16:11:06 -07:00
Avra Sengupta
f460d1c9a2 glusterd/shared_storage: Added help description for enable-shared-storage option
Added help description in gluster volume set help for
cluster.enable-shared-storage option.

Change-Id: I36481d1ca856739e83f0c9c7432ac0cb4131d665
BUG: 1233544
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11324
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-06-19 13:29:47 -07:00
Mohammed Rafi KC
7aaa414c67 glusterd/tier: configure tier daemon during volume restart
rebalance daemon will be running on every tier volume for
promoting/demoting the files. When volume/glusterd is restarted,
then we need to configure the daemon.

Change-Id: Ib565240a70edea2ec8bc1601c52b40c0783491d3
BUG: 1225330
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/10933
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
2015-06-19 09:58:49 -07:00
Mohammed Rafi KC
2fea88d70b tier/glusterd: Add description for volume set options
Change-Id: Idc2eed77f8d841b6628183867e84601ce605d610
BUG: 1215571
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/10757
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
2015-06-19 08:41:15 -07:00
vmallika
8ab6608acc quota/marker: fix mem-leak, free contribution node
When removing contribution xattr, we also need to free
contribution node in memory

Change-Id: I5fe97813a8f39e2f00401976046bd280f2eea54d
BUG: 1207735
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11311
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-19 03:48:01 -07:00
Sakshi
c791765bc8 dht : Error value check before performing rebalance complete
Change-Id: I7a0cd288d16f27b887c7820162efdbe99a039d95
BUG: 1188242
Signed-off-by: Sakshi <sabansal@redhat.com>
Reviewed-on: http://review.gluster.org/11097
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Reviewed-by: Susant Palai <spalai@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-19 03:47:00 -07:00
anand
8ddf7f2669 glusterd: Removing sync lock and unlock inside rcu read critical section
Issue : Glsuterd was crashing during peer probe.

RCA :  In glusterd, we are using big lock which is implemented based on sync
task frame work for thread synchronization, sync task frame work swap the threads
if there is no worker pool threads available. Due to this rcu lock and rcu unlock
was happening  in different threads (urcu-bp will not allow this), resulting into
glusterd crash.

fix : Removing sync lock and unlock inside rcu read critical section, which was left out by
http://review.gluster.org/#/c/10285/ patch.

Change-Id: Id358dfcc797335bcd3b491c3129017b2caa826eb
BUG: 1232693
Signed-off-by: anand <anekkunt@redhat.com>
Reviewed-on: http://review.gluster.org/11276
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-06-19 02:32:35 -07:00
Xavier Hernandez
4442449f14 cluster/ec: Avoid parallel executions of the same state machine
In very rare circumstances it was possible that a subfop started
by another fop could finish fast enough to cause that two or more
instances of the same state machine be executing at the same time.

Change-Id: I319924a18bd3f88115e751a66f8f4560435e0e0e
BUG: 1233258
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/11317
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2015-06-18 23:33:38 -07:00
Raghavendra G
dda7608736 cluster/dht: Fix Null pointer dereference while logging
Change-Id: I1ea358b83267b0bcdf654ce18fe881fd4a6bf08d
BUG: 1233139
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/11313
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-06-18 22:16:19 -07:00
vmallika
81972918a0 quota: fix double accounting with rename operation
When a rename operation is performed, we are renaming
the file first and performing remove-xattr when reducing
the contri size from parents.
This remove-xattr fails as the file is alreday renamed,
this failure causes reduce-parent-size to abort resulting
in double quota accounting

This patch fixes the problem. We don't need to perform remove-xattr
operation on a file when performing reduce-parent-size txn as this
will be alreday done before starting reduce-parent-size txn

Change-Id: If86e3dbb0233f6deaaa90bee72cb0ec1689c7325
BUG: 1232572
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11264
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-06-18 18:59:02 -07:00
Nandaja Varma
e9a681fb97 quota/glusterd: porting to new logging framework
Change-Id: I879a181b6d6b97119a6b4fab90a12b8386635383
BUG: 1194640
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/10473
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
2015-06-18 03:02:29 -07:00
Kotresh HR
daf22a3b59 glusterd: Fix snapshot of a volume with geo-rep
Problem:
    Snapshot fails for a volume configured with geo-rep
    if geo-rep is created with root user with the following
    syntax.
    gluster vol geo-rep <master_vol> root@<slave_host>::<slave_vol>

    It works fine if created with following syntax.
    gluster vol geo-rep <master_vol> <slave_host>::<slave_vol>

Cause:
    Geo-rep maintains persistent dictionary of slave associated
    with master volume. The dictionary saves the slave info
    along with 'root@' as sent from cli.
    Snapshot while constructing the working dir path to copy
    configuration files, constructs using this dictionary.
    But the actual working dir is created with out considering
    'root@'. Hence the issue.

Fix:
    Fix is done at two layers.
    1. Parse and negelect 'root@' in cli itself.
    2. For existing geo-rep sessions and upgrade scenarios,
       parse and neglect 'root@' in snapshot code as well.

Change-Id: If4e04f7f776ef71df4dd1e7e053ef75db98762b2
BUG: 1231789
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/11233
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-17 23:58:42 -07:00
Kotresh HR
ba7d5d914b libgfchangelog: Fix crash in gf_changelog_process
Problem:
    Crash observed in gf_changelog_process and
    gf_changelog_callback_invoker.

Cause:
    Assignments to arguments passed to thread is done
    post thread creation. If the thread created gets
    scheduled before the assignment and access these
    variables, it would crash with segmentation fault.

Solution:
    Assignments to arguments are done prior to the thread
    creation.

Change-Id: I6afc8ccedd050cf4b50b967fef8287a0c834177b
BUG: 1232666
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/11273
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2015-06-17 23:34:13 -07:00
Pranith Kumar K
1cc500f480 cluster/dht: Prevent use after free bug
Change-Id: I2d1f5bb2dd27f6cea52c059b4ff08ca0fa63b140
BUG: 1231425
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/11209
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-17 05:14:13 -07:00
Hari Gowtham
59e1c79ac6 Porting new log messages for posix
Change-Id: I29bdeefb755805858e3cb1817b679cb6f9a476a9
BUG: 1194640
Signed-off-by: Hari Gowtham <hgowtham@dhcp35-85.lab.eng.blr.redhat.com>
Reviewed-on: http://review.gluster.org/9893
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-17 03:05:59 -07:00
Meghana M
4a829e33d9 NFS-Ganesha: Automatically export vol that was exported before vol restart
Consider a volume that is exported via NFS-Ganesha. Stopping this
volume will automatically unexport the volume. Starting this volume
should automatically export it. Although the logic was already there,
there was a bug in it. Fixing the same by introducing a hook script.

Also with the new CLI options, the hook script S31ganesha-set.sh
is no longer required. Hence, removing the same.
Adding a comment to tell the user that one of the CLI
commands will take a few minutes to complete.

Change-Id: Ibff769ca04fef0c2a129c83fe31fc9c869350e8d
BUG: 1231738
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11247
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-06-16 05:50:14 -07:00
Shreyas Siravara
a9f58cd6cf nfs: Authentication performance improvements
When file operations are sent to the NFS server, authorized filehandles
are cached using the exportid, mountid, gfid and host as the key to the
cache. This meant that any file OR directory will always fail on the
*first* fop to that filehandle since the cache used the gfid as part of
the key to the cache. However, if an export is authorized, this
effectively means that ALL subdirectories and files in the export
directory are authorized per the permissions of the export. This results
slow times to walking a directory structure over an NFS mount.

Change-Id: Iad811ad7255b454d1712e75a637478401d40791e
BUG: 1232165
Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/11245
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-16 05:15:03 -07:00
Venky Shankar
8e81dccfce features/bitrot: fix fd leak in truncate (stub)
The need to perform object versioning in the truncate() code path
required an fd to reuse existing versioning infrastructure that's
used by fd based operations (such as writev(), ftruncate(), etc..).

This tempted the use of anonymous fd which was never ever unref()'d
after use resulting in fd and/or memory leak depending on the code
path taken. Versioning resulted in a dangling file descriptor left
open in the filesystem effecting the signing process of a given
object (no release() would be trigerred, hence no signing would be
performed). On the other hand, cases where the object need not be
versioned, the anonymous fd in still ref()'d resulting in memory
leak (NOTE: there's no "dangling" file descriptor in this case).

Change-Id: I29c3d2af9bbc5cd4b8ddf38954080e3c7a44ba61
BUG: 1227996
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/11077
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
2015-06-16 02:22:21 -07:00
Gaurav Kumar Garg
1ac3d28d8d bitrot/glusterd: gluster volume set command for bitrot should not supported
Currently gluster volume set <VOLNAME> bitrot succeeds. gluster volume
set command for bitrot is not supported.
Gluster should only accept gluster volume bitrot <VOLNAME> * commands.

Change-Id: I5ff4b79f202ad018c76188f19d6311aad0d7c166
BUG: 1229134
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/11118
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
2015-06-16 00:39:19 -07:00
Pranith Kumar K
476d4070db storage/posix: Handle MAKE_INODE_HANDLE failures
Change-Id: Ia176ccd4cac82c66ba50e3896fbe72c2da860c20
BUG: 1212110
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/11028
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-06-16 00:26:33 -07:00
Nandaja Varma
70bb8bf65b ops/glusterd: Porting messages to new logging framework
Change-Id: Iafeb07aabc1781d98f51c6c2627bf3bbdf493153
BUG: 1194640
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9905
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2015-06-16 00:26:07 -07:00
Nandaja Varma
25f28a9c23 rebalance,store,glusterd/glusterd: porting to new logging framework
Change-Id: I231b79e3414e60fe67cde577dd585cce83c8bfad
BUG: 1194640
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9877
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2015-06-15 22:28:58 -07:00
Raghavendra Bhat
60b6e5d2c3 features/bit-rot: check for both inmemory and ondisk staleness
* Let bit-rot stub check both on disk ongoing version, signed version xattrs and
  the in memory flags in the inode and then decide whether the inode is stale or
  not. This information is used by one shot crawler in BitD to decide whether to
  trigger the sign for the object or skip it.

  NOTE: The above check should be done only for BitD. For scrubber its still the
        old way of comparing on disk ongoing version with signed version.

* BitD's one shot crawler should not sign zero byte objects if they do not contain
  signature. (Means the object was just created and nothing was written to it).

Change-Id: I6941aefc2981bf79a6aeb476e660f79908e165a8
BUG: 1224611
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/10947
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-15 20:07:18 -07:00
Meghana Madhusudhan
05a17a087e NFS-Ganesha : Return corect return value
When any of the nodes in the trusted pool is not listed
in the cluster node list, it receives a wrong return
value. And commit fails on that host. Fixing the same.

Change-Id: Ib208dae7497800cc48b7f7a77f5e708f6c11e676
BUG: 1231257
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11205
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-15 15:04:06 -07:00
vmallika
8e5fa4d025 quota: don't log error when disk quota exceeded
When disk quota exceeded, quota enforcer logs
alert message, so no need to log error message
as this can fill up the log file

Change-Id: Ia913f47bc0cedb7c0a9c611330ee5124d3bb6c9d
BUG: 1229609
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11135
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-15 06:38:00 -07:00
Manikandan Selvaganesh
379dbbfd68 protocol/client : porting log messages to new framework
Change-Id: I9bf2ca08fef969e566a64475d0f7a16d37e66eeb
BUG: 1194640
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/10042
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-15 06:26:43 -07:00
Gaurav Kumar Garg
554fa0c131 features/bitrot: tuanble object signing waiting time value for bitrot
Currently bitrot using 120 second waiting time for object to be signed
 after all fop's released. This signing waiting time value should be tunable.

 Command for changing the signing waiting time will be
 #gluster volume bitrot <VOLNAME> signing-time <waiting time value in second>

Change-Id: I89f3121564c1bbd0825f60aae6147413a2fbd798
BUG: 1228680
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/11105
2015-06-15 05:23:46 -07:00
Gaurav Kumar Garg
3fb1845131 glusterd: subvol_count value for replicate volume should be calculate correctly
glusterd was crashing while trying to remove bricks from replica set
after shrinking nx3 replica to nx2 replica to nx1 replica.

This is because volinfo->subvol_count is calculating value from old
replica count value.

Change-Id: I1084a71e29c9cfa1cd85bdb4e82b943b1dc44372
BUG: 1230121
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/11165
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-15 00:15:46 -07:00
Nandaja Varma
40795d9569 handshake,locks,mountbroker,syncop/glusterd:New logging framework
Change-Id: If491a6945b7a0afa10165ff9f9874a244aece36f
BUG: 1194640
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9864
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2015-06-14 23:55:59 -07:00
Nandaja Varma
2ae034374c glusterd: Porting messages to new logging framework.
Change-Id: I56ced6fca0246c230cc389132c47a0f60472ed0c
BUG: 1194640
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9836
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2015-06-14 23:54:58 -07:00
Susant Palai
8720cef1ed features/quota: port QUOTA messages to new logging framework
Change-Id: I5e3df8860ea35bce14a802391be9b22ad64f1ad4
BUG: 1075611
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/7574
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-14 21:29:01 -07:00
Niels de Vos
a367d4c696 upcall: prevent busy loop in reaper thread
http://review.gluster.org/10342 introduced a cleanup thread for expired
client entries. When enabling the 'features.cache-invalidation' volume
option, the brick process starts to run in a busy-loop. Obviously this
is not intentional, and a process occupying 100% of the cycles on a CPU
or core is not wanted.

Change-Id: I453c612d72001f4d8bbecdd5ac07aaed75b43914
BUG: 1200267
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/11198
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-14 03:20:57 -07:00
Nandaja Varma
cdda561c0a handler, messages/glusterd: Porting to new logging framework
Change-Id: If67230445678dd895d69f18c9982c3f0fda62dbd
BUG: 1194640
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9910
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2015-06-13 23:29:32 -07:00
Susant Palai
1ea9c9a3d5 glusterd: Buffer overflow causing crash for glusterd
Problem: In GLUSTERD_GET_DEFRAG_PROCESS we are using PATH_MAX (4096)
as the max size of the input for target path, but we have allocated
NAME_MAX (255) size of buffer for the target.

Now this crash is not seen with source install, but is seen with RPMS.
The reason is _foritfy_fail. This check happens when _FORTIFY_SOURCE
flag is enabled. This option tries to figure out possible
overflow scenarios like the bug here and does crash the process.

Change-Id: I26261be85936d2e94a526fdcaa8d3249f8af11c3
BUG: 1228093
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/11090
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-13 01:13:56 -07:00
Pranith Kumar K
b9603a0461 cluster/ec: Prevent Null dereference in dht-rename
Change-Id: I3059f3b577f550c92fb77c6b6b44defd0584cd2e
BUG: 1230647
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/11178
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-06-12 11:39:33 -07:00
Kotresh HR
e58b55ed9b features/changelog: Do htime setxattr without XATTR_REPLACE flag
HTIME_KEY marks the last changelog rolled over. The xattr is
maintained on .glusterfs/changelog/htime/HTIME.TSTAMP file.
On every rollover of the changelog file, the xattr is updated.
It is being updated with XATTR_REPLACE flag as xattr gets
created during changelog enable. But it is once found that
the xattrs on the file is cleared and is not reproduced later
on. This patch protects that case, if it happens by setting
xattr without XATTR_REPLACE flag in failure case.

The reason behind doing this in failure case is not to mask
the actual cause of xattrs getting cleared. This provides
the log message if the original issue still exists but the
consequential effects are fixed.

Also changed the log messages to depict the events happened
during changelog enable.

Change-Id: I699ed09a03667fd823d01d65c9c360fa7bc0e455
BUG: 1230015
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/11150
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2015-06-12 03:38:02 -07:00
Manikandan Selvaganesh
6180d36ff3 glusterd/geo-rep : porting log messages to a new framework
Change-Id: I1f1b99822c2b301d68eaf392af4bbb475151e2c5
BUG: 1194640
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/9952
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2015-06-12 03:28:10 -07:00
Aravinda VK
57ecbbd6ce geo-rep: Validate use_meta_volume option
Added validation for use_meta_volume option.

Change-Id: I64cd9cb4bf383c7267638cab3837fd0cf89071c7
Signed-off-by: Aravinda VK <avishwan@redhat.com>
BUG: 1230090
Reviewed-on: http://review.gluster.org/11156
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
2015-06-12 03:02:35 -07:00
Nandaja Varma
72a7a6ea78 sm/glusterd: Porting messages to new logging framework
Change-Id: I391d1ac6a7b312461187c2e8c6f14d09a0238950
BUG: 1194640
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9927
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-12 02:05:29 -07:00
Pranith Kumar K
eeccafc72c features/qemu-block: Add comment about root_inode handling
This is handling the comment on 3.7 backport
http://review.gluster.com/11047

Change-Id: I253a8e0bfebde63f25c839efd55ed3cc30e6cd9b
BUG: 1226276
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/11076
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
2015-06-12 01:53:17 -07:00
Saravanakumar Arumugam
07df9b56fd geo-rep: ignore symlink and harlink errors in geo-rep
Ignore logging in case of symlink and hardlink creation
errors, as these are safe errors with respect to
geo-replication.

Change-Id: I3b863fb03ae23dbea907e4dd9477ff85feecad70
BUG: 1225571
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-on: http://review.gluster.org/10957
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-06-11 12:21:56 -07:00
Joseph Fernandes
46b3fde543 tier/dht: Fixing non atomic promotion/demotion w.r.t to frequency period
This fixes the ping-pong issue i.e files getting demoted immediately
after promition, caused by off-sync promotion/demotion processes.
The solution is do promotion/demotion refering to the system time.
To have the fix working all the file serving nodes should have
thier system time synchronized with each other either manually or
using a NTP Server.

NOTE: The ping-pong issue can re-appear even with this fix, if the admin
have different promotion freq period and demotion freq period, but this
would be under the control of the admin.

Change-Id: I1b33a5881d0cac143662ddb48e5b7b653aeb1271
BUG: 1218717
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/11110
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-11 09:45:58 -07:00
Dan Lambright
b1ff2294d2 cluster/tier: account for reordered layouts
For a tiered volume the cold subvolume is always at a fixed
position in the graph. DHT's layout array, on the other hand,
may have the cold subvolume in either the first or second
index, therefore code cannot make any assumptions. The fix
searches the layout for the correct position dynamically
rather than statically.

The bug manifested itself in NFS, in which a newly attached
subvolume had not received an existing directory. This case
is a "stale entry" and marked as such in the layout for
that directory.  The code did not see this, because it
looked at the wrong index in the layout array.

The fix also adds the check for decomissioned bricks, and
fixes a problem in detach tier related to starting the
rebalance process: we never received the right defrag
command and it did not get directed to the tier translator.

Change-Id: I77cdf9fbb0a777640c98003188565a79be9d0b56
BUG: 1214289
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/11092
2015-06-11 07:41:11 -07:00
Nandaja Varma
9863c89409 utils/glusterd: Porting to new logging framwork
Change-Id: Iacb30eb675693bcdb3ef9de8e7f43892c5d79f6d
BUG: 1194640
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9967
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2015-06-11 07:20:33 -07:00
Saravanakumar Arumugam
a6c53571a9 features/changelog: Avoid setattr fop logging during rename
Problem:
        When a file is renamed and the (renamed)file's Hashing
falls into a different brick, DHT creates a special file(linkto file)
in the brick(Hashed subvolume) and carries out setattr operation
on that file.

Currently, Changelog records this(setattr) operation in Hashed
subvolume. glusterfind in turn records this operation
as MODIFY operation.

So, there is a NEW entry in Cached subvolume and MODIFY entry
in Hashed subvolume for the same file.

Solution:
        Avoid logging setattr operation carried out, by
marking the operation as internal fop using xdata.

In changelog translator, check whether setattr is set
as internal fop and skip accordingly.

Change-Id: I21b09afb5a638b88a4ccb822442216680b7b74fd
BUG: 1230007
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-on: http://review.gluster.org/11137
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-11 05:19:09 -07:00
Sachin Pandit
3eafe6a81f features/marker : Pass along xdata to lower translator
The problem was in marker xlator, where during
rename a NULL value is passed during STACK_WIND.
Marker needs to pass the xdata un-modified to next
translator if marker does not rely on that.

Change-Id: I9e47e504fd241263987645abfed7ca13c0d54a80
BUG: 1228492
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/11089
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2015-06-11 04:33:31 -07:00
Mohammed Rafi KC
fefc8730e2 glusterd/tier: glusterd crashed with detach-tier commit force
glusterd crashed when doing "detach-tier commit force" on a
non-tiered volume.

Change-Id: I884771893bb80bec46ae8642c2cfd7e54ab116a6
BUG: 1228112
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/11081
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Joseph Fernandes
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-11 00:02:25 -07:00