autobuild v6.0-34
Resolves: bz#1802013 bz#1823706 bz#1825177 bz#1830713 bz#1831403 Resolves: bz#1833017 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
This commit is contained in:
parent
7aeaa66127
commit
0829592fd2
26
0368-Update-rfc.sh-to-rhgs-3.5.2.patch
Normal file
26
0368-Update-rfc.sh-to-rhgs-3.5.2.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 00b79c4e2837980f36f7d8387d90cfb7dc8d0d58 Mon Sep 17 00:00:00 2001
|
||||
From: Rinku Kothiya <rkothiya@redhat.com>
|
||||
Date: Tue, 5 May 2020 12:41:41 -0400
|
||||
Subject: [PATCH 368/375] Update rfc.sh to rhgs-3.5.2
|
||||
|
||||
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
|
||||
---
|
||||
rfc.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rfc.sh b/rfc.sh
|
||||
index a408e45..37d551f 100755
|
||||
--- a/rfc.sh
|
||||
+++ b/rfc.sh
|
||||
@@ -18,7 +18,7 @@ done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
|
||||
-branch="rhgs-3.5.1-rhel-8";
|
||||
+branch="rhgs-3.5.2";
|
||||
|
||||
set_hooks_commit_msg()
|
||||
{
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,53 @@
|
||||
From f30fa3938f980f03d08479776037090e7fc11f42 Mon Sep 17 00:00:00 2001
|
||||
From: Ashish Pandey <aspandey@redhat.com>
|
||||
Date: Tue, 5 May 2020 18:17:49 +0530
|
||||
Subject: [PATCH 369/375] cluster/ec: Return correct error code and log message
|
||||
|
||||
In case of readdir was send with an FD on which opendir
|
||||
was failed, this FD will be useless and we return it with error.
|
||||
For now, we are returning it with EINVAL without logging any
|
||||
message in log file.
|
||||
|
||||
Return a correct error code and also log the message to improve thing to debug.
|
||||
|
||||
>fixes: #1220
|
||||
>Change-Id: Iaf035254b9c5aa52fa43ace72d328be622b06169
|
||||
>Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
||||
(Backport of https://review.gluster.org/#/c/glusterfs/+/24407/)
|
||||
|
||||
BUG: 1831403
|
||||
Change-Id: Ib5bf30c47b7491abd0ad5ca0ce52ec77945b2e53
|
||||
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/200209
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
xlators/cluster/ec/src/ec-dir-read.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xlators/cluster/ec/src/ec-dir-read.c b/xlators/cluster/ec/src/ec-dir-read.c
|
||||
index 8310d4a..9924425 100644
|
||||
--- a/xlators/cluster/ec/src/ec-dir-read.c
|
||||
+++ b/xlators/cluster/ec/src/ec-dir-read.c
|
||||
@@ -388,9 +388,16 @@ ec_manager_readdir(ec_fop_data_t *fop, int32_t state)
|
||||
/* Return error if opendir has not been successfully called on
|
||||
* any subvolume. */
|
||||
ctx = ec_fd_get(fop->fd, fop->xl);
|
||||
- if ((ctx == NULL) || (ctx->open == 0)) {
|
||||
- fop->error = EINVAL;
|
||||
+ if (ctx == NULL) {
|
||||
+ fop->error = ENOMEM;
|
||||
+ } else if (ctx->open == 0) {
|
||||
+ fop->error = EBADFD;
|
||||
+ }
|
||||
|
||||
+ if (fop->error) {
|
||||
+ gf_msg(fop->xl->name, GF_LOG_ERROR, fop->error,
|
||||
+ EC_MSG_INVALID_REQUEST, "EC is not winding readdir: %s",
|
||||
+ ec_msg_str(fop));
|
||||
return EC_STATE_REPORT;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
203
0370-dht-Do-opendir-selectively-in-gf_defrag_process_dir.patch
Normal file
203
0370-dht-Do-opendir-selectively-in-gf_defrag_process_dir.patch
Normal file
@ -0,0 +1,203 @@
|
||||
From 3d230880aed85737365deafe3c9a32c67da2a79e Mon Sep 17 00:00:00 2001
|
||||
From: Susant Palai <spalai@redhat.com>
|
||||
Date: Mon, 4 May 2020 19:09:00 +0530
|
||||
Subject: [PATCH 370/375] dht: Do opendir selectively in gf_defrag_process_dir
|
||||
|
||||
Currently opendir is done from the cluster view. Hence, even if
|
||||
one opendir is successful, the opendir operation as a whole is considered
|
||||
successful.
|
||||
|
||||
But since in gf_defrag_get_entry we fetch entries selectively from
|
||||
local_subvols, we need to opendir individually on those local subvols
|
||||
and keep track of fds separately. Otherwise it is possible that opendir
|
||||
failed on one of the subvol and we wind readdirp call on the fd to the
|
||||
corresponding subvol, which will ultimately result in EINVAL error.
|
||||
|
||||
> fixes: #1218
|
||||
> Change-Id: I50dd88b9597852a15579f4ee325918979417f570
|
||||
> Signed-off-by: Susant Palai <spalai@redhat.com>
|
||||
(Backport of https://review.gluster.org/#/c/glusterfs/+/24404/)
|
||||
|
||||
BUG: 1831403
|
||||
Change-Id: I96e19fdd630279c3ef44f361c1d1fc5c1c429821
|
||||
Signed-off-by: Susant Palai <spalai@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/200306
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
xlators/cluster/dht/src/dht-common.h | 2 +
|
||||
xlators/cluster/dht/src/dht-rebalance.c | 74 +++++++++++++++++++++++----------
|
||||
2 files changed, 54 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
|
||||
index 4d2aae6..8e65111 100644
|
||||
--- a/xlators/cluster/dht/src/dht-common.h
|
||||
+++ b/xlators/cluster/dht/src/dht-common.h
|
||||
@@ -742,6 +742,8 @@ struct dir_dfmeta {
|
||||
struct list_head **head;
|
||||
struct list_head **iterator;
|
||||
int *fetch_entries;
|
||||
+ /* fds corresponding to local subvols only */
|
||||
+ fd_t **lfd;
|
||||
};
|
||||
|
||||
typedef struct dht_migrate_info {
|
||||
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
|
||||
index 33cacfe..c692119 100644
|
||||
--- a/xlators/cluster/dht/src/dht-rebalance.c
|
||||
+++ b/xlators/cluster/dht/src/dht-rebalance.c
|
||||
@@ -48,6 +48,8 @@ gf_defrag_free_dir_dfmeta(struct dir_dfmeta *meta, int local_subvols_cnt)
|
||||
if (meta) {
|
||||
for (i = 0; i < local_subvols_cnt; i++) {
|
||||
gf_dirent_free(&meta->equeue[i]);
|
||||
+ if (meta->lfd && meta->lfd[i])
|
||||
+ fd_unref(meta->lfd[i]);
|
||||
}
|
||||
|
||||
GF_FREE(meta->equeue);
|
||||
@@ -55,6 +57,7 @@ gf_defrag_free_dir_dfmeta(struct dir_dfmeta *meta, int local_subvols_cnt)
|
||||
GF_FREE(meta->iterator);
|
||||
GF_FREE(meta->offset_var);
|
||||
GF_FREE(meta->fetch_entries);
|
||||
+ GF_FREE(meta->lfd);
|
||||
GF_FREE(meta);
|
||||
}
|
||||
}
|
||||
@@ -3095,7 +3098,7 @@ int static gf_defrag_get_entry(xlator_t *this, int i,
|
||||
struct dir_dfmeta *dir_dfmeta, dict_t *xattr_req,
|
||||
int *should_commit_hash, int *perrno)
|
||||
{
|
||||
- int ret = -1;
|
||||
+ int ret = 0;
|
||||
char is_linkfile = 0;
|
||||
gf_dirent_t *df_entry = NULL;
|
||||
struct dht_container *tmp_container = NULL;
|
||||
@@ -3111,6 +3114,13 @@ int static gf_defrag_get_entry(xlator_t *this, int i,
|
||||
}
|
||||
|
||||
if (dir_dfmeta->fetch_entries[i] == 1) {
|
||||
+ if (!fd) {
|
||||
+ dir_dfmeta->fetch_entries[i] = 0;
|
||||
+ dir_dfmeta->offset_var[i].readdir_done = 1;
|
||||
+ ret = 0;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
ret = syncop_readdirp(conf->local_subvols[i], fd, 131072,
|
||||
dir_dfmeta->offset_var[i].offset,
|
||||
&(dir_dfmeta->equeue[i]), xattr_req, NULL);
|
||||
@@ -3270,7 +3280,6 @@ gf_defrag_process_dir(xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
|
||||
dict_t *migrate_data, int *perrno)
|
||||
{
|
||||
int ret = -1;
|
||||
- fd_t *fd = NULL;
|
||||
dht_conf_t *conf = NULL;
|
||||
gf_dirent_t entries;
|
||||
dict_t *xattr_req = NULL;
|
||||
@@ -3304,28 +3313,49 @@ gf_defrag_process_dir(xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- fd = fd_create(loc->inode, defrag->pid);
|
||||
- if (!fd) {
|
||||
- gf_log(this->name, GF_LOG_ERROR, "Failed to create fd");
|
||||
+ dir_dfmeta = GF_CALLOC(1, sizeof(*dir_dfmeta), gf_common_mt_pointer);
|
||||
+ if (!dir_dfmeta) {
|
||||
+ gf_log(this->name, GF_LOG_ERROR, "dir_dfmeta is NULL");
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- ret = syncop_opendir(this, loc, fd, NULL, NULL);
|
||||
- if (ret) {
|
||||
- gf_msg(this->name, GF_LOG_WARNING, -ret, DHT_MSG_MIGRATE_DATA_FAILED,
|
||||
- "Migrate data failed: Failed to open dir %s", loc->path);
|
||||
- *perrno = -ret;
|
||||
+ dir_dfmeta->lfd = GF_CALLOC(local_subvols_cnt, sizeof(fd_t *),
|
||||
+ gf_common_mt_pointer);
|
||||
+ if (!dir_dfmeta->lfd) {
|
||||
+ gf_msg(this->name, GF_LOG_ERROR, ENOMEM, 0,
|
||||
+ "could not allocate memory for dir_dfmeta");
|
||||
ret = -1;
|
||||
+ *perrno = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- fd_bind(fd);
|
||||
- dir_dfmeta = GF_CALLOC(1, sizeof(*dir_dfmeta), gf_common_mt_pointer);
|
||||
- if (!dir_dfmeta) {
|
||||
- gf_log(this->name, GF_LOG_ERROR, "dir_dfmeta is NULL");
|
||||
- ret = -1;
|
||||
- goto out;
|
||||
+ for (i = 0; i < local_subvols_cnt; i++) {
|
||||
+ dir_dfmeta->lfd[i] = fd_create(loc->inode, defrag->pid);
|
||||
+ if (!dir_dfmeta->lfd[i]) {
|
||||
+ gf_msg(this->name, GF_LOG_ERROR, ENOMEM, 0, "failed to create fd");
|
||||
+ *perrno = ENOMEM;
|
||||
+ ret = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ ret = syncop_opendir(conf->local_subvols[i], loc, dir_dfmeta->lfd[i],
|
||||
+ NULL, NULL);
|
||||
+ if (ret) {
|
||||
+ fd_unref(dir_dfmeta->lfd[i]);
|
||||
+ dir_dfmeta->lfd[i] = NULL;
|
||||
+ gf_smsg(this->name, GF_LOG_WARNING, 0, 0,
|
||||
+ "failed to open dir: %s subvol: %s", loc->path,
|
||||
+ conf->local_subvols[i]->name);
|
||||
+
|
||||
+ if (conf->decommission_in_progress) {
|
||||
+ *perrno = -ret;
|
||||
+ ret = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ } else {
|
||||
+ fd_bind(dir_dfmeta->lfd[i]);
|
||||
+ }
|
||||
}
|
||||
|
||||
dir_dfmeta->head = GF_CALLOC(local_subvols_cnt, sizeof(*(dir_dfmeta->head)),
|
||||
@@ -3360,6 +3390,7 @@ gf_defrag_process_dir(xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
+
|
||||
ret = gf_defrag_ctx_subvols_init(dir_dfmeta->offset_var, this);
|
||||
if (ret) {
|
||||
gf_log(this->name, GF_LOG_ERROR,
|
||||
@@ -3372,7 +3403,8 @@ gf_defrag_process_dir(xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
|
||||
dir_dfmeta->fetch_entries = GF_CALLOC(local_subvols_cnt, sizeof(int),
|
||||
gf_common_mt_int);
|
||||
if (!dir_dfmeta->fetch_entries) {
|
||||
- gf_log(this->name, GF_LOG_ERROR, "dir_dfmeta->fetch_entries is NULL");
|
||||
+ gf_msg(this->name, GF_LOG_ERROR, ENOMEM, 0,
|
||||
+ "could not allocate memory for dir_dfmeta->fetch_entries");
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
@@ -3442,8 +3474,9 @@ gf_defrag_process_dir(xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
|
||||
ldfq_count <= MAX_MIGRATE_QUEUE_COUNT &&
|
||||
!dht_dfreaddirp_done(dir_dfmeta->offset_var, local_subvols_cnt)) {
|
||||
ret = gf_defrag_get_entry(this, dfc_index, &container, loc, conf,
|
||||
- defrag, fd, migrate_data, dir_dfmeta,
|
||||
- xattr_req, &should_commit_hash, perrno);
|
||||
+ defrag, dir_dfmeta->lfd[dfc_index],
|
||||
+ migrate_data, dir_dfmeta, xattr_req,
|
||||
+ &should_commit_hash, perrno);
|
||||
|
||||
if (ret) {
|
||||
gf_log(this->name, GF_LOG_WARNING,
|
||||
@@ -3497,9 +3530,6 @@ out:
|
||||
if (xattr_req)
|
||||
dict_unref(xattr_req);
|
||||
|
||||
- if (fd)
|
||||
- fd_unref(fd);
|
||||
-
|
||||
if (ret == 0 && should_commit_hash == 0) {
|
||||
ret = 2;
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 05bd0226716516d37ead173c7d6924225bd474db Mon Sep 17 00:00:00 2001
|
||||
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
|
||||
Date: Wed, 6 May 2020 07:24:38 -0400
|
||||
Subject: [PATCH 371/375] common-ha: cluster status shows "FAILOVER" when
|
||||
actually HEALTHY
|
||||
|
||||
pacemaker devs change the format of the ouput of `pcs status`
|
||||
|
||||
Expected to find a line in the format:
|
||||
|
||||
Online: ....
|
||||
|
||||
but now it's
|
||||
|
||||
* Online: ...
|
||||
|
||||
And the `grep -E "^Online:" no longer finds the list of nodes that
|
||||
are online.
|
||||
|
||||
Also other lines now have '*' in first few characters of the line
|
||||
throwing off `grep -x ...`
|
||||
|
||||
https://review.gluster.org/#/c/glusterfs/+/24403/
|
||||
|
||||
Change-Id: Ia04a89e76914f2a455a755f0a93fa415f60aefd0
|
||||
BUG: 1823706
|
||||
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/199442
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
extras/ganesha/scripts/ganesha-ha.sh | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
|
||||
index df333a1..4ecf91b 100644
|
||||
--- a/extras/ganesha/scripts/ganesha-ha.sh
|
||||
+++ b/extras/ganesha/scripts/ganesha-ha.sh
|
||||
@@ -919,8 +919,9 @@ status()
|
||||
local index=1
|
||||
local nodes
|
||||
|
||||
- # change tabs to spaces, strip leading spaces
|
||||
- pcs status | sed -e "s/\t/ /g" -e "s/^[ ]*//" > ${scratch}
|
||||
+ # change tabs to spaces, strip leading spaces, including any
|
||||
+ # new '*' at the beginning of a line introduced in pcs-0.10.x
|
||||
+ pcs status | sed -e "s/\t/ /g" -e "s/^[ ]*\*//" -e "s/^[ ]*//" > ${scratch}
|
||||
|
||||
nodes[0]=${1}; shift
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
49
0372-posix-fix-seek-functionality.patch
Normal file
49
0372-posix-fix-seek-functionality.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 955fea10809861aa9b3da85d386c2cc92b319cdb Mon Sep 17 00:00:00 2001
|
||||
From: Barak Sason Rofman <bsasonro@redhat.com>
|
||||
Date: Thu, 7 May 2020 18:57:37 +0300
|
||||
Subject: [PATCH 372/375] posix - fix seek functionality
|
||||
|
||||
A wrong pointer check causes the offset returned by seek to be always
|
||||
wrong
|
||||
|
||||
backport of https://review.gluster.org/#/c/glusterfs/+/24412/
|
||||
>fixes: #1228
|
||||
>Change-Id: Iac4c6a163175617ac4f14544fc6b7c6fb4041cd6
|
||||
>Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
|
||||
|
||||
BUG: 1833017
|
||||
Change-Id: Iac4c6a163175617ac4f14544fc6b7c6fb4041cd6
|
||||
Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/199761
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
libglusterfs/src/syncop.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
|
||||
index 0de53c6..693970f 100644
|
||||
--- a/libglusterfs/src/syncop.c
|
||||
+++ b/libglusterfs/src/syncop.c
|
||||
@@ -2881,12 +2881,13 @@ syncop_seek(xlator_t *subvol, fd_t *fd, off_t offset, gf_seek_what_t what,
|
||||
SYNCOP(subvol, (&args), syncop_seek_cbk, subvol->fops->seek, fd, offset,
|
||||
what, xdata_in);
|
||||
|
||||
- if (*off)
|
||||
- *off = args.offset;
|
||||
-
|
||||
- if (args.op_ret == -1)
|
||||
+ if (args.op_ret < 0) {
|
||||
return -args.op_errno;
|
||||
- return args.op_ret;
|
||||
+ } else {
|
||||
+ if (off)
|
||||
+ *off = args.offset;
|
||||
+ return args.op_ret;
|
||||
+ }
|
||||
}
|
||||
|
||||
int
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,51 @@
|
||||
From bbf43008e6d21d649536547f500662b940562c3e Mon Sep 17 00:00:00 2001
|
||||
From: Sunny Kumar <sunkumar@redhat.com>
|
||||
Date: Mon, 11 May 2020 10:02:08 +0100
|
||||
Subject: [PATCH 373/375] build: geo-rep sub-pkg requires
|
||||
policycoreutils-python-utils on rhel8
|
||||
|
||||
glusterfs-geo-replication sub-package requires policycoreutils-python-utils
|
||||
on rhel8 to set relevant selinux boolean to allow rsync.
|
||||
|
||||
Backport of:
|
||||
>Upstream Patch: https://review.gluster.org/#/c/glusterfs/+/24433/
|
||||
>Change-Id: Ia0fdcfdd8c7d18cd194e011f6b365bf5cb70a20a
|
||||
>Fixes: #1236
|
||||
>Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
||||
|
||||
BUG: 1825177
|
||||
Change-Id: Ia0fdcfdd8c7d18cd194e011f6b365bf5cb70a20a
|
||||
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/200242
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
glusterfs.spec.in | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
|
||||
index 5ed07e7..9def416 100644
|
||||
--- a/glusterfs.spec.in
|
||||
+++ b/glusterfs.spec.in
|
||||
@@ -523,6 +523,8 @@ Requires: util-linux
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
# required for setting selinux bools
|
||||
%if ( 0%{?rhel} && 0%{?rhel} >= 8 )
|
||||
+Requires(post): policycoreutils-python-utils
|
||||
+Requires(postun): policycoreutils-python-utils
|
||||
Requires: selinux-policy-targeted
|
||||
Requires(post): selinux-policy-targeted
|
||||
BuildRequires: selinux-policy-devel
|
||||
@@ -1978,6 +1980,10 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
+
|
||||
+* Mon May 11 2020 Sunny Kumar <sunkumar@redhat.com>
|
||||
+- added requires policycoreutils-python-utils on rhel8 for geo-replication
|
||||
+
|
||||
* Tue Aug 27 2019 Hari Gowtham <hgowtham@redhat.com>
|
||||
- Added scripts to collect machine stats and component stats (#1719171)
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
121
0374-open-behind-fix-missing-fd-reference.patch
Normal file
121
0374-open-behind-fix-missing-fd-reference.patch
Normal file
@ -0,0 +1,121 @@
|
||||
From 30cbdf8c06145a0c290da42ecc0a7eae928200b7 Mon Sep 17 00:00:00 2001
|
||||
From: Xavi Hernandez <xhernandez@redhat.com>
|
||||
Date: Sun, 8 Mar 2020 18:36:45 +0100
|
||||
Subject: [PATCH 374/375] open-behind: fix missing fd reference
|
||||
|
||||
Open behind was not keeping any reference on fd's pending to be
|
||||
opened. This makes it possible that a concurrent close and en entry
|
||||
fop (unlink, rename, ...) caused destruction of the fd while it
|
||||
was still being used.
|
||||
|
||||
Upstream patch:
|
||||
> Upstream patch link: https://review.gluster.org/c/glusterfs/+/24204
|
||||
> Change-Id: Ie9e992902cf2cd7be4af1f8b4e57af9bd6afd8e9
|
||||
> Fixes: bz#1810934
|
||||
> Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
||||
|
||||
Change-Id: Ie9e992902cf2cd7be4af1f8b4e57af9bd6afd8e9
|
||||
BUG: 1830713
|
||||
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/199714
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
xlators/performance/open-behind/src/open-behind.c | 27 ++++++++++++++---------
|
||||
1 file changed, 16 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/xlators/performance/open-behind/src/open-behind.c b/xlators/performance/open-behind/src/open-behind.c
|
||||
index 268c717..14ebc12 100644
|
||||
--- a/xlators/performance/open-behind/src/open-behind.c
|
||||
+++ b/xlators/performance/open-behind/src/open-behind.c
|
||||
@@ -206,8 +206,13 @@ ob_fd_free(ob_fd_t *ob_fd)
|
||||
if (ob_fd->xdata)
|
||||
dict_unref(ob_fd->xdata);
|
||||
|
||||
- if (ob_fd->open_frame)
|
||||
+ if (ob_fd->open_frame) {
|
||||
+ /* If we sill have a frame it means that background open has never
|
||||
+ * been triggered. We need to release the pending reference. */
|
||||
+ fd_unref(ob_fd->fd);
|
||||
+
|
||||
STACK_DESTROY(ob_fd->open_frame->root);
|
||||
+ }
|
||||
|
||||
GF_FREE(ob_fd);
|
||||
}
|
||||
@@ -297,6 +302,7 @@ ob_wake_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
|
||||
call_resume(stub);
|
||||
}
|
||||
|
||||
+ /* The background open is completed. We can release the 'fd' reference. */
|
||||
fd_unref(fd);
|
||||
|
||||
STACK_DESTROY(frame->root);
|
||||
@@ -331,7 +337,9 @@ ob_fd_wake(xlator_t *this, fd_t *fd, ob_fd_t *ob_fd)
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
- frame->local = fd_ref(fd);
|
||||
+ /* We don't need to take a reference here. We already have a reference
|
||||
+ * while the open is pending. */
|
||||
+ frame->local = fd;
|
||||
|
||||
STACK_WIND(frame, ob_wake_cbk, FIRST_CHILD(this),
|
||||
FIRST_CHILD(this)->fops->open, &ob_fd->loc, ob_fd->flags, fd,
|
||||
@@ -345,15 +353,12 @@ void
|
||||
ob_inode_wake(xlator_t *this, struct list_head *ob_fds)
|
||||
{
|
||||
ob_fd_t *ob_fd = NULL, *tmp = NULL;
|
||||
- fd_t *fd = NULL;
|
||||
|
||||
if (!list_empty(ob_fds)) {
|
||||
list_for_each_entry_safe(ob_fd, tmp, ob_fds, ob_fds_on_inode)
|
||||
{
|
||||
ob_fd_wake(this, ob_fd->fd, ob_fd);
|
||||
- fd = ob_fd->fd;
|
||||
ob_fd_free(ob_fd);
|
||||
- fd_unref(fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,7 +370,7 @@ ob_fd_copy(ob_fd_t *src, ob_fd_t *dst)
|
||||
if (!src || !dst)
|
||||
goto out;
|
||||
|
||||
- dst->fd = __fd_ref(src->fd);
|
||||
+ dst->fd = src->fd;
|
||||
dst->loc.inode = inode_ref(src->loc.inode);
|
||||
gf_uuid_copy(dst->loc.gfid, src->loc.gfid);
|
||||
dst->flags = src->flags;
|
||||
@@ -509,7 +514,6 @@ ob_open_behind(call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
|
||||
|
||||
ob_fd->ob_inode = ob_inode;
|
||||
|
||||
- /* don't do fd_ref, it'll cause leaks */
|
||||
ob_fd->fd = fd;
|
||||
|
||||
ob_fd->open_frame = copy_frame(frame);
|
||||
@@ -539,15 +543,16 @@ ob_open_behind(call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
|
||||
}
|
||||
UNLOCK(&fd->inode->lock);
|
||||
|
||||
- if (!open_in_progress && !unlinked) {
|
||||
- fd_ref(fd);
|
||||
+ /* We take a reference while the background open is pending or being
|
||||
+ * processed. If we finally wind the request in the foreground, then
|
||||
+ * ob_fd_free() will take care of this additional reference. */
|
||||
+ fd_ref(fd);
|
||||
|
||||
+ if (!open_in_progress && !unlinked) {
|
||||
STACK_UNWIND_STRICT(open, frame, 0, 0, fd, xdata);
|
||||
|
||||
if (!conf->lazy_open)
|
||||
ob_fd_wake(this, fd, NULL);
|
||||
-
|
||||
- fd_unref(fd);
|
||||
} else {
|
||||
ob_fd_free(ob_fd);
|
||||
STACK_WIND(frame, default_open_cbk, FIRST_CHILD(this),
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,75 @@
|
||||
From ac5b1b38e705bd0e4c00cc50580a71dfaa4d3b5f Mon Sep 17 00:00:00 2001
|
||||
From: Krutika Dhananjay <kdhananj@redhat.com>
|
||||
Date: Wed, 7 Aug 2019 12:12:43 +0530
|
||||
Subject: [PATCH 375/375] features/shard: Send correct size when reads are sent
|
||||
beyond file size
|
||||
|
||||
Backport of:
|
||||
> https://review.gluster.org/c/glusterfs/+/23175
|
||||
> Change-Id: I0cebaaf55c09eb1fb77a274268ff564e871b743b
|
||||
> fixes bz#1738419
|
||||
> Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
||||
|
||||
Change-Id: I0cebaaf55c09eb1fb77a274268ff564e871b743b
|
||||
BUG: 1802013
|
||||
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/199570
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
tests/bugs/shard/bug-1738419.t | 29 +++++++++++++++++++++++++++++
|
||||
xlators/features/shard/src/shard.c | 2 ++
|
||||
2 files changed, 31 insertions(+)
|
||||
create mode 100644 tests/bugs/shard/bug-1738419.t
|
||||
|
||||
diff --git a/tests/bugs/shard/bug-1738419.t b/tests/bugs/shard/bug-1738419.t
|
||||
new file mode 100644
|
||||
index 0000000..8d0a31d
|
||||
--- /dev/null
|
||||
+++ b/tests/bugs/shard/bug-1738419.t
|
||||
@@ -0,0 +1,29 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+. $(dirname $0)/../../include.rc
|
||||
+. $(dirname $0)/../../volume.rc
|
||||
+
|
||||
+cleanup
|
||||
+
|
||||
+TEST glusterd
|
||||
+TEST pidof glusterd
|
||||
+TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2}
|
||||
+TEST $CLI volume set $V0 features.shard on
|
||||
+TEST $CLI volume set $V0 network.remote-dio off
|
||||
+TEST $CLI volume set $V0 performance.io-cache off
|
||||
+TEST $CLI volume set $V0 performance.quick-read off
|
||||
+TEST $CLI volume set $V0 performance.read-ahead off
|
||||
+TEST $CLI volume set $V0 performance.strict-o-direct on
|
||||
+TEST $CLI volume start $V0
|
||||
+
|
||||
+TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0
|
||||
+
|
||||
+TEST dd if=/dev/zero of=$M0/metadata bs=501 count=1
|
||||
+
|
||||
+EXPECT "501" echo $("dd" if=$M0/metadata bs=4096 count=1 of=/dev/null iflag=direct 2>&1 | awk '/bytes/ {print $1}')
|
||||
+
|
||||
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
|
||||
+TEST $CLI volume stop $V0
|
||||
+TEST $CLI volume delete $V0
|
||||
+
|
||||
+cleanup
|
||||
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
|
||||
index b224abd..9ed597b 100644
|
||||
--- a/xlators/features/shard/src/shard.c
|
||||
+++ b/xlators/features/shard/src/shard.c
|
||||
@@ -4433,6 +4433,8 @@ out:
|
||||
if (xdata)
|
||||
local->xattr_rsp = dict_ref(xdata);
|
||||
vec.iov_base = local->iobuf->ptr;
|
||||
+ if (local->offset + local->req_size > local->prebuf.ia_size)
|
||||
+ local->total_size = local->prebuf.ia_size - local->offset;
|
||||
vec.iov_len = local->total_size;
|
||||
local->op_ret = local->total_size;
|
||||
SHARD_STACK_UNWIND(readv, frame, local->op_ret, local->op_errno, &vec, 1,
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -237,7 +237,7 @@ Release: 0.1%{?prereltag:.%{prereltag}}%{?dist}
|
||||
%else
|
||||
Name: glusterfs
|
||||
Version: 6.0
|
||||
Release: 33%{?dist}
|
||||
Release: 34%{?dist}
|
||||
ExcludeArch: i686
|
||||
%endif
|
||||
License: GPLv2 or LGPLv3+
|
||||
@ -682,6 +682,14 @@ Patch0364: 0364-dht-fixing-rebalance-failures-for-files-with-holes.patch
|
||||
Patch0365: 0365-build-geo-rep-requires-relevant-selinux-permission-f.patch
|
||||
Patch0366: 0366-snapshot-fix-python3-issue-in-gcron.patch
|
||||
Patch0367: 0367-dht-Handle-setxattr-and-rm-race-for-directory-in-reb.patch
|
||||
Patch0368: 0368-Update-rfc.sh-to-rhgs-3.5.2.patch
|
||||
Patch0369: 0369-cluster-ec-Return-correct-error-code-and-log-message.patch
|
||||
Patch0370: 0370-dht-Do-opendir-selectively-in-gf_defrag_process_dir.patch
|
||||
Patch0371: 0371-common-ha-cluster-status-shows-FAILOVER-when-actuall.patch
|
||||
Patch0372: 0372-posix-fix-seek-functionality.patch
|
||||
Patch0373: 0373-build-geo-rep-sub-pkg-requires-policycoreutils-pytho.patch
|
||||
Patch0374: 0374-open-behind-fix-missing-fd-reference.patch
|
||||
Patch0375: 0375-features-shard-Send-correct-size-when-reads-are-sent.patch
|
||||
|
||||
%description
|
||||
GlusterFS is a distributed file-system capable of scaling to several
|
||||
@ -892,6 +900,8 @@ Requires: util-linux
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
# required for setting selinux bools
|
||||
%if ( 0%{?rhel} && 0%{?rhel} >= 8 )
|
||||
Requires(post): policycoreutils-python-utils
|
||||
Requires(postun): policycoreutils-python-utils
|
||||
Requires: selinux-policy-targeted
|
||||
Requires(post): selinux-policy-targeted
|
||||
BuildRequires: selinux-policy-devel
|
||||
@ -2420,14 +2430,8 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Apr 29 2020 Rinku Kothiya <rkothiya@redhat.com> - 6.0-33
|
||||
- fixes bugs bz#1812789 bz#1813917 bz#1823703 bz#1823706 bz#1825195
|
||||
|
||||
* Sat Apr 04 2020 Rinku Kothiya <rkothiya@redhat.com> - 6.0-32
|
||||
- fixes bugs bz#1781543 bz#1812789 bz#1812824 bz#1817369 bz#1819059
|
||||
|
||||
* Tue Mar 17 2020 Rinku Kothiya <rkothiya@redhat.com> - 6.0-31
|
||||
- fixes bugs bz#1802727
|
||||
* Fri May 15 2020 Rinku Kothiya <rkothiya@redhat.com> - 6.0-34
|
||||
- fixes bugs bz#1802013 bz#1823706 bz#1825177 bz#1830713 bz#1831403 bz#1833017
|
||||
|
||||
* Thu Feb 20 2020 Rinku Kothiya <rkothiya@redhat.com> - 6.0-30.1
|
||||
- fixes bugs bz#1800703
|
||||
|
Loading…
Reference in New Issue
Block a user