Commit Graph

7738 Commits

Author SHA1 Message Date
Nandaja Varma
26cbd3bdf5 rpc-lib: Fixing the coverity issues
Coverity CIDs:
1210973
1124887
1124888
1124682
1124849
1124503

Change-Id: I012f6cf9d14753f572ab94aae6d442d1ef8df79a
BUG: 789278
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9600
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-10 11:29:42 +00:00
arao
320455bddf io-stats: Fixing dereference after null check.
CID: 1124492
If 'this' pointer fails to exist then the component is hard-coded
in the gf_log if not it is dereferenced.

Change-Id: I988137d4f5ac4c9aedef7cef0c75b167a8a5c59f
BUG: 789278
Signed-off-by: arao <arao@redhat.com>
Reviewed-on: http://review.gluster.org/9639
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-10 11:24:52 +00:00
vmallika
d06e6bac4b quota/cli: validate quota hard-limit option
Quota hard-limit is supported only upto: 9223372036854775807 (int 64)

In CLI, it is allowed to set the value upto 16384PB (unsigned int 64),
this is not a valid value as the xattrop for quota accounting and
the quota enforcer operates on a signed int64 limit value.

This patches fixes the problem in CLI and allows user to set
the hard-limit value only from range 0 - 9223372036854775807

Change-Id: Ifce6e509e1832ef21d3278bacfa5bd71040c8cba
BUG: 1206432
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/10022
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-10 11:21:48 +00:00
Pranith Kumar K
fcb55d54a6 cluster/ec: Ignore volume-mark key for comparing dicts
Change-Id: Id60107e9fb96588d24fa2f3be85c764b7f08e3d1
BUG: 1207712
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10077
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
2015-04-10 11:08:24 +00:00
shravantc
169875397d doc: update on admin geo replication
updated the geo replication session status
added configurable options available for geo replication
updated mountbroker for slaves, added simplified steps for
auxiliary gluster mount setup for the agent.

Change-Id: Ie8dac5ddb945ee93bcb8bc7694d35b0c6c01c606
BUG: 1206539
Signed-off-by: shravantc <shravantc@ymail.com>
Reviewed-on: http://review.gluster.org/10103
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2015-04-10 10:49:36 +00:00
Raghavendra Talur
da2f8d09de cluster/ec: Fix iobuf mem leak
iobuf_get and iobref_add implicitly
ref the iobuf.

Hence, it is necessary to unref iobuf
before setting it to NULL.

Change-Id: Icadd8925574cf04fe708d8090868e49356653a8e
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/9818
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-10 10:49:23 +00:00
GauravKumarGarg
accd61fb64 glusterd: bitd daemon should not start on the node which dont have any brick
If user enable bitrot from node1 which have brick then glusterd starting
bitd daemon on node1 as well as glusterd starting bitd deamon on another node2
which does not have any brick (node1 and node2 are part of cluster).

With this fix glusterd will not start bitd daemon on the node which
don't have brick.

Change-Id: Ic1c68d204221d369d89d628487cdd5957964792e
BUG: 1207029
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/10071
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2015-04-10 10:12:13 +00:00
Nandaja Varma
d57642044b gluster-cli : Removing logically dead code
Coverity CID: 1124451

Change-Id: I7b2901fdd2ace4666f9e2c6deaf3838322a1c6ff
BUG: 789278
Signed-off-by: Nandaja Varma <nvarma@redhat.com>
Reviewed-on: http://review.gluster.org/9579
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-10 10:02:23 +00:00
Aravinda VK
36aef04114 doc/geo-rep: Mountbroker User Management
BUG: 1136312
Change-Id: I1c8374de6e7ec93e401ec1c224752bfa5538adee
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/10007
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2015-04-10 09:24:41 +00:00
Mohammed Rafi KC
a0750e3a92 snapshot:Fetching wrong peer data during probe
When adding a new friend to the cluster, the snap volfile
are populating with wrong information for reconfigured option.

For snap volumes, reconfigured data's are filling from the
regular volumes data. This is because wrong dictionary key is
used here.

