summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc : release-notes for GlusterFS-3.12.4v3.12.4Jiffin Tony Thottan2017-12-131-0/+30
| | | | | | Change-Id: Ib48b2ae64a3cf90b44c3a80ffcda6204f152ae40 BUG: 1519095 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
* glusterd: Free up svc->conn on volume deleteAtin Mukherjee2017-12-121-0/+4
| | | | | | | | | | | | | Daemons like snapd, tierd and gfproxyd are maintained on per volume basis and on a volume delete we should destroy the rpc connection established for them. >mainline patch : https://review.gluster.org/#/c/18957/ Change-Id: Id1440e39da07b990fdb9b207df18da04b1ca8014 BUG: 1523048 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 36ce4c614a3391043a3417aa061d0aa16e60b2d3)
* core/memacct: save allocs in mem_acct_rec listN Balachandran2017-12-084-1/+61
| | | | | | | | | | | | | | | | | | | | With configure --enable-debug, add all object allocations to a list in the corresponding mem_acct_rec. This allows us to see all objects of a particular type and allows for additional debugging in case of memory leaks. This is not compiled in by default and must be explicitly enabled. It is intended to be used by developers. > Change-Id: I7cf2dbeadecf994423d7e7591e85f18d2575cce8 > BUG: 1522662 > Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 47d01546a1826dc14a8331ea8700015f1cfdc4db) Change-Id: I7cf2dbeadecf994423d7e7591e85f18d2575cce8 BUG: 1523455 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* Disable gfid2path by default on NetBSDEmmanuel Dreyfus2017-12-081-0/+11
| | | | | | | | | | | | | | | NetBSD storage of extended attributes for UFS1 badly scales when the list of extended attributes names rises. gfid2path can add as many extended attributes names as we have files, hence we keep it disabled for performance sake. > Change-Id: Id77b5f5ceb4d5eba1b3362b4b9fc693450ffbc2b > Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> > BUG: 1129939 Change-Id: Id77b5f5ceb4d5eba1b3362b4b9fc693450ffbc2b Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> BUG: 1513258
* cluster/dht: don't overfill the buffer in readdir(p)Raghavendra G2017-12-081-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | Superflous dentries that cannot be fit in the buffer size provided by kernel are thrown away by fuse-bridge. This means, * the next readdir(p) seen by readdir-ahead would have an offset of a dentry returned in a previous readdir(p) response. When readdir-ahead detects non-monotonic offset it turns itself off which can result in poor readdir performance. * readdirp can be cpu-intensive on brick and there is no point to read all those dentries just to be thrown away by fuse-bridge. So, the best strategy would be to fill the buffer optimally - neither overfill nor underfill. > Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84 > BUG: 1492625 > Signed-off-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit e785faead91f74dce7c832848f2e8f3f43bd0be5) Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84 BUG: 1478411 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: populate inode in dentry for single subvolume dhtRaghavendra G2017-12-062-1/+69
| | | | | | | | | | | | | | | ... in readdirp response if dentry points to a directory inode. This is a special case where the entire layout is stored in one single subvolume and hence no need for lookup to construct the layout >Change-Id: I44fd951e2393ec9dac2af120469be47081a32185 >BUG: 1492625 >Signed-off-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit 59d1cc720f52357f7a6f20bb630febc6a622c99c) Change-Id: I44fd951e2393ec9dac2af120469be47081a32185 BUG: 1478411 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* cli: remove summary option from heal info commandRavishankar N2017-12-011-1/+1
| | | | | | | | | | | | commit c49fcf570439e47a5e1224436bbaf3f8dd580105 was a straight forward backport from its corresponding master patch but in doing so, also added the 'summary' option to the CLI. The heal info summary command is present only in glusterfs-3.13. So remove it from the CLI in 3.12 Change-Id: Idb742f0b9752726c94619c0528fe792e4f5134fd BUG: 1518061 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reported-by: Shubhendu Tripathi <shtripat@redhat.com>
* tests: fix bug-1483058-replace-brick-quorum-validation.t spurious failureAtin Mukherjee2017-11-303-1/+19
| | | | | | | | | > mainline patch : https://review.gluster.org/#/c/18710/ Change-Id: I04c35305bfb663eabbf715eee78695adfd4a2d20 BUG: 1512432 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 76a83f98b78a0bdf29bbb0f8e4c9ab74dae52be4)
* glusterd: display gluster volume status, when quorum type is serverSanju Rakonde2017-11-301-0/+6
| | | | | | | | | | | | | | Problem: when server-quorum-type is server, after restarting glusterd in the node which is up, gluster volume status is giving incorrect information. Fix: check whether server is blank, before adding other keys into the dictionary. Change-Id: I926ebdffab330ccef844f23f6d6556e137914047 BUG: 1511782 Signed-off-by: Sanju Rakonde <srakonde@redhat.com> (cherry picked from commit 046c7e3199fca715592762e271e6061ac99b0c4b)
* cluster/afr: Print heal info split-brain output in stream fashionkarthik-us2017-11-301-0/+2
| | | | | | | | | | | | | | | | | Problem: When we trigger the heal info split-brain command the o/p is not streamed as it is received, but dumped at the end for all the bricks together. This gives a perception that the command is hung. Fix: When we get a split brain entry while crawling throught the pending heal entries, flush that immediately so that it prints the output in a stream fashion and doesn't look like the cli is hung. Change-Id: I7547e86b83202d66616749b8b31d4d0dff0abf07 BUG: 1514420 Signed-off-by: karthik-us <ksubrahm@redhat.com> (cherry picked from commit 05f9c13f4d69e4113f5a851f4097ef35ba3f33b2)
* cluster/afr: Honor default timeout of 5min for analyzing split-brain fileskarthik-us2017-11-301-1/+5
| | | | | | | | | | | | | | | | | | | | Problem: After setting split-brain-choice option to analyze the file to resolve the split brain using the command "setfattr -n replica.split-brain-choice -v "choiceX" <path-to-file>" should allow to access the file from mount for default timeout of 5mins. But the timeout was not honored and was able to access the file even after the timeout. Fix: Call the inode_invalidate() in afr_set_split_brain_choice_cbk() so that it will triger the cache invalidate after resetting the timer and the split brain choice. So the next calls to access the file will fail with EIO. Change-Id: I698cb833676b22ff3e4c6daf8b883a0958f51a64 BUG: 1514380 Signed-off-by: karthik-us <ksubrahm@redhat.com> (cherry picked from commit 933ec57ccda2c1ba5ce6f207313c3b6802e67ca3)
* features/locks: Fix memory leaksXavier Hernandez2017-11-305-5/+11
| | | | | | | | | Backport of: > BUG: 1515161 Change-Id: Ic1d2e17a7d14389b6734d1b88bd28c0a2907bbd6 BUG: 1517689 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* cluster/dht: make rebalance use truncate incaseSusant Palai2017-11-233-71/+99
| | | | | | | | | | | | | .. the brick file system does not support fallocate. > Change-Id: Id76cda2d8bb3b223b779e5e7a34f17c8bfa6283c > BUG: 1488103 > Signed-off-by: Susant Palai <spalai@redhat.com> Change-Id: Id76cda2d8bb3b223b779e5e7a34f17c8bfa6283c BUG: 1516691 Signed-off-by: Susant Palai <spalai@redhat.com>
* cluster/dht: Don't set ACLs on linkto fileN Balachandran2017-11-201-0/+11
| | | | | | | | | | | | | | | | | The trusted.SGI_ACL_FILE appears to set posix ACLs on the linkto file that is a target of file migration. This can mess up file permissions and cause linkto identification to fail. Now we remove all ACL xattrs from the results of the listxattr call on the source before setting them on the target. > BUG: 1514329 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: I56802dbaed783a16e3fb90f59f4ce849f8a4a9b4 BUG: 1515042 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* doc : release-notes for GlusterFS-3.12.3v3.12.3Jiffin Tony Thottan2017-11-111-0/+53
| | | | | | Change-Id: I247f2150b8a60a2f5b00edf86a88b6b9873d2565 BUG: 1501906 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
* glusterd: restart the brick if qorum status is NOT_APPLICABLE_QUORUMAtin Mukherjee2017-11-101-1/+2
| | | | | | | | | | | | | | If a volume is not having server quorum enabled and in a trusted storage pool all the glusterd instances from other peers are down, on restarting glusterd the brick start trigger doesn't happen resulting into the brick not coming up. > mainline patch : https://review.gluster.org/#/c/18669/ Change-Id: If1458e03b50a113f1653db553bb2350d11577539 BUG: 1511301 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 635c1c3691a102aa658cf1219fa41ca30dd134ba)
* cli: correct rebalance status elapsed checkN Balachandran2017-11-101-1/+5
| | | | | | | | | | | | Check that elapsed time has crossed 10 mins for at least one rebalance process before displaying the estimates. > BUG: 1479528 > Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 56aef68530b3bab27730aa62e4fbc513d3dba65f) Change-Id: Ib357a6f0d0125a178e94ede1e31514fdc6ce3593 BUG: 1511271 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* eventsapi: HTTPS support for WebhooksAravinda VK2017-11-093-29/+114
| | | | | | | | | | | | | | | | | | First it tries to call URL with verify=True without specifying the cert path, it succeeds if a webhook is HTTP or HTTPS with CA trusted certificates(for example https://github..). If above call fails with SSL error then it tries to get the server certificate and calls URL again. If call fails with SSL error even after using the certificate, then verification will be disabled and logged in the log file. All other errors will be catched and logged as usual. BUG: 1509200 Change-Id: I86a3390ed48b75dffdc7848022af23a1e1d7f076 Signed-off-by: Aravinda VK <avishwan@redhat.com> (cherry picked from commit 4216869c724cf19c12d63c0580de88e9427e6467)
* md-cache: avoid checking the xattr value buffer with string functions.Günther Deschner2017-11-092-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | xattrs may very well contain binary, non-text data with leading 0 values. Using strcmp for checking empty values is not the appropriate thing to do: In the best case, it might treat a binary xattr value starting with 0 from being cached (and hence also from being reported back with xattr). In the worst case, we might read beyond the end of a data blob that does contain any zero byte. We fix this by checking the length of the data blob and checking the first byte against 0 if the length is one. > Signed-off-by: Guenther Deschner <gd@samba.org> > Pair-Programmed-With: Michael Adam <obnox@samba.org> > Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11 > BUG: 1476324 > Reviewed-on: https://review.gluster.org/17910 > Reviewed-by: Michael Adam <obnox@samba.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Poornima G <pgurusid@redhat.com> > Tested-by: Poornima G <pgurusid@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > (cherry picked from commit ab4ffdac9dec1867f2d9b33242179cf2b347319d) Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11 BUG: 1499892 Signed-off-by: Günther Deschner <gd@samba.org>
* cli: gluster help changesN Balachandran2017-11-087-76/+387
| | | | | | | | | | | | | gluster cli help now shows only the top level help commands. gluster <component> help will now show help commands for <component>. Change-Id: I263f53a0870d80ef4cfaad455fdaa47e2ac4423b BUG: 1509786 > BUG: 1474768 > Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 89dc54f50c9f800ca4446ea8fe736e4860588845) Signed-off-by: N Balachandran <nbalacha@redhat.com>
* glusterd : introduce timer in mgmt_v3_lockGaurav Yadav2017-11-067-18/+244
| | | | | | | | | | | | | | | | | | Problem: In a multinode environment, if two of the op-sm transactions are initiated on one of the receiver nodes at the same time, there might be a possibility that glusterd may end up in stale lock. Solution: During mgmt_v3_lock a registration is made to gf_timer_call_after which release the lock after certain period of time >mainline patch : https://review.gluster.org/#/c/18437/ Change-Id: I16cc2e5186a2e8a5e35eca2468b031811e093843 BUG: 1503239 Signed-off-by: Gaurav Yadav <gyadav@redhat.com>
* protocol/server: fix the comparision logic in case of subdir mountAmar Tumballi2017-11-061-30/+30
| | | | | | | | | | | | | | without the fix, the stat entry on a file would return inode==1 for many files, in case of subdir mount This happened with the confusion of return value of 'gf_uuid_compare()', it is more like strcmp, instead of a gf_boolean return value, and hence resulted in the bug. Change-Id: I31b8cbd95eaa3af5ff916a969458e8e4020c86bb BUG: 1505527 Signed-off-by: Amar Tumballi <amarts@redhat.com> (cherry picked from commit 2ade36cd98ea0f5bd2a8f619a19c20438318afaf)
* protocol/client: handle the subdir handshake properly for add-brickAmar Tumballi2017-11-062-6/+35
| | | | | | | | | | There should be different way we handle handshake in case of subdir mount for the first time, and in case of subsequent graph changes. Change-Id: I2a7ba836433bb0a0f4a861809e2bb0d7fbc4da54 BUG: 1505323 Signed-off-by: Amar Tumballi <amarts@redhat.com> (cherry picked from commit 9aa574a51b84717c1f3949ed2e28a49e49840a93)
* md-cache: Use correct xattr keynames for virtual glusterfs ACLs.Günther Deschner2017-11-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The "glusterfs.posix_acl." prefix does not catch the glusterfs posix acl xattr keynames which are * "glusterfs.posix.acl" and * "glusterfs.posix.default_acl" Using the GF_POSIX_ACL_ACCESS and GF_POSIX_ACL_DEFAULT defines directly is the savest option. Guenther > BUG: 1476295 > Signed-off-by: Guenther Deschner <gd@samba.org> > Reviewed-on: https://review.gluster.org/17909 > Reviewed-by: Michael Adam <obnox@samba.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Tested-by: Niels de Vos <ndevos@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > (cherry picked from commit 5fe8555800cbc9818e7c976f63499795a378cd8d) > Signed-off-by: Günther Deschner <gd@samba.org> Change-Id: I5aba64b26b6cbec850ea02316dd9f069400e857f BUG: 1499889 Signed-off-by: Günther Deschner <gd@samba.org>
* glusterd: clean up portmap on brick disconnectAtin Mukherjee2017-11-064-11/+46
| | | | | | | | | | | | | | | | | | | | | | | GlusterD's portmap entry for a brick is cleaned up when a PMAP_SIGNOUT event is initiated by the brick process at the shutdown. But if the brick process crashes or gets killed through SIGKILL then this event is not initiated and glusterd ends up with a stale port. Since GlusterD's portmap traversal happens both ways, forward for allocation and backward for registry search, there is a possibility that glusterd might end up running with a stale port for a brick which eventually will end up with clients to fail to connect to the bricks. Solution is to clean up the port entry in case the process is down as part of the brick disconnect event. Although with this the handling PMAP_SIGNOUT event becomes redundant in most of the cases, but this is the safeguard method to avoid glusterd getting into the stale port issues. > mainline patch : https://review.gluster.org/#/c/18541/ Change-Id: I04c5be6d11e772ee4de16caf56dbb37d5c944303 BUG: 1507747 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 30e0b86aae00430823f2523c6efa3c4ebbf0a478)
* glusterd: fix brick restart parallelismAtin Mukherjee2017-11-066-32/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | glusterd's brick restart logic is not always sequential as there is atleast three different ways how the bricks are restarted. 1. through friend-sm and glusterd_spawn_daemons () 2. through friend-sm and handling volume quorum action 3. through friend handshaking when there is a mimatch on quorum on friend import. In a brick multiplexing setup, glusterd ended up trying to spawn the same brick process couple of times as almost in fraction of milliseconds two threads hit glusterd_brick_start () because of which glusterd didn't have any choice of rejecting any one of them as for both the case brick start criteria met. As a solution, it'd be better to control this madness by two different flags, one is a boolean called start_triggered which indicates a brick start has been triggered and it continues to be true till a brick dies or killed, the second is a mutex lock to ensure for a particular brick we don't end up getting into glusterd_brick_start () more than once at same point of time. Change-Id: I292f1e58d6971e111725e1baea1fe98b890b43e2 BUG: 1508283 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 82be66ef8e9e3127d41a4c843daf74c1d8aec4aa)
* glusterd: delete source brick only once in reset-brick commit forceAtin Mukherjee2017-11-022-1/+25
| | | | | | | | | | | | | | While stopping the brick which is to be reset and replaced delete_brick flag was passed as true which resulted glusterd to free up to source brick before the actual operation. This results commit force to fail failing to find the source brickinfo. > mainline patch : https://review.gluster.org/#/c/18581/ Change-Id: I1aa7508eff7cc9c9b5d6f5163f3bb92736d6df44 BUG: 1507877 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 0fb8acaa6ff80c43e46deac0ce66b29ae0df0ca4)
* glusterd: persist brickinfo's port change into glusterd's storeGaurav Yadav2017-11-025-10/+61
| | | | | | | | | | | | | | | | | | Problem: Consider a case where node reboot is performed and prior to reboot brick was listening to 49153. Post reboot glusterd assigned 49152 to brick and started the brick process but the new port was never persisted. Now when glusterd restarts glusterd always read the port from its persisted store i.e 49153 however pmap signin happens with the correct port i.e 49152. Fix: Make sure when glusterd_brick_start is called, glusterd_store_volinfo is eventually invoked. Change-Id: Ic0efbd48c51d39729ed951a42922d0e59f7115a1 BUG: 1507748 Signed-off-by: Gaurav Yadav <gyadav@redhat.com>
* features/worm: Adding check to newloc when doing renameluneo72017-10-252-2/+25
| | | | | | | | | | | | | | | | | | | | | | | Problem: Since rename didn't check if newloc exists and it's retention state it was possible to rename a new file that wasn't in retention over a existing file that was in read-only state. Cherry picked from commit 00a4dc0: > Change-Id: I63c6bbabb7bb456ebedf201cc77b878ffda62229 > BUG: 1484490 > Signed-off-by: luneo7 <luneo7@gmail.com> > Reviewed-on: https://review.gluster.org/18104 > Tested-by: jiffin tony Thottan <jthottan@redhat.com> > Tested-by: Prashanth Pai <ppai@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Prashanth Pai <ppai@redhat.com> > Reviewed-by: Karthik U S <ksubrahm@redhat.com> > Reviewed-by: Amar Tumballi <amarts@redhat.com> Change-Id: I63c6bbabb7bb456ebedf201cc77b878ffda62229 BUG: 1484489 Signed-off-by: luneo7 <luneo7@gmail.com>
* glusterd: documenting server.allow-insecureSanju Rakonde2017-10-251-1/+1
| | | | | | | | | | | | | problem: "server.allow-insecure" is invisible in gluster volume set help. Fix: "server.allow-insecure" is defined as NO_DOC type, chainging it to DOC type solve the problem. Change-Id: I327f1e4c1684ff846deb8b7df07d4d8a09073274 BUG: 1505373 Signed-off-by: Sanju Rakonde <srakonde@redhat.com> (cherry picked from commit c0b08f10ed07bfe06309e31a7fff85cadb733ce2)
* cli: volume status command is missing in man pageSanju Rakonde2017-10-251-0/+3
| | | | | | | | | | | Problem: volume status command is missing gluster manual page. Fix: Adding volume status command to manual page. Change-Id: Ifef18ff3721bc85636a9e7707c50bee2bf9d4a9b BUG: 1505846 Signed-off-by: Sanju Rakonde <srakonde@redhat.com> (cherry picked from commit a39f5d62f737d7a3241f2adaff064b8d92f0d3ea)
* glusterfsd: Dereferencing the null pointerSanju Rakonde2017-10-251-1/+2
| | | | | | | | | | | | | | | | | Problem: When control reaches to out, one of (iobref, iobuf, frame) can be null.for iobref, iobuf iobref_unref() and iobuf_unref() functions are called respectively, which are using GF_VALIDATE_OR_GOTO(), so there won't be null pointer dereference. But for frame without null checking STACK_DESTROY(frame->root) is called causing null pointer dereference. Fix: adding a line for null checking, the function STACK_DESTROY(frame->root) is called only when frame is not null. Change-Id: I3a6684c11fb7b694b81d6ad4fec3bced5562ad88 BUG: 1505370 Signed-off-by: Sanju Rakonde <srakonde@redhat.com> (cherry picked from commit 87bd25b64ae34cce95e87e724acfeab4c13d60a4)
* build: make it possible to build cleanly 2x in a rowNiels de Vos2017-10-258-6/+13
| | | | | | | | | | | | | | | | | | | | | | | 'make clean' does not cleanup everything, and some of the files get cleaned too eagerly. Several files are being packaged in a 'make dist' tarball, that get rebuild each time anyway. Specifically, this change prevents - libglusterfs/src/generator.pyc from laying around - keeping rpc/xdr/gen/*.x symlinks - modifying tests/basic/{fuse,gfapi}/Makefile each run - including tests/env.rc and events/src/eventtypes.py in the tarball Cherry picked from commit a413c6353dbfff5221ea020ff8e1475d5ee17a81: > Change-Id: I774dd1abf3a9d3b6a89b938cf6ee7d7792c59a82 > BUG: 1501317 > Reported-by: Patrick Matthäi <pmatthaei@debian.org> > Signed-off-by: Niels de Vos <ndevos@redhat.com> Change-Id: I774dd1abf3a9d3b6a89b938cf6ee7d7792c59a82 BUG: 1494527 Reported-by: Patrick Matthäi <pmatthaei@debian.org> Signed-off-by: Niels de Vos <ndevos@redhat.com>
* eventsapi: Add JWT signing supportAravinda VK2017-10-253-16/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New argument added to accept secret to generate JWT token. This patch does not affect the backward compatibility. Usage: gluster-eventsapi webhook-add <url> [-t <TOKEN>] \ [-s SECRET] With `--token` argument, Token header will be added as is. Authorization: Bearer <TOKEN> In case of shared secret, Gluster will generate JWT token using the secret and then add it to Authorization header. Authorization: Bearer <GENERATED_TOKEN> Secret/Token can be updated using `webhook-mod` command. Generated token will include the following payload, { "iss": "gluster", "exp": EXPIRY_TIME, "sub": EVENT_TYPE, "iat": EVENT_TIME } Where: iss - Issuer, exp - Expiry Time, sub - Event Type used as Subject, iat - Event Time used as Issue Time BUG: 1501864 Change-Id: Ib6b6fab23fb212d7f5e9bbc9e1416a9e9813ab1b Signed-off-by: Aravinda VK <avishwan@redhat.com> (cherry picked from commit add7116efa1f31e86f9c00c72c71872b1161370f)
* libgfchangelog: Fix possible null pointer dereferenceKotresh HR2017-10-251-6/+6
| | | | | | | | | | | | | | | | If pthread_attr_init fails, gf_msg uses this->name where 'this' is not initialized yet. This patch fixes the same. > Change-Id: Ie004cbe1015a0d62fc3b5512e8954c5606eeeb5f > Signed-off-by: Kotresh HR <khiremat@redhat.com> > BUG: 1505325 (cherry picked from commit 738c38f0efa7b4d4dab0cf23d00589d68e4eb88d) Change-Id: Ie004cbe1015a0d62fc3b5512e8954c5606eeeb5f Signed-off-by: Kotresh HR <khiremat@redhat.com> BUG: 1505856
* cluster/dht: fix crash when deleting directoriesZhang Huan2017-10-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | In DHT, after locks on all subvolumes are acquired, it would perform the following steps sequentially, 1. send remove dir on all other subvolumes except the hashed one in a loop; 2. wait for all pending rmdir to be done 3. remove dir on the hashed subvolume The problem is that in step 1 there is a check to skip hashed subvolume in the loop. If the last subvolume to check is actually the hashed one, and step 3 is quickly done before the last and hashed subvolume is checked, by accessing shared context data be destroyed in step 3, would cause a crash. Fix by saving shared data in a local variable to access later in the loop. > BUG: 1490642 > Signed-off-by: Zhang Huan <zhanghuan@open-fs.com> (cherry picked from commit 206120126d455417a81a48ae473d49be337e9463) Change-Id: I8db7cf7cb262d74efcb58eb00f02ea37df4be4e2 BUG: 1505221 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* protocol-auth: use the proper validation methodAmar Tumballi2017-10-254-35/+18
| | | | | | | | | | Currently, server protocol's init and glusterd's option validation methods are different, causing an issue. They should be same for having consistent behavior Change-Id: Ibbf9a18c7192b2d77f9b7675ae7da9b8d2fe5de4 BUG: 1501315 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* gfapi: set lkowner in glfdSoumya Koduri2017-10-257-1/+326
| | | | | | | | | | | | | | | | | | We need a provision to be able to set lkowner (which is used to distinguish locks maintained by server) in gfapi. Since the same lk_owner need to be used to be able to flush the lock while closing the fd, store the lkowner in the glfd structure itself. A new API has been added to be able to set lkowner in glfd. This is backport of below mainline fix - https://review.gluster.org/#/c/18429 https://review.gluster.org/#/c/18522/ Change-Id: I67591d6b9a89c20b9617d52616513ff9e6c06b47 BUG: 1501956 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* geo-rep: Filter out volume-mark xattrKotresh HR2017-10-231-0/+1
| | | | | | | | | | | | | | | | | | | The volume-mark xattr, maintained at brick root of slave volume is specific to geo-replication and should be filtered out for all other clients. It should also be filtered out from list getxattr from all mounts including geo-rep mount as it might cause rsync to read and set. > Change-Id: If9eb5a3af18051083c853e70d93b2819e8eea222 > BUG: 1500433 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit c64fd0d4b0ef313bb44aae68a376ec0c9ee8657a) Change-Id: If9eb5a3af18051083c853e70d93b2819e8eea222 BUG: 1502104 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* mount/fuse : Fix parsing of vol_id for snapshot volumeMohammed Rafi KC2017-10-151-2/+4
| | | | | | | | | | | | | | | | | | | | | For supporting sub-dir mount, we changed the volid. Which means anything after a '/' in volume_id will be considered as sub-dir path. But snapshot volume has vol_id stracture of /snaps/<volname>/<snapname> which has to be considered as during the parsing. Note 1: sub-dir mount is not supported on snapshot volume Note 2: With sub-dir mount changes brick based mount for quota cannot be executed via mount command. It has to be a direct call via glusterfs Backport of> >Change-Id: I0d824de0236b803db8a918f683dabb0cb523cb04 >BUG: 1501235 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Change-Id: I0d824de0236b803db8a918f683dabb0cb523cb04 BUG: 1501238 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> (cherry picked from commit 067f38063e13fc75d4e3f7adf93441d15099c557)
* doc : release-notes for GlusterFS-3.12.2v3.12.2Jiffin Tony Thottan2017-10-131-0/+64
| | | | | | Change-Id: I92a227548867a46bebdf0150605bdd6072f06bd9 BUG: 1491574 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
* cluster/ec: Improve performance with xattrop updateSunil Kumar Acharya2017-10-124-80/+228
| | | | | | | | | | | | | | | | Existing EC code updates the xattr on the subvolume in a sequential pattern resulting in very poor performance. With this fix EC now updates the xattr on the subvolume in parallel which improves the xattr update performance. >BUG: 1445663 >Change-Id: I3fc40d66db0b88875ca96a9fa01002ba386c0486 >Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com> BUG: 1499150 Change-Id: I3fc40d66db0b88875ca96a9fa01002ba386c0486 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* glusterd:Marking all the brick status as stopped when a process goes down in ↵Sanju Rakonde2017-10-122-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | brick multiplexing In brick multiplexing environment, if a brick process goes down i.e., if we kill it with SIGKILL, the status of the brick for which the process came up for the first time is only changing to stopped. all other brick statuses are remain started. This is happening because the process was killed abruptly using SIGKILL signal and signal handler wasn't invoked and further cleanup wasn't triggered. When we try to start a volume using force, it shows error saying "Request timed out", since all the brickinfo->status are still in started state, we're waiting for one of the brick process to come up which never going to happen since the brick process was killed. To resolve this, In the disconnect event, We are checking all the processes that whether the brick which got disconnected belongs the process. Once we get the process we are calling a function named glusterd_mark_bricks_stopped_by_proc() and sending brick_proc_t object as an argument. From the glusterd_brick_proc_t we can get all the bricks attached to that process. but these are duplicated ones. To get the original brickinfo we are reading volinfo from brick. In volinfo we will have original brickinfo copies. We are changing brickinfo->status to stopped for all the bricks. >Change-Id: Ifb9054b3ee081ef56b39b2903ae686984fe827e7 >BUG: 1499509 >Signed-off-by: Sanju Rakonde <srakonde@redhat.com> >Reviewed-on: https://review.gluster.org/#/c/18444/ >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >cherry picked from commit 9422446d72bc054962d72ace9912ecb885946d49) Change-Id: Ifb9054b3ee081ef56b39b2903ae686984fe827e7 BUG: 1501154 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* geo-rep: Fix status transitionKotresh HR2017-10-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The status transition is as below which is wrong. Created->Initializing->Active->Active/Passive->Stopped As soon as the monitor spawns the worker, the state is changed from 'Initializing' to 'Active' and then to 'Active/Passive' based on whether worker gets the lock or not. This is wrong and it should directly tranistion as below. Created->Initializing->Active/Passive->Stopped > Change-Id: Ibf5ca5c4fdf168c403c6da01db60b93f0604aae7 > BUG: 1500284 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 3edf926a1bda43879c09694cf3904c214c94c9dc) Change-Id: Ibf5ca5c4fdf168c403c6da01db60b93f0604aae7 BUG: 1500835 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* cluster/afr: Make choose-local "reconfigurable"Krutika Dhananjay2017-10-122-0/+29
| | | | | | | | | | | | | | | | Backport of: > Change-Id: Ibab292ba705d993b475cd0303fb3318211fb2500 > Reviewed-on: https://review.gluster.org/18026 > BUG: 1480525 > cherry-picked from commit 1e2d6537875d16b783e3c50ada7ee61487c6d796 With this change, enabling choose-local (which means its state makes transition from "off" to "on") will be effective after the first gfid-lookup on "/" since volume-set was executed. Change-Id: Ibab292ba705d993b475cd0303fb3318211fb2500 BUG: 1501022 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* geo-rep/scheduler: Add validation for session existenceKotresh HR2017-10-122-1/+5
| | | | | | | | | | | | | | | Added validation to check for session existence to give out proper error message out. > Change-Id: I13c5f6ef29c1395cff092a14e1bd2c197a39f058 > BUG: 1499159 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 938addeb7ec634e431c2c8c0a768a2a9ed056c0d) Change-Id: I13c5f6ef29c1395cff092a14e1bd2c197a39f058 BUG: 1499392 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* fuse/readdirp: Remove need_lookup from fuse_readdirp_cbkSusant Palai2017-10-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | background: Various xlators used to populate their ctx, on an explicit lookup. That means without a lookup, the translator will have either null or stale data to function. E.g. dht would depend on lookup to create linkto files on the correct node/hashed subvol, afr would rely on this lookup to heal pending data/metadata etc. So to complete above actions a lookup used to be issued on files, even their inode was populated on a readdirp_cbk. This was done by setting the need_lookup flag on all the files those were read on readdirp fop. We tried a small test on "ACL client". For listing 50k files on root itself, it took around 50seconds with readdirp enabled while the same operation took 5-6 seconds with readdirp disabled. Both the times md-cache was enabled. We observed that on the 1st test case (readdirp enabled), post readdirp a getxattr is done. The number of getxattr depends on the number of acl xattrs (I saw requests on these two: system.posix_acl_default, system.posix_acl_access). Since need_lookup flag is set, during fuse_resolve a nameless lookup is executed on the inode(getxattr being inode operation, hence the nameless lookup). Since md-cache does not serve nameless lookup, a network hop is needed for each file, costing the time. With readdirp disabled, the getxattrs are served from md-cache itself(note: we are discussing the 2nd attempt of ls -l use case). _Current affairs around need of lookup for a file to populate it's ctx_: For the xlators on client stack we discussed quite extensively about the need for a lookup fop post readdirp in all three cluster translators - afr, EC and dht. EC and dht don't really need a nameless lookup post readdirp. For afr too, the need for lookup was negated with patch (http://review.gluster.org/6010 - AFRV2), where afr added a function called afr_inode_refresh() which does a lookup and populates its inode context in case a FOP came to AFR without a lookup being issued prior to it. We ran a thread on gluster-devel asking for feedback on the need of explicit lookup post readdirp. For responses refer [1]. Refer [2] for discussions happened on gerrit. After gathering inputs from [1] and [2], it looks like there is no xlator in current state that requires an explicit lookup post readdirp to function properly. * A separate similar patch will be sent for gfapi/nfs/nfs-ganesha. Note: Only file's inode is built with readdirp. [1] http://lists.gluster.org/pipermail/gluster-devel/2017-August/053505.html [2] https://review.gluster.org/#/c/17985/ > Change-Id: Ie1d68ce7bea5e1f8a1fab9a62217f478322554f5 > BUG: 1492996 > Signed-off-by: Susant Palai <spalai@redhat.com> Change-Id: Ie1d68ce7bea5e1f8a1fab9a62217f478322554f5 BUG: 1499123 Signed-off-by: Susant Palai <spalai@redhat.com>
* geo-rep: Add EINTR to retry list while doing readlinkKotresh HR2017-10-121-4/+6
| | | | | | | | | | | | | | | | Worker occasionally crashed with EINTR on readlink. This is not persistent and is transient. Worker restart invovles re-processing of few entries in changenlogs. So adding EINTR to retry list to avoid worker restart. > Change-Id: Iefe641437b5d5be583f079fc2a7a8443bcd19f9d > BUG: 1499393 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 34d52445a9058310d7512c9bcc8c01e709aac1ef) Change-Id: Iefe641437b5d5be583f079fc2a7a8443bcd19f9d BUG: 1500845 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* geo-rep: Add ENODATA to retry list on gfid getxattrKotresh HR2017-10-121-8/+5
| | | | | | | | | | | | | | | | | | During xsync crawl, worker occasionally crashed with ENODATA on getting gfid from backend. This is not persistent and is transient. Worker restart invovles re-processing of few entries in changenlogs. So adding ENODATA to retry list to avoid worker restart. > Change-Id: Ib78d1e925c0a83c78746f28f7c79792a327dfd3e > BUG: 1499391 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit b56bdb34dafd1a87c5bbb2c9a75d1a088d82b1f4) Change-Id: Ib78d1e925c0a83c78746f28f7c79792a327dfd3e BUG: 1500841 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* geo-rep: Fix passive brick's last sync timeKotresh HR2017-10-121-0/+1
| | | | | | | | | | | | | | | | | | | Passive brick's stime was not updated to the status file immediately after updating the brick root. As a result the last sync time was showing '0' until it finishes first crawl if passive worker becomes active after restart. Fix is to update the status file immediately after upgrading the brick root. > Change-Id: I248339497303bad20b7f5a1d42ab44a1fe6bca99 > BUG: 1500346 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit f18a47ee7e6e06c9a9a8893aef7957f23a18de53) Change-Id: I248339497303bad20b7f5a1d42ab44a1fe6bca99 BUG: 1500853 Signed-off-by: Kotresh HR <khiremat@redhat.com>