| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Goal: 'libglusterfs' files shouldn't have any dependency outside of
the tree, specially the header files, shouldn't have '#include'
from outside the tree.
Fixes:
* Had to introduce libglusterd so, methods and structures required
for only mgmt/glusterd, and cli/ are separated from 'libglusterfs/'
* Remove rpc/xdr/gen from build, which was used mainly so
dependency for libglusterfs could be properly satisfied.
* Move rpcsvc_auth_data to client_t.h, so all dependencies could
be handled.
Updates: bz#1636297
Change-Id: I0e80243a5a3f4615e6fac6e1b947ad08a9363fce
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
| |
Fixes: bz#1158130
Change-Id: Ifdeaed7c9fbe85f7ce421f7c89cbe7265e45f77c
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
| |
Fixes: bz#1734370
Change-Id: I29e338bac62104233a6f80212df8d0fb016affda
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
- Removal of quite a bit of dead code.
- Use dict_set_str_sizen and friends where applicable.
- Moved some functions to be static and initialize values right away.
Change-Id: Ic25b5da4028198694a0e24796dea375661eb66b9
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Adding a timer to timer wheel should be done only after getting the
timer wheel from the ctx using the function glusterfs_ctx_tw_get(). The
function inits the wheel if not already done.
Change-Id: I9692f84b822a02a9dc14725b7c11d26a2a634e94
Updates: #703
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Create a separate logdir for each host instance created by
cluster.rc. This makes it easier to determine the files
belonging to a particular instance.
Change-Id: Ic8321f83f98995412b7d5f095b3d3f0391767a8b
Fixes: bz#1733042
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the glusterfs fuse client process is unable to
process the invalidate requests quickly enough, the
number of such requests quickly grows large enough
to use a significant amount of memory.
We are now introducing another option to set an upper
limit on these to prevent runaway memory usage.
Change-Id: Iddfff1ee2de1466223e6717f7abd4b28ed947788
Fixes: bz#1732717
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
|
|
|
| |
Change-Id: I727287784a15d89441865de7f438002e4a370250
fixes: bz#1738763
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
| |
Updates: bz#1689097
Change-Id: I2e3c2a3aef17fda67d04fa9e604ea3f8335a2b0b
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
| |
Change-Id: I0cebaaf55c09eb1fb77a274268ff564e871b743b
fixes bz#1738419
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
https://build.gluster.org/job/centos7-regression/7337/consoleFull
indicates the shd crashing for this .t. On looking at the core, I see
the crash is at the time of shd init and glusterfs context is null:
(gdb) bt
(gdb) p ctx
$2 = (glusterfs_ctx_t *) 0xf00000000
The .t is killing all gluster processes immediately after volume start,
so it looks like a race between shd coming up and it being killed.
Fix: Kill gluster processes only after they are up and running.
Fixes: bz#1740017
Change-Id: I7cf589201669bd9f535e968d147015dc99e9a4b6
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
|
|
|
| |
Fixes: bz#1644322
Change-Id: I53e8fa362cd8c7d04fb1c4abb606a9abb642c592
Signed-off-by: Csaba Henk <csaba@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This is useful information as it allows locating build issues quickly.
The size of the build output increases roughly by half of it, which
is a tolerable trade-off for better build time diagnostics.
updates bz#1193929
Signed-off-by: Csaba Henk <csaba@redhat.com>
Change-Id: Id60c03bee558528ae804f037c93457f9d9e738c0
|
|
|
|
|
|
|
|
|
|
| |
When discard/truncate performs write fop, it should do so
after updating lock->good_mask to make sure readv happens
on the correct mask
fixes bz#1727081
Change-Id: Idfef0bbcca8860d53707094722e6ba3f81c583b7
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When two threads(sync jobs) in Geo-rep worker calls `gconf.get` and
`gconf.getr`(realtime) at the sametime, `getr` resets the conf object
and other one gets None. Thread Lock is introduced to fix the issue.
```
File "/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py",
line 368, in twrap
tf(*aargs)
File "/usr/libexec/glusterfs/python/syncdaemon/master.py", line 1987,
in syncjob
po = self.sync_engine(pb, self.log_err)
File "/usr/libexec/glusterfs/python/syncdaemon/resource.py",
line 1444, in rsync
rconf.ssh_ctl_args + \
AttributeError: 'NoneType' object has no attribute 'split'
```
Change-Id: I9c245e5c36338265354e158f5baa32b119eb2da5
Updates: bz#1737484
Signed-off-by: Aravinda VK <avishwan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With release-6, we now can have transport.socket.listen-port parameter
configurable in glusterd.vol. However the default value wasn't defined
in the code and this breaks the backward compatibility where if one has
a modified glusterd.vol file, then post upgrade the same file will be
retained and the new changes introduced as part of the release wouldn't
be available in the glusterd.vol. So it's important that for each new
options introduced in glusterd.vol file backward compatibility is
guaranteed.
Fixes: bz#1737676
Change-Id: I776b28bff786320cda299fe673d824024dc9803e
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Log layout hash ranges in hex to make it easier
to compare them to the on disk xattrs.
Change-Id: Ib75c2508bf8e0ab7f5ae26d0443ef02b792b7307
Fixes: bz#1697293
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the nfs EXCLUSIVE mode create may sets a later time
to mtime (at verifier), it should not set to ctime for
storage.ctime does not allowed set ctime to a earlier time.
/* Earlier, mdata was updated only if the existing time is less
* than the time to be updated. This would fail the scenarios
* where mtime can be set to any time using the syscall. Hence
* just updating without comparison. But the ctime is not
* allowed to changed to older date.
*/
According to kernel's setattr, always set ctime at setattr,
and doesnot set ctime from mtime at storage.ctime.
Change-Id: I5cfde6cb7f8939da9617506e3dc80bd840e0d749
fixes: bz#1737288
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we receive a graph attach request, if ctx->active is
not set we used to fail assuming that the initilization has
not completed yet for the process start.
Since the management connection is established, it will receive
attach request, even when ctx->active is NULL.
Change-Id: Ied4d1ac63e6d4ced4a9405a78e1ce39f81dfd437
fixes: bz#1727256
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were ruturning first proc entry even if it is not running.
This was in an assumption that the process could have just
started and not updated the pidfile.
Now we that we have introduced the states for process state,
we can take decision based on that.
Change-Id: Ibfc11c966b0db599a8d6a08d8b975233b2bbfb8c
Fixes: bz#1728766
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Test file tests/basic/shd-mux.t was taking longer than 200
seconds in some iterations. So this patch is breaking the
test case to three files
Change-Id: I1430f58798f876edf6368d6f4b8b5a75f0114c31
Updates: bz#1708929
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
|
|
|
|
|
|
| |
1. Try to unlock faster - in error paths.
2. Remove memory allocations - do them before the lock.
Change-Id: I1e9ddd80b99de45ad0f557d62a5f28951dfd54c8
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
| |
Updates: bz#1693692
Change-Id: Ia10ccca5e1fed6c4269842ebb4d507662ca0f6a6
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
| |
In posix_gfid_set, the proper error is not captured in one of
the failure cases.
Change-Id: I1c13f0691a15d6893f1037b3a5fe385a99657e00
Fixes: bz#1736482
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
|
|
|
|
|
| |
... to ignore test failures specific to brick mux.
Change-Id: I3114f34f194f18e7fc8c02a117b295f086721226
updates: bz#1193929
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fop_wind_count can go negative when fencing is enabled
on unwind path of the IO leading to hang.
Also changed code so that fop_wind_count needs to be maintained only
till fencing is enabled on the file.
updates: bz#1717824
Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480
Signed-off-by: Susant Palai <spalai@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even the use builtin 'type' command as in patch [1]
causes issues if argument in question is not part of PATH
environment variable for that user. This patch fixes the
same by doing source /etc/profile. This was already being
used in another part of script.
[1] https://review.gluster.org/23089
Change-Id: Iceb78835967ec6a4350983eec9af28398410c002
fixes: bz#1734738
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As mentioned in bug1733166, there could be potential deadlock
while processing upcalls depending on how each xlator choose
to act on it. The right way of fixing such issues
is to change rpc callback communication process.
- https://github.com/gluster/glusterfs/issues/697
Till then, making changes in gfapi layer to avoid any I/O
processing.
Change-Id: I2079e95339e5d761d5060707f4555cfacab95c83
fixes: bz#1733166
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
|
|
|
|
|
|
| |
Updates: bz#1693692
Change-Id: I145df4c0d0b0ce738f1d34b02341ec606e38522e
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Initialize a dictionary for example seems to be prefectly fine to be done
before taking a lock.
Change-Id: Ib29516c4efa8f0e2b526d512beab488fcd16d2e7
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Ctime heals the ctime xattr ("trusted.glusterfs.mdata") in lookup
if it's not present. In a multi client scenario, there is a race
which results in updating the ctime xattr to older value.
e.g. Let c1 and c2 be two clients and file1 be the file which
doesn't have the ctime xattr. Let the ctime of file1 be t1.
(from backend, ctime heals time attributes from backend when not present).
Now following operations are done on mount
c1 -> ls -l /mnt/file1 | c2 -> ls -l /mnt/file1;echo "append" >> /mnt/file1;
The race is that the both c1 and c2 didn't fetch the ctime xattr in lookup,
so both of them tries to heal ctime to time 't1'. If c2 wins the race and
appends the file before c1 heals it, it sets the time to 't1' and updates
it to 't2' (because of append). Now c1 proceeds to heal and sets it to 't1'
which is incorrect.
Solution:
Compare the times during heal and only update the larger time. This is the
general approach used in ctime feature but got missed with healing legacy
files.
fixes: bz#1734299
Change-Id: I930bda192c64c3d49d0aed431ce23d3bc57e51b7
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add few more mgmt functions to the coverage
* While testing mgmt function, found an issue, where if the
'glfs_set_volfile_server()' is not called before calling
'glfs_unset_volfile_server()', unset would cause a crash.
Null check of few variables fixes the issue, which is handled
in this patch itself.
* Added a test for volfile API
Updates: bz#1693692
Change-Id: Iba151f8da1b64107e2f436ddbfef9da45b1c1588
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
| |
Updates: bz#1693692
Change-Id: I13de7cf4c380b9663e6258e2fd62ce1f180591b4
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
| |
Updates: bz#1693692
Change-Id: I07371ea1e2613fed6dd9ea67c40cbb3ebcb9387e
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
make sure to provide 'log-file' option, so we can see the logs.
This test does test volgen inserting the trace xlator in server
graph.
Updates: bz#1693692
Change-Id: I26c736b04376674b4c094d48060660421e6c983c
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
ec_data_undo_pending calls syncop_fxattrop->SYNCOP without
a frame. In this case SYNCOP gets the frame of the task.
However, when we create a synctask for heal we provide
frame as NULL.
Now, if the read-only feature is ON, it will receive the
process ID of the shd as 0 and will consider that it as
not an internal process. This will prevent healing of a
file with "Read-only file system" error message log.
Solution:
While launching heal, create a synctask using frame and set
process id of the SHD which is -6.
Change-Id: I37195399c85de322cbcac75633888922c4e3db4a
Fixes: bz#1734252
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
when a file needs to be re-opened O_APPEND and O_EXCL
flags are not filtered in EC.
- O_APPEND should be filtered because EC doesn't send O_APPEND below EC for
open to make sure writes happen on the individual fragments instead of at the
end of the file.
- O_EXCL should be filtered because shd could have created the file so even
when file exists open should succeed
- O_CREAT should be filtered because open happens with gfid as parameter. So
open fop will create just the gfid which will lead to problems.
Fix:
Filter out these two flags in reopen.
Change-Id: Ia280470fcb5188a09caa07bf665a2a94bce23bc4
Fixes: bz#1733935
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
| |
Since we know the keylen, we can use dict_addn() instead of dict_add().
Change-Id: Iebe77faa1a20ec132cba5fb85b3d2ea63339181d
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I hit one crash issue when using the libgfapi.
In the libgfapi it will call glfs_poller() --> event_dispatch()
in file api/src/glfs.c:721, and the event_dispatch() is defined
by libgluster locally, the problem is the name of event_dispatch()
is the extremly the same with the one from libevent package form
the OS.
For example, if a executable program Foo, which will also use and
link the libevent and the libgfapi at the same time, I can hit the
crash, like:
kernel: glfs_glfspoll[68486]: segfault at 1c0 ip 00007fef006fd2b8 sp
00007feeeaffce30 error 4 in libevent-2.0.so.5.1.9[7fef006ed000+46000]
The link for Foo is:
lib_foo_LADD = -levent $(GFAPI_LIBS)
It will crash.
This is because the glfs_poller() is calling the event_dispatch() from
the libevent, not the libglsuter.
The gfapi link info :
GFAPI_LIBS = -lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid
If I link Foo like:
lib_foo_LADD = $(GFAPI_LIBS) -levent
It will works well without any problem.
And if Foo call one private lib, such as handler_glfs.so, and the
handler_glfs.so will link the GFAPI_LIBS directly, while the Foo won't
and it will dlopen(handler_glfs.so), then the crash will be hit everytime.
The link info will be:
foo_LADD = -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)
I can avoid the crash temporarily by linking the GFAPI_LIBS in Foo too like:
foo_LADD = $(GFAPI_LIBS) -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)
But this is ugly since the Foo won't use any APIs from the GFAPI_LIBS.
And in some cases when the --as-needed link option is added(on many dists
it is added as default), then the crash is back again, the above workaround
won't work.
Fixes: #699
Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
Signed-off-by: Xiubo Li <xiubli@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glusterd_store_brickinfos() is calling per each brick the
function glusterd_store_brickinfo().
In it, we call:
ret = glusterd_store_create_brick_dir(volinfo);
However, volinfo is the same for all those bricks - no need to again
and again call it (which tries to mkdir that dir).
We can do it once above the loops in glusterd_store_brickinfos()
While at, combine two similar functions that write additional dirs.
Change-Id: I5858cf7783f088ea13a8fa20115118efa816f4cb
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
There are cases where fop->mask may have fop->healing added
and readv shouldn't be wound on fop->healing. To avoid this
always wind readv to lock->good_mask
fixes bz#1727081
Change-Id: I2226ef0229daf5ff315d51e868b980ee48060b87
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
| |
Change-Id: Id7e003e4a53d0a0057c1c84e1cd704c80a6cb015
Fixes: bz#1728047
Signed-off-by: Csaba Henk <csaba@redhat.com>
|
|
|
|
|
|
| |
Updates: bz#1693692
Change-Id: I4f005e7168c201709a85db443d643b81e6d3d282
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
__nlc_inode_ctx_get assigns a value to nlc_pe_p which is never used by
its parent function or any of the predecessor hence remove the
assignment and also that function argument as it is not being used
anywhere.
fixes: bz#1732496
Change-Id: I5b950e1e251bd50a646616da872a4efe9d2ff8c9
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EC doesn't allow concurrent writes on overlapping areas, they are
serialized. However non-overlapping writes are serviced in parallel.
When a write is not aligned, EC first needs to read the entire chunk
from disk, apply the modified fragment and write it again.
The problem appears on sparse files because a write to an offset
implicitly creates data on offsets below it (so, in some way, they
are overlapping). For example, if a file is empty and we read 10 bytes
from offset 10, read() will return 0 bytes. Now, if we write one byte
at offset 1M and retry the same read, the system call will return 10
bytes (all containing 0's).
So if we have two writes, the first one at offset 10 and the second one
at offset 1M, EC will send both in parallel because they do not overlap.
However, the first one will try to read missing data from the first chunk
(i.e. offsets 0 to 9) to recombine the entire chunk and do the final write.
This read will happen in parallel with the write to 1M. What could happen
is that half of the bricks process the write before the read, and the
half do the read before the write. Some bricks will return 10 bytes of
data while the otherw will return 0 bytes (because the file on the brick
has not been expanded yet).
When EC tries to recombine the answers from the bricks, it can't, because
it needs more than half consistent answers to recover the data. So this
read fails with EIO error. This error is propagated to the parent write,
which is aborted and EIO is returned to the application.
The issue happened because EC assumed that a write to a given offset
implies that offsets below it exist.
This fix prevents the read of the chunk from bricks if the current size
of the file is smaller than the read chunk offset. This size is
correctly tracked, so this fixes the issue.
Also modifying ec-stripe.t file for Test #13 within it.
In this patch, if a file size is less than the offset we are writing, we
fill zeros in head and tail and do not consider it strip cache miss.
That actually make sense as we know what data that part holds and there is
no need of reading it from bricks.
Change-Id: Ic342e8c35c555b8534109e9314c9a0710b6225d6
Fixes: bz#1730715
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
|
|
|
|
|
|
| |
If different mount options are given to glusterfs in /etc/fstab, it
was not considered in the script.
Fixes: bz#1690454
Change-Id: If829b3d6ab79755647626edcb31f38a3716989db
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
As per the perf experiment run by Elvir, with NVME devices used for OCP (gluster)
it was seen that particularly read operations (read/randread) benefited from
these options.
Change-Id: Ibec4b96afd28e6f7e757b6ef203ccdbc0d9854d5
Fixes: bz#1727852
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
|
|
|
|
|
| |
fixes: bz#1724024
Change-Id: I539fb7248b2cfc037ec29f1413ea648f9ec21ef2
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch [1] added validation in gverify.sh to check if the gluster
binary on slave by executing gluster directly on slave. But for
non-root users, even though gluster binary is present, path is not
found when executed via ssh. Hence validate the gluster binary using
bash builtin 'type' command.
[1] https://review.gluster.org/19224
Change-Id: I93ca62c0c5b1e16263e586ddbbca8407d60ca126
fixes: bz#1731920
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Erroring out for duplicate entries for backup_volfile_servers would
cause failures for some script. This option is harmless if it is
duplicate, we just need to ignore this.
Fixes: bz#1730953
Change-Id: I950064501a7bb61b90e99f2c079564f9c923d4c1
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|