Change-Id: I659ebdc48c33419a2b825f26ce1f174abc8ea7dd
BUG: 1204636
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/9969
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 08:21:02 +00:00
Avra Sengupta
7a999ac6b1 snapshot/scheduler: Adhering to the common storage for scheduler
Making snapshot scheduler use the common storage
shared by nfs, snapshot and geo-rep. The meta volume
should be named as gluster_shared_storage, and it
should be mounted at "/var/run/gluster/shared_storage/".

Each component(nfs, snapshot, and geo-rep) should have
their own repos inside the shared storage, and perform
their operations in the shared storage

Change-Id: I4f670bf089c80037bd2b0716ddf743f48d7411ca
BUG: 1210344
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10183
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 08:20:12 +00:00
Sachin Pandit
da48df4e91 glusterd/snapshot : While snapshot restore, compute quota checksum.
Problem : During snapshot restore we anyways copy the quota conf file
after that we need to compute the checksum for that. If not, there
might be a checksum mismatch during glusterd handshake.

Solution : Compute a checksum file for quota conf file if its
present.

Change-Id: Ic4a6567c6ede9923443abf4ca59380679be88094
BUG: 1202436
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/9901
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 08:19:09 +00:00
Joseph Fernandes
df26c5e162 glusterd/snapshot: Fix CLI msg for snap limit set
Change of message from "will lead to deletion of snaps"
to "Will limit creation of new snaps" when setting the
snapshot limits.

Change-Id: I4732555bb35d3ad30c2cef6ea6c7da42a8edf35d
BUG: 1116263
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/8236
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 08:04:33 +00:00
Nandaja Varma
ca9e4bf6bc gluster-cli : Extra checks for word_count removed.
Coverity IDs:
1124453
1124454

In the first case, In the beginning of the function check is made
to see of the word_count is less than 4. If yes it returns. So it
wouldn't reach this part if that check takes the true path. So
this code is logically dead.

In second and third case, this is in false branch for word_cound <6.
So word_count can't possibly be less than 5 at this point.

Change-Id: Id5e1c81045ce7bc0ee6b7612ea54ef2b7f54b699
BUG: 789278
Signed-off-by: Nandaja Varma <nvarma@redhat.com>
Reviewed-on: http://review.gluster.org/9582
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>
2015-04-10 06:40:26 +00:00
arao
2b9a4799ef features/quota: Fixing Logically dead code
CID: 1134007
The code never reaches the condition check on retlen in
ret label, hence removing the dead code.

Change-Id: Ia0108b69489bb78a2561ff8da6e00685f472ae82
BUG: 789278
Signed-off-by: arao <arao@redhat.com>
Reviewed-on: http://review.gluster.org/9644
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-10 06:37:00 +00:00
Avra Sengupta
10ed06a5a1 snapshot/scheduler: Validate the number of entries in schedule
A valid schedule entry in snapshot schedule must have
six elements and adhere to the following format

* * * * *
| | | | |
| | | | +---- Day of the Week   (range: 1-7, 1 standing for Monday)
| | | +------ Month of the Year (range: 1-12)
| | +-------- Day of the Month  (range: 1-31)
| +---------- Hour              (range: 0-23)
+------------ Minute            (range: 0-59)

Change-Id: Idf03a3c43a461295dd3e2026bbcd0420319dd0e0
BUG: 1209408
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10169
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 05:03:11 +00:00
Avra Sengupta
14dcabf21d snapshot/scheduler: Fix deleting of snapshot schedule
Check if the argument has an attribute before
validating the attribute.

Change-Id: Ia4c6c91c2fca2ec3e82b47d81fbc19a5e0f17eb4
BUG: 1210204
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10168
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 05:01:39 +00:00
Avra Sengupta
3f21a34793 snapshot/scheduler: Only run if shared storage is mounted
Before running any snapshot scheduler op command,
verify if /var/run/gluster/snaps/shared_storage/ exists
and if the shared storage is mounted at it.

