summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nfs : logging improvementsManikandan Selvaganesh2015-09-154-347/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NFS log-warning messages logged twice in cbk function. Though, the logging messages are not exactly duplicate, instead of logging twice, they can be merged to one log message and the other log message is removed in cbk functions. Example: (1) W [nfs3.c:2075:nfs3svc_write_cbk] 0-nfs: 16f4dce6: /f.195 => -1 (Disk quota exceeded) (2) W [nfs3-helpers.c:3443:nfs3_log_write_res] 0-nfs-nfsv3: XID: 16f4dce6, WRITE: NFS: 69(Resource (quota) hard limit exceeded), POSIX: 122 (Disk quota exceeded), count: 0, UNSTABLE, wverf: 1381508849 Here, the second message is more elaborative, and is similar to (1). Since file name is not present in (2), it is added to (2) and then removing all mesages of type (1). Backport of http://review.gluster.org/#/c/11936/ Cherry picked from commit 0166dca4f268f07dcbf9db7ca971ed16e296e8b7 > Change-Id: I6028ab17b23948493a065dfad92fe4984548511f > BUG: 1254146 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11936 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> Change-Id: I6028ab17b23948493a065dfad92fe4984548511f BUG: 1262344 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12162 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterd: volume status backward compatibilityHari Gowtham2015-09-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backport of : http://review.gluster.org/#/c/11986/ volume status message of 3.7 does not display all the brick in a mixed cluster(3.6 and 3.7). it displays the bricks in 3.7 and misses bricks in 3.6 due to the key difference for ports. Status of volume: vol1 Gluster process TCP Port RDMA Port Online Pid ------------------------------------------------------------------------------ Brick 10.70.42.171:/data/gluster/tier/cbr2 49153 0 Y 13494 Brick 10.70.42.203:/data/gluster/tier/cbr2 49154 0 Y 27686 NFS Server on localhost N/A N/A N N/A NFS Server on dhcp42-203.lab.eng.blr.redhat .com N/A N/A N N/A Task Status of Volume vol1 ------------------------------------------------------------------------------ There are no active volume tasks >Change-Id: Icf0dc01a3d21d0889c43e2868c646a0c7e07ff25 >BUG: 1255694 >Signed-off-by: Hari Gowtham <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/11986 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Change-Id: I8732991a36d67b97a47025618a6aabe9cc8315e2 BUG: 1260858 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12120 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>
* tier/glusterd : Disable subvol match check during detach tierMohammed Rafi KC2015-09-141-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | For tiering, user does not have authorization to choose for bricks to detach, so we don't need to whether subvols match for the bricks or not. Back port of >> >Change-Id: I7e777ccc1aa261f652f9b158718fcd55185c7794 >BUG: 1261741 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/12145 >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >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> (cherry picked from commit 2e041639d8e49e2b768dd43c6f702106250e4da9) Change-Id: I0819caceb3aad88e242cf62faab471fafd62c63f BUG: 1261742 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12173 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* dht/remove-brick: Avoid data loss for hard link migrationSusant Palai2015-09-131-8/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If the hashed subvol of a file has reached cluster.min-free-disk, for a create opertaion a linkto file will be created on the hashed and the data file will be created on some other brick. For creation of the linkfile we populate the dictionary with linkto key and value as the cached subvol. After successful linkto file creation, the linkto-key-value pair is not deleted form the dictionary and hence, the data file will also have linkto xattr which points to itself.This looks something like this. client-0 client-1 -------T file rwx------file linkto.xattr=client-1 linkto.xattr=client-1 Now coming to the data loss part. Hardlink migration highly depend on this linkto xattr on the data file. This value should be the new hashed subvol of the first hardlink encountered post fix-layout. But when it tries to read the linkto xattr it gets the same target as where it is sitting. Now the source and destination are same for migration. At the end of migration the source file is truncated and deleted, which in this case is the destination and also the only data file it self resulting in data loss. BUG: 1262197 Change-Id: I5338a5704ac60ca9afb278977e178319266a0cc0 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/12105 Reviewed-by: N Balachandran <nbalacha@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/12156 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/shard: Filter internal shard xattrs in {get,remove,set}xattrKrutika Dhananjay2015-09-133-0/+209
| | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12121/ and http://review.gluster.org/#/c/12136/ Change-Id: Ifadebe1cda80fa4a525605e10513e6e64ee72709 BUG: 1261008 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12127 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>
* tier/ctr: Solving DB Lock issue due to write contention from db connectionsJoseph Fernandes2015-09-1112-48/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of 12031. > Problem: The DB on the brick is been accessed by CTR, for write and > tier migrator, for read and write. The write from tier migrator is reseting > the heat counters after a cycle. Since we are using sqlite, two connections > trying to write would cause a db lock contention. As a result CTR used to fail > to update the db. > Solution: Using the same db connection of CTR for reseting the heat counters. > 1) Introducted a new IPC FOP for CTR > 2) After the query do a ipc syncop to the underlying client xlator associated > to the brick. > 3) CTR in brick will catch the IPC FOP and cleat the heat counters. > Change-Id: I53306bfc08dcdba479deb4ccc154896521336150 > BUG: 1260730 > Signed-off-by: Joseph Fernandes <josferna@redhat.com> > Reviewed-on: http://review.gluster.org/12031 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Conflicts: xlators/cluster/dht/src/tier.c Change-Id: I88aa289cdf21e216b42c3d8ccfb4e7e828b43772 BUG: 1262341 Reviewed-on: http://review.gluster.org/12161 Reviewed-by: Joseph Fernandes Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* features/shard: Do not return non-negative status on failure in writevKrutika Dhananjay2015-09-111-1/+1
| | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12140/ Change-Id: I7c49a083894cead528901ebc0a88fcfa17e53da3 BUG: 1261715 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12144 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* dht: NULL dereferencing causes crashMohammed Rafi KC2015-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | If linkfile_create is failed for some reason, then we are trying to dereference a null variable backport of http://review.gluster.org/#/c/12106/ >Change-Id: I3c6ff3715821b9b993d1bab7b90167de2861e190 >BUG: 1260147 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Change-Id: I7fd98dc298ffe5aab07df10c3b28d0736cb25653 BUG: 1260511 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12112 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/tier: add gluster v tier <vol>Dan Lambright2015-09-107-25/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of 11984. > Currently the tier feature piggy backs off the rebalance command > syntax to obtain status and this is clumsy. Introduce a new > tier command that can do tier specific operations, starting > with volume status to display counters. > Old commands: > gluster volume attach-tier <vol> [replica count] {bricklist..} > gluster volume detach-tier <vol> {start|stop|commit} > New commands: > gluster volume tier <vol> attach [replica count] {bricklist} | > detach {start|stop|commit} | > status > Change-Id: Ic07b3c6260588162de7d34380f8cbd3d8a7f35d3 > BUG: 1255693 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Reviewed-on: http://review.gluster.org/11984 > Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Id45bd0fa6b8606dd47863de83a694908da393229 BUG: 1261664 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12143 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com>
* glusterd: Do not allow "detach-tier commit" unnecessarilyGaurav Kumar Garg2015-09-092-9/+62
| | | | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12107/ Currently when user execute gluster v detach-tier commit command without starting detach-tier or without giving force option then gluster will success this operation. Detach-tier commit should not allow without giving "force" optioin. >>Reviewed-on: http://review.gluster.org/12107 >>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> >>Reviewed-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Id161c288f6f3e0f6b298878a5c35a49fcbd9c6e3 BUG: 1259694 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12108 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* uss : handle `buf` variable properly in svs_glfs_readdir()Jiffin Tony Thottan2015-09-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The svs_glfs_readdir() is a generic function which is called from svs_readdir() and svs_readdirp(). But in svs_readdir 'buf' variable is passed as NULL, then glfs_read_readdir() will fail. This patch will fix the same. It is backport of http://review.gluster.org/12117 Upstream Reference: > Change-Id: Id02e4e17e30c85de117db5ddd9f97b578622dff9 > BUG: 1260611 > Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> > cherry-picked as 7b6183c36ebfe020b724c95b018a8cd535e1ecdd Change-Id: Iee08d5c29cad0376ca9d378c8f17b0820eebc88a BUG: 1260859 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/12122 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* xml/tiering: enhance xml output for tiering status related cli commandsHari Gowtham2015-09-081-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backport of : http://review.gluster.org/#/c/11890/ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volRebalance> <task-id>34f47e29-2193-4a86-9b1e-c7e56bdae3d4</task-id> <op>7</op> <nodeCount>1</nodeCount> <node> <nodeName>localhost</nodeName> <promotedfiles>0</promotedfiles> <demotedfiles>0</demotedfiles> <statusStr>in progress</statusStr> </node> </volRebalance> </cliOutput> >Change-Id: I61083f7b9b0b3bd840982b8c5d6ea4b42e27c9b3 >BUG: 1252737 >Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Change-Id: I266c5bb051770dfeaba4f54f9f37d25e90ba7a24 BUG: 1260856 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12119 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* man or info page of gluster needs update with self-heal commandsHari Gowtham2015-09-081-0/+44
| | | | | | | | | | | | | | | | | | | | | | backport of : http://review.gluster.org/12030/ >Change-Id: I6f50f88e56d9d9a8f875c7edac28e2a023b65881 >BUG: 1122395 >Signed-off-by: Hari Gowtham <hgowtham@redhat.com> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Change-Id: Ibeae0ce9a7f1ee5bde05cb42001b2b7e22d173a0 BUG: 1260593 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12116 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd: Return better error messages for probe and detach failuresBrad Hubbard2015-09-082-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | We handle some specific errors and return good error messages for those, but for the default case where the error code is not recognised we just report "unknown errno". This patch attempts to at least return the output of strerror to provide more informative errors. Cherry picked from commit 4b5aec8da9be69da077e1fcc7e852d224517ecc0: >BUG: 1257149 >Change-Id: I0027e74e41adac4ab0c0a929c6fff56878bf39c8 >Signed-off-by: Brad Hubbard <bhubbard@redhat.com> >Reviewed-on: http://review.gluster.org/12021 >Reviewed-by: Niels de Vos <ndevos@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> BUG: 1257394 Change-Id: I11e6c006c6b93a5c1b915f8c509f24123497301d Signed-off-by: Brad Hubbard <bhubbard@redhat.com> Reviewed-on: http://review.gluster.org/12111 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs:Porting log messages to new frameworkMohamed Ashiq2015-09-084-11/+34
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11896 Cherry picked from 038dfe57cf0c5944b0392332dbf5a00bb1208150 >Change-Id: I8625b7dc8941720cc7a864b8fddbcc7b4c485fcd >BUG: 1252836 >Signed-off-by: Mohamed Ashiq <mliyazud@redhat.com> >Reviewed-on: http://review.gluster.org/11896 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> >Reviewed-by: Niels de Vos <ndevos@redhat.com> Change-Id: I8625b7dc8941720cc7a864b8fddbcc7b4c485fcd BUG: 1258769 Signed-off-by: Mohamed Ashiq <mliyazud@redhat.com> Reviewed-on: http://review.gluster.org/12076 Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* afr: Do not wind the full writev payload to arbiter brickRavishankar N2015-09-071-0/+30
| | | | | | | | | | | | | | | | ...because the arbiter xlator just unwinds it without passing it down till posix anyway. Instead, send a one-byte vector so that afr write transaction works as expected. Backport of http://review.gluster.org/#/c/12095/ Change-Id: I52913ca51dfee0c8472cbadb62c5d39b7badef77 BUG: 1255110 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12104 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* test: fix spurious failure from ./tests/basic/quota-nfs.tvmallika2015-09-042-1/+14
| | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/12075/ Before checking for the quota usage, umount and mount NFS mountpoint to flush the NFS cached data. This test is fails on NetBSD, so marking the test as bad-test > Change-Id: I1f30f5d9a919b3959c9f158366bd2f47569c8e03 > BUG: 1258766 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I86f24435224851e60d96c39126de92d54b2a19da BUG: 1259652 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12097 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>
* features/shard: Fix incorrect op_ret in READVKrutika Dhananjay2015-09-032-2/+49
| | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12099/ Change-Id: Ica5f951a3cb2243fe179fe84a27c369bd7de23cf BUG: 1259726 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12101 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* cluster/tier: avoid filling /var/run with tiering filesDan Lambright2015-09-031-4/+28
| | | | | | | | | | | | | | | | | | | | This is a backport of 11931. > We failed to delete old promote/demote workfiles in /var/run. > This fix removes the <pid> postfix so there will be only a > single pair of files. > Change-Id: Ib9aafe7b4a9d4b0c05cf03a94cc1057a423a27d2 > BUG: 1253970 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Reviewed-on: http://review.gluster.org/11931 Change-Id: Id9fb843a5ce553a79fc9f5809f84af9d317b1d3e BUG: 1259360 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12092 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com>
* mount/fuse: Log ENODATA as DEBUG in {f}removexattrVijay Bellur2015-09-031-2/+43
| | | | | | | | | | | | | | | | | | Logging ENODATA errors for {f}removexattr at a higher loglevel does not add a lot of value and causes a log message flood as per multiple reports. Added a new cbk, fuse_removexattr_cbk() to be used with removexattr fops. ENODATA now gets logged at loglevel DEBUG in fuse_removexattr_cbk(). This also prevents more conditional checks in the common fuse_err_cbk() callback. Change-Id: I1585b4d627e0095022016c47d7fd212018a7194b BUG: 1248941 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/12015 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/12041
* CommonHA: Fix the path of 'systemctl' cmdSoumya Koduri2015-09-031-1/+1
| | | | | | | | | | | | | | 'systemctl' command path should be '/usr/bin/sytemctl'. Fixed the typo in the HA-script. Change-Id: Ied9fb85e25646ef00b303e361966e9d1354fe440 BUG: 1259225 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/12089 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* CommonHA: Avoid scp of the config state to the same hostSoumya Koduri2015-09-021-2/+15
| | | | | | | | | | | | During add-node, have seen an issue where in scp doesn't work if the source and destination host are same. Fixed the same. Change-Id: I33fc18ff39e54ced277f94afef7a11a22c9ccce0 BUG: 1259225 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/12091 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/tier: make attach/detach work with new rebalance logicDan Lambright2015-09-022-25/+31
| | | | | | | | | | | | | | | | | | | | | | | This is a backport of 10795. > The new rebalance performance improvements added new > datastructures which were not initialized in the > tier case. Function dht_find_local_subvol_cbk() needs > to accept a list built by lower level DHT translators > in order to build the local subvolumes list. > Change-Id: Iab03fc8e7fadc22debc08cd5bc781b9e3e270497 > BUG: 1222088 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Reviewed-on: http://review.gluster.org/10795 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Change-Id: Icbd51c96ae4d367d1edf41cdd0edb35095195699 BUG: 1259079 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12085 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* cluster/dht: maintain start state of rebalance daemon across graph switch.Dan Lambright2015-09-021-3/+12
| | | | | | | | | | | | | | | | | | | This is a backport of fix 10977. > When we did a graph switch on a rebalance daemon, a second call > to gf_degrag_start() was done. This lead to multiple threads > doing migration. When multiple threads try to move the same > file there can be deadlocks. > Change-Id: I931ca7fe600022f245e3dccaabb1ad004f732c56 > BUG: 1226005 Change-Id: I163d2d04692eba36c986ea9835f588962c92b93f BUG: 1259078 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12082 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
* cluster/tier: account for reordered layoutsDan Lambright2015-09-023-15/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of 11092 > 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> Change-Id: Idb2eec9ba25812f41de7f960a0314c92341d6b5d BUG: 1259081 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12086 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
* afr: Unset dirty xattr after setting pending xattr during post-opRavishankar N2015-09-021-13/+13
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12078 In AFR transaction, in the pre-op, the dirty xattr is set. In the post-op, if the transaction fails on one of the bricks, then on the healthy brick, the dirty xattr is unset and then the pending xattr (for the brick that went down) is set in that order. If the brick crashes after unsetting the dirty xattr, we have lost information about a pending heal. Hence we need to reverse the order, i.e. set pending xattr first followed by unsetting the dirty. Change-Id: I0b8a872cb4579a1bad602f70c76f09691bd582b2 BUG: 1258845 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12079 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* packaging: incorrect %ghost of .../hooks/1/delete causes install failureKaleb S. KEITHLEY2015-09-011-2/+5
| | | | | | | | | | | | | | | | | | .../hooks/1/delete is not a %ghost by virtue of having actual files namely .../post/S57glusterfind-delete-post.py backport of Change-Id: I544bcfbc898007c79be11e911e6d66e242018740 http://review.gluster.org/#/c/12080/ BZ: 1258975 Change-Id: Ic4c94f3d1a495a769ab84f1239580beee2c379bc BUG: 1258976 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12081 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* posix.c posix-helpers.c: porting new log messagesHari Gowtham2015-09-012-7/+7
| | | | | | | | | | | | | | | | Backport of review.gluster.org/#/c/11609/ > Change-Id: I0c306d796ff49263d8a6c191b24a41da8a21bd2c > BUG: 1252695 > Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Change-Id: I0c306d796ff49263d8a6c191b24a41da8a21bd2c BUG: 1258736 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12074 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>
* snapshot: Fix snapshot info's xml outputAvra Sengupta2015-09-013-1/+45
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11834/ Display description field with (null) if no description is present for the snapshot, instead of removing the field altogether. Change-Id: I965b08cd6e54eea56c32e2712fab7daa8a663f11 BUG: 1250388 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11918 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* tests: add bug-948686.t to bad_testsAtin Mukherjee2015-09-011-0/+1
| | | | | | | | | | | | | | | | | | | | | backport of http://review.gluster.org/#/c/12070/ bug-948686.t intermittely ends up in a race in GlusterD where one thread deletes a stale volume and on a volume start request a start is attempted on the same object which might be freed up by the other thread. We are considering to use refcounting mechanism while accessing volinfo objects to get rid of this problem but that needs a significant amount of time in development. Till then adding this test in bad_tests () Change-Id: I3ddc025b07c47b17ea75554d5cc809a839365f10 BUG: 1258798 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12070 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> (cherry picked from commit 99cd07c596f74b1ee8a88c4a43b37eb0921e5fe2) Reviewed-on: http://review.gluster.org/12077
* tests : workaround for the spurious failure in mount-nfs-auth.tJiffin Tony Thottan2015-09-012-3/+6
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12006/ Upstream reference : >Change-Id: I459a0c60743291a2e164a5e0a76a7e2577afdae0 >BUG: 1256352 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/12006 >Reviewed-by: Niels de Vos <ndevos@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >cherry-picked as 9f52d22690b3b0aac0a736eb15fe649fde6286b5 Change-Id: I82ab11692e84e13ae94623d38610e05c21fc4dbe BUG: 1258717 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/12071 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* gluster/cli: snapshot delete all does not work with xmlRajesh Joseph2015-08-316-121/+357
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12027/ Problem: snapshot delete all command fails with --xml option Fix: Provided xml support for delete all command Change-Id: I77cad131473a9160e188c783f442b6a38a37f758 BUG: 1258113 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/12027 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit fd47635a4ffab621a2357c99cd1edd0482940bd5) Reviewed-on: http://review.gluster.org/12042
* snapshot:cleanup snaps during unprobeMohammed Rafi KC2015-08-314-22/+104
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/9930/ When doing an unprobe, the volume that doesnot contain any brick of the particular node will be deleted. So the snaps associated with that volume should also delete Change-Id: I9f3d23bd11b254ebf7d7722cc1e12455d6b024ff BUG: 1255384 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11970 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* debug/trace: Print total write size in trace_writevKrutika Dhananjay2015-08-311-2/+7
| | | | | | | | | | | | | | | Backport of: http://review.gluster.org/12053 This is some information I find useful while debugging issues in shard translator. Change-Id: Ia33f656741750b4d5306599ea71ba1dc85bf311d BUG: 1258411 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12065 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>
* cluster/afr: Make [f]xattrop metadata transactionPranith Kumar K2015-08-315-183/+272
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.com/11809 Problem: When xlators above afr do [f]xattrop when one of the bricks is down, after the brick comes backup, the metadata is not healed because [f]xattrop is not considered a transaction. Fix: Treat [f]xattrop as transaction so that changes done by xlators above afr are marked for heal when some of the bricks were down at the time of [f]xattrop. BUG: 1248890 Change-Id: Ibe69aa0ca6be9b4b4134dc2879b306e2e9c4cde8 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11810 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com>
* libgfapi : port missing gf_log's to gf_msgManikandan Selvaganesh2015-08-313-11/+13
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11891/ Cherry-picked from commit 1e0644031c7ac0fa28f0912e951a9238f7bbe8ab > Change-Id: I0c5320c09b4a5ff1e9df61a86ac7bd47c1bb1bbb > BUG: 1252807 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11891 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra Talur <rtalur@redhat.com> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> > Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I0c5320c09b4a5ff1e9df61a86ac7bd47c1bb1bbb BUG: 1258406 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12063 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: Don't set posix acls on linkto filesNithya Balachandran2015-08-315-7/+114
| | | | | | | | | | | | | | | | | | | | | | Posix acls on a linkto file change the file's permission bits and cause DHT to treat it as a non-linkto file.This happens on the migration failure of a file on which posix acls were set. The fix prevents posix acls from being set on a linkto file and copies them across only after a file has been successfully migrated. Change-Id: Iccf7ff6fba49fe05d691d9b83bf76a240848b212 BUG: 1258377 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12025 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12062 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Add v3.7.4 release notesKaushal M2015-08-311-0/+121
| | | | | Change-Id: Ibff29b5e2bdb590dfa63a823641e840535d26d88 Signed-off-by: Kaushal M <kaushal@redhat.com>
* features/shard: Fix unlink failure due to non-existent shard(s)v3.7.4Krutika Dhananjay2015-08-312-4/+44
| | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12059/ Unlink of a sharded file with holes was leading to EINVAL errors because it was being wound on non-existent shards (those blocks that fall in the hole region). loc->inode was NULL in these cases and dht_unlink used to fail the FOP with EINVAL for failure to fetch cached subvol for the inode. The fix involves winding unlink on only those shards whose corresponding inodes exist in memory. Change-Id: I1e5d492a2e60491601da23f64a5d0089e536b305 BUG: 1258353 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12061 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>
* cli: on error invoke cli_cmd_broadcast_response function in separate threadvmallika2015-08-314-19/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11990/ There is a problem in current CLI framework CLI holds the lock when processing command. When processing quota list command, below sequence of steps executed in the same thread and causing deadlock 1) CLI holds the lock 2) Send rpc_clnt_submit request to quotad for quota usage 3) If quotad is down, rpc_clnt_submit invokes cbk function with error 4) cbk function cli_quotad_getlimit_cbk tries to hold lock to broadcast the results and hangs, because same thread has already holding the lock This patch fixes the problem by creating seperate thread for broadcasting the result > Change-Id: I53be006eadf6aaf348083d9168535530d70a8ab3 > BUG: 1242819 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Ic3c651c143e4143cfb4542d99b4856e582022e36 BUG: 1257881 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12038 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* afr: modify afr_txn_nothing_failed()Ravishankar N2015-08-313-12/+94
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11827/ In an AFR transaction, we need to consider something as failed only if the failure (either in the pre-op or the FOP phase) occurs on the bricks on which a transaction lock was obtained. Without this, we would end up considering the transaction as failure even on the bricks on which the lock was not obtained, resulting in unnecessary fsyncs during the post-op phase of every write transaction for non-appending writes. Change-Id: Iee79e5d85dc7b4c41459d8bdd04a8454bdaf9a9d BUG: 1255698 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/11985 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>
* tests: rebasing bad tests from mainline branch to release-3.7 branchGaurav Kumar Garg2015-08-311-0/+7
| | | | | | | | | | | | | | | Currently mainline and release-3.7 branch not having same bad tests. So bad tests which are bypassing in mainline still failing in release-3.7 branch. Rebasing all bad test from mainline branch to release-3.7 branch. Change-Id: I2d4b9d1d3c1f37dcdfb092ca0d9c552bf1ddbef7 BUG: 1258344 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12056 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* marker: preserve previous dirty flag during update txnvmallika2015-08-311-15/+91
| | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/12032/ In case if dir has become dirty because of crash, this dirty flag on disk was getting reset in the next update txn. This patch now gets the dirty flag before setting in the update txn and it the value is dirty, it keeps the flag dirty, so that inspect_directory can fix the dirty dir > Change-Id: Iab2c343dbe19bd3b291adbfeebe6d9785b6bb9e3 > BUG: 1251454 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I10b81e5c0d9ffa00082171e295199d924a81ee0e BUG: 1257441 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12037 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com>
* protocol/server : porting missing gf_log's to gf_msgManikandan Selvaganesh2015-08-313-13/+69
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11895/ Cherry-picked form commit a26dbb38acdb2ec5fe16068caee189709faae76e > Change-Id: I8818931fafea3c013551a5de23a9f77c81164841 > BUG: 1252808 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11895 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I8818931fafea3c013551a5de23a9f77c81164841 BUG: 1257193 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12018 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>
* features/shard: Fix permission issuesKrutika Dhananjay2015-08-314-19/+121
| | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/11992 This patch does the following: * reverts commit b467af0e99b39ef708420d3f7f6696b0ca618512 * changes ownership on shards under /.shard to be root:root * makes readv, writev, [f]truncate, rename, and unlink fops to perform operations on files under /.shard with frame->root->{uid,gid} as 0. This would ensure that a [f]setattr on a sharded file does not need to be called on all the shards associated with it. Change-Id: I50d8533bd2b769a4dfe8cd1b49bdcfc117a7e660 BUG: 1253151 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12052 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* tests: Mark bug-1238706-daemons-stop-on-peer-cleanup.t as badRaghavendra Talur2015-08-301-1/+2
| | | | | | | | | | | | | | | | | | | backport of http://review.gluster.org/#/c/12036/ This test fails frequently. Use bug number 1257792 when you move this test out of bad_tests. Change-Id: Ib65f22096dc9af131c4d2f38b59a857c549a674a BUG: 1258306 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/12036 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12050 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/shard: Fix size update for writes at hole regionKrutika Dhananjay2015-08-293-2/+46
| | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12020 Change-Id: I4b6e9101ccb881d3d285704902484e1e89ccaceb BUG: 1257204 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12026 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* ec : trusted.ec.version xattr of all root directories of all bricks should ↵Ashish Pandey2015-08-293-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | be same. Problem: After replacing the brick using "replace-brick" command and running "heal full", the version of the root directory of the newly added brick is not getting healed. heal starts running on the dentries of the root but does not run on root directory. Solution: Run heal on root directory. > Change-Id: Ifd42a3fb341b049c895817e892e5b484a5aa6f80 > BUG: 1243382 > Signed-off-by: Ashish Pandey <aspandey@redhat.com> > Reviewed-on: http://review.gluster.org/11676 > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Ifd42a3fb341b049c895817e892e5b484a5aa6f80 BUG: 1243384 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/11755 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* fuse: fix return value check for setuidPrasanna Kumar Kalever2015-08-291-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setuid() sets the effective user ID of the calling process. If the effective UID of the caller is root, the real UID and saved set-user-ID are also set. On success, zero is returned. On error, -1 is returned, and errno is set appropriately. there are cases where setuid() can fail even when the caller is UID 0; it is a grave security error to omit checking for a failure return from setuid(). if an environment limits the number of processes a user can have, setuid() might fail if the target uid already is at the limit. Fix is to check return value of setuid. Backport: >Change-Id: I7aa5ab5e347603c69dc93188417cc4f4c81ffc75 >BUG: 1221490 >Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> >Reviewed-on: http://review.gluster.org/10780 >Reviewed-by: Prasanna Kumar Kalever >Tested-by: Prasanna Kumar Kalever >Reviewed-by: Niels de Vos <ndevos@redhat.com> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> >(cherry picked from commit b5ceb1a9de9af563b0f91e2a3138fa5a95cad9f6) Change-Id: I5643ccecb56ea1d3c16de57bace3f5481931a539 BUG: 1254503 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/11950 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: Don't allow remove brick start/commit if glusterd is down of the ↵Atin Mukherjee2015-08-283-31/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | host of the brick Backport of http://review.gluster.org/#/c/11726/ remove brick stage blindly starts the remove brick operation even if the glusterd instance of the node hosting the brick is down. Operationally its incorrect and this could result into a inconsistent rebalance status across all the nodes as the originator of this command will always have the rebalance status to 'DEFRAG_NOT_STARTED', however when the glusterd instance on the other nodes comes up, will trigger rebalance and make the status to completed once the rebalance is finished. This patch fixes two things: 1. Add a validation in remove brick to check whether all the peers hosting the bricks to be removed are up. 2. Don't copy volinfo->rebal.dict from stale volinfo during restore as this might end up in a incosistent node_state.info file resulting into volume status command failure. Change-Id: Ia4a76865c05037d49eec5e3bbfaf68c1567f1f81 BUG: 1256265 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11726 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/11996 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>