Change-Id: Ibb6ba6c01c227cacf9a19d1bf9264500373a4ed6
BUG: 1209112
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10135
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 04:59:32 +00:00
Pranith Kumar K
1c25d5f149 doc: Fix command parameters in geo-rep doc
Change-Id: Ie408e702999fb40d10f049e5238c64d70cde203e
BUG: 1207939
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10081
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2015-04-10 03:35:14 +00:00
Krishnan Parthasarathi
d448fd187d rpc: fix deadlock when unref is inside conn->lock
In ping-timer implementation, the timer event takes a ref on the rpc
object. This ref needs to be removed after every timeout event.
ping-timer mechanism could be holding the last ref. For e.g, when a peer
is detached and its rpc object was unref'd. In this case, ping-timer
mechanism would try to acquire conn->mutex to perform the 'last' unref
while being inside the critical section already. This will result in a
deadlock.

Change-Id: I74f80dd08c9348bd320a1c6d12fc8cd544fa4aea
BUG: 1206134
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/9613
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-10 03:03:48 +00:00
Gaurav Kumar Garg
2788ddd3a0 glusterd: remove-brick status/stop should not show output for non-existing brick
Previously when user start remove-brick operation on a volume then by
giving non-existing brick for remove-brick status/stop command it was
showing remove-brick status/stoping remove-brick operation on a volume.

With this fix it will validate bricks which user have given for
remove-brick status/stop command and if bricks are part of volume then
it will show statistics of remove-brick operation otherwise it will show
error "Incorrect brick <brick_name> for <volume_name>".

Change-Id: I151284ef78c25f52d1b39cdbd71ebfb9eb4b8471
BUG: 1121584
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/9681
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-09 17:21:06 +00:00
Mohammed Rafi KC
e405f6e419 Snapshot: Remove brick details on snapshot create error
Since we are not providing complete details of stopped
bricks on snapshot create error, it is better to remove
the incomplete brick details.

BUG: 1205596
Change-Id: I73386059c0d29a6cbe7f2bb6834d8b8fb393db0a
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/9999
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-09 12:45:08 +00:00
Kaushal M
e0de0cd9b2 glusterd: Better GlusterD handshake request validation
To allow handshake requests to be validated correctly in a multi network
environment, the request validation process has been improved.

The handshake request initiator will add it's peer ID the request.

The handshake request reciever will allow a request (as before) if,
- it has no peers, or
- the request came from a known peer

Identifying the known peer is done as follows.
- If the request contains a peer ID, it is matched against the IDs in
  the peer list. If a match is found, the request is allowed.
- The address of the incoming request is matched against the peer
  addresses in the peer list. If a match is found, the request is
  allowed.
- Otherwise, the request if disallowed

Change-Id: I9eabe2935d16276bb147dfeebf8c8beb08e01411
BUG: 1207611
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/10122
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-09 12:05:09 +00:00
Humble Devassy Chirammal
026d59f04b doc: cleanup parent doc directory
Change-Id: I65fee850c30e437abef695d2804af74617cc45fe
BUG: 1206539
Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/10106
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>
2015-04-09 11:58:28 +00:00
Kotresh HR
55ec6f27dd cli: Allow options prefixed with '--' for geo-rep config cmds
Geo-replications allows users to send rsync_options from
cli but while parsing, options prefixed with '--' are
treated as unrecognized apart from a few options. Because
of this rsync_options can't be set through cli. This
patch allows such options if it's a geo-rep config command.

e.g.
gluster vol geo-rep master fedora1::slave config rsync-options \
"--bwlimit=1.5m"

Change-Id: I4b4f10c0efd3f3a362ece65e697d5ce1498f84ac
BUG: 1168108
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9198
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-09 11:36:04 +00:00
Avra Sengupta
3d03c4bf9b glusterd/geo-rep: Check if the state file is present or not.
Currently every geo-rep operation other than start and stop
force, checks if the state-file is present or not before
performing the operation. This check is done to confirm that
the session on which the op is being performed is created.

This patch makes the start command also perform the same check
and accordingly display the correct error.

Change-Id: Ifd8bdfa3f362e91f58ead3202e2ebdbd411080e5
BUG: 1114469
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/8202
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-09 11:33:49 +00:00
Jeff Darcy
8830e90fa1 socket: use OpenSSL multi-threading interfaces
OpenSSL isn't thread-safe unless you register these locking and thread
ID functions.  Most often the crashes would occur around
X509_verify_cert, even though it's insane that the certificate parsing
functions wouldn't be thread-safe.  The bug for this was filed over
two years ago, but it didn't seem like a high priority because the bug
didn't bite anyone until it caused a spurious regression-test failure.
Ironically, that was on a test for a *different* spurious
regression-test failure, which I guess is just deserts[1] for leaving
this on the to-do list so long.

[1] Yes, it really is "deserts" in that phrase - not as in very dry
places, but from late Latin "deservire" meaning to serve well or
zealously.  Aren't commit messages educational?

Change-Id: I2a6c0e9b361abf54efa10ffbbbe071404f82b0d9
BUG: 906763
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/10075
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-09 09:55:37 +00:00
Jiffin Tony Thottan
9df5fdb357 tests : modifcation in mount-auth-nfs.t
In the previous test script, for every change in export/netgroup file
the volume is restarted to accodomate those changes. New changes will
avoid those restarts.

Change-Id: I2a6052075637f8e833096c6b3fcc01139dea85e4
BUG: 1143880
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/10047
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-09 09:54:15 +00:00
Aravinda VK
3ed7d6de25 tools/glusterfind: Check existence of Session
Use glusterfind list command to check a session is valid or not

    glusterfind list --session <SESSION> --volume <VOLUME>

Session exists if return code($?) is zero else invalid session

Change-Id: I37faa09e4e1bf2f10725dd8e5b0cc36a36a3cad4
Signed-off-by: Aravinda VK <avishwan@redhat.com>
BUG: 1205057
Reviewed-on: http://review.gluster.org/10154
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-09 09:52:33 +00:00
Jeff Darcy
0086a55bb7 tests: remove tests for clear-locks
These are suspected of causing core dumps during regression tests,
leading to spurious failures.  Per email conversation, since this
isn't a supported feature anyway, the tests are being removed to
facilitate testing of features we do support.

Change-Id: I7fd5c76d26dd6c3ffa91f89fc10469ae3a63afdf
BUG: 1195415
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/10167
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-09 09:49:32 +00:00
arao
093639d800 cli: Fixing dereference after null check
and dead code removal

CID: 1124609
CID: 1124596
CID: 1124471
CID: 1124475
CID: 1124476
The pointer variables are checked before
dereferencing and the dead code is removed

BUG: 789278
Change-Id: Ia532733a64401d71ccf1f2b6e434d7bc910e0ed1
Signed-off-by: arao <arao@redhat.com>
Reviewed-on: http://review.gluster.org/10083
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-09 09:46:35 +00:00
Venky Shankar
221f260c9d features/bitrot-stub: Packed format for version xattr
Using __attribute__ ((__packed__)) for object signature xattr
saves some bytes (7 bytes to be particular) occupied by the
extended attribute on-disk as compared to the unpacked format.

Change-Id: I91a6a0a54aa60e6fd8c357d72f7601b6ed213f2d
BUG: 1170075
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/10161
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-09 08:54:37 +00:00
Gaurav Kumar Garg
61afe3a0c8 cli: gluster volume help should give sufficient information for bitrot
Previously command "gluster volume help | grep bitrot" was not giving
sufficient information for bitrot.

With this fix command "gluster volume help" will give appropriate information
for bitrot.

Change-Id: Ic385c760d4ecbfb16ff5d90dba8940b3616035e5
BUG: 1207532
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/10133
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2015-04-09 04:39:20 +00:00
Nithya Balachandran
a7f1d08b8f Cluster/DHT Mismatching gfid values in dht_local_t
If multiple files with the same name but different gfids
exist on different subvolumes, dht_lookup_everywhere_cbk()
copies the gfid from the last received response into
local->gfid but does not update the local->stbuf structure.
dht_linkfile_create() uses the value in local->gfid, but
dht_linkfile_attr_heal() uses the one in local->stbuf, causing
a mismatch and failure while trying to heal the linkfile attrs.

Change-Id: I80d152be95b42d736c5d9182b955f42e374b82a5
BUG: 1205785
Signed-off-by: Nithya Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/9998
Reviewed-by: Susant Palai <spalai@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Shyamsundar Ranganathan <srangana@redhat.com>
2015-04-08 19:45:55 +00:00
Manikandan Selvaganesh
71897c714f dht : null dereference coverity fix
Change-Id: I700e7ebdfe4929a6d74406ea081059bdddcf7a79
BUG: 789278
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/9628
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
2015-04-08 19:19:38 +00:00
Humble Devassy Chirammal
737c027edc libglusterfs: avoid possibility of crash when ctx is null
ctx is passed to gf_log_inject_timer_event() and pass through to
 __gf_log_inject_timer_event() where the struct members are getting
dereferenced, and can cause crash if the passed ctx is null. This patch
avoids the issue.

Change-Id: I153dbb5d3744898429139e3d40bb4f0e9093632a
BUG: 1208118
Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/10102
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-08 18:13:36 +00:00
Humble Devassy Chirammal
d3760ac3fe snapshot: correct error message in snapshot helper
Change-Id: Ic01a5d4115383f1245bae3fba2bf92e23c8213ff
BUG: 1194640
Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/9747
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: Niels de Vos <ndevos@redhat.com>
2015-04-08 18:01:33 +00:00
Kaleb S. KEITHLEY
6ae434eeb3 ganesha-ha: more robust pid file handling
fix bug with reading pid file to determine if ganesha.nfsd is running

Change-Id: I4050a119e2be93578045a221b67f616e152546d9
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10163
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-08 17:50:09 +00:00
Krutika Dhananjay
4be65bb376 features/shard: Introduce file size xattr
With each inode write FOP, the size and block count of the file will be
updated within the xattr. There are two 64 byte fields that are
intentionally left blank for now for future use when consistency
guarantee is introduced later in sharding.

Change-Id: I40a2e700150c1f199a6bf87909f063c84ab7bb43
BUG: 1207603
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/10097
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-08 15:23:29 +00:00
Raghavendra Talur
346e64e578 libglusterfs/syncop: Add xdata to all syncop calls
This patch adds support for xdata in both the
request and response path of syncops.

Few calls like lookup already had the support;
have renamed variables in few places to maintain
uniformity.

xdata passed downwards is known as xdata_in
and xdata passed upwards is known as xdata_out.

There is an old patch by Jeff Darcy at
http://review.gluster.org/#/c/8769/3 which does the
same for some selected calls. It also brings in
xdata support at gfapi level.

xdata support at gfapi level would be introduced
in subsequent patches.

Change-Id: I340e94ebaf2a38e160e65bc30732e8fe1c532dcc
BUG: 1158621
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/9859
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-08 15:14:59 +00:00
Manikandan Selvaganesh
4f0c068d8f nfs : introducing logging framework for nfs translator
Change-Id: I3a47cdd06595c87da8e822d11683d68b43c11cda
BUG: 1194640
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/9945
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-08 13:35:07 +00:00
Humble Devassy Chirammal
e508e06c66 doc: introduce upgrade guide
Eventhough we have release branches, its better to keep track of
upgrade procedures of previous versions. This way we always have
pointers to upgrade process.

Change-Id: If7a5af0e9efc36bf0343487819a4d311775e65a8
BUG: 1206539
Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/10107
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Lalatendu Mohanty <lmohanty@redhat.com>
2015-04-08 11:03:19 +00:00
Venky Shankar
5502ead380 features/bitrot-stub: header file update in noinst_HEADERS
Missing "bit-rot-object-version.h" causing devrpm failures.

Change-Id: I5af326c5871cc468a10dece4772b29eda06c4fa9
BUG: 1170075
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/10160
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2015-04-08 10:50:17 +00:00
Joseph Fernandes
097795df7e ctr : Fix for heating of files during promotion/demotion
This fix will solve the heating of the files during the promotion
or demotion.
Promotion:
~~~~~~~~~
When a file gets promoted it get the current time stamp
 during creation only, but following writes or reads during the
migration wont heat the file.
Demotion:
~~~~~~~~
When a file gets demoted it get the wind/unwind time stamp is set to
zero. The following writes or reads during the migration wont heat
the file.

What is remaining ?
~~~~~~~~~~~~~~~~~
Bug 1209129 ( https://bugzilla.redhat.com/show_bug.cgi?id=1209129 )
Inspite of this fix there is still a issue remaining, i.e the heat of
the file is not keep intact during a internal rebalance activity i.e
a rebalance within a tier.

Change-Id: I01e82dc226355599732d40e699062cee7960b0a5
BUG: 1207867
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/10080
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-08 10:29:58 +00:00
Mohammed Rafi KC
6bf07eb642 glusterd:Change glusterd_list_add_order to add entry in ascending order
Change-Id: I0f82b1b5ad37e06135e9af33a4b5342ddde3ca94
BUG: 1207132
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/10046
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-08 09:19:11 +00:00
Michael Adam
2a224653df features/changelog: fix possible illegal memory access (CID 1288819)
Coverity CID 1288819

strncpy executed with a limit equal to the target array
size potentially leaves the target string not null terminated.
Make sure the copied string is a valid 0 terminated string.

Change-Id: Ie2d2970f37840146aa18724be3b89e93194c8160
BUG: 789278
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: http://review.gluster.org/10062
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2015-04-08 08:48:27 +00:00
Pranith Kumar K
c262430726 cluster/ec: Have same ec_manager_* for [f]set/[f]removexattr
ec_manager_xxx() function for [f]set/[f]remove xattr is exactly same except the
reporting part. So moved that to common function and use same
ec_manager_xattr() function for all these fops.

Change-Id: Iaa57023b800f8d1f3f6a827f4ceba9b0a0337336
BUG: 1199767
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10036
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
2015-04-08 08:29:51 +00:00
Dan Lambright
a826004429 glusterd: Support distributed replicated volumes on hot tier
We did not set up the graph properly for hot tiers with replicated
subvolumes. Also add check that the file has not already been moved
by another replicated brick on the same node.

Change-Id: I9adef565ab60f6774810962d912168b77a6032fa
BUG: 1206517
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-on: http://review.gluster.org/10054
Reviewed-by: Joseph Fernandes <josferna@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-04-08 07:28:21 +00:00
Venky Shankar
f0cd1d73c6 bitrot/scrub: Scrubber fixes
This patch fixes a handful of problem with scrubber which
are detailed below.

Scrubber used to skip objects for verification due to missing
fd iterface to fetch versioning extended attributes. Similar
to the inode interface, an fd based interface in POSIX is now
introduced.

Moreover, this patch also fixes potential false reporting by
scrubber due to:

  An object gets dirtied and signed when scrubber is busy
  calculatingobject checksum. This is fixed by caching the
  signed version when an object is first inspected for
  stalenes, i.e., during pre-compute stage. This version is
  used to verify checksum in the post-compute stage when the
  signatures are compared for possible corruption.

  Side effect of _not_ sending signature length during signing
  resulted in "truncated" signature to be set for an object.
  Now, at the time of signing, the signature length is sent
  and is used in place of invoking strlen() to get signature
  length (which could have possible 00s). The signature length
  itself is not persisted in the signature xattr, but is
  calculated on-the-fly by substracting the xattr length by
  the "structure" header size.

Some of the log entries are made more meaningful (as and aid
for debugging).

Change-Id: I938bee5aea6688d5d99eb2640053613af86d6269
BUG: 1207624
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/10118
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-08 07:01:32 +00:00
Venky Shankar
7fb55dbdab tests/bitrot-stub: Object versioning test(s)
This patch introduces basic object versioning test(s) which
is required for bitrot detection to work correctly. Basic
test(s) such as opening a file in read-only mode, single
open, multiple open()s are covered on FUSE mount _only_ as
stub does not support anonymous fds yet. For this reason,
the test case disables open-behind.

Actual verification is implemented as a C source which
makes use of the same on-disk data structures as used by
the stub code. The data structures are moved to separate
header file which is included by the test script. Such
modularization helps in future enhancements to keep the
version "data type" opaque and provide handful of APIs
version checking (equal/greater/etc..).

[
  This is just a start and should grow over time as stub
  is enhanced and codebase matures.
]

Change-Id: Ibee20e65a15b56bbdd59fd2703f9305b115aec7a
BUG: 1201724
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/10140
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-08 06:47:51 +00:00