autobuild v6.0-20
Resolves: bz#1719171 bz#1763412 bz#1764202 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
This commit is contained in:
parent
cd32b8a252
commit
5552302317
284
0310-tests-test-case-for-non-root-geo-rep-setup.patch
Normal file
284
0310-tests-test-case-for-non-root-geo-rep-setup.patch
Normal file
@ -0,0 +1,284 @@
|
|||||||
|
From c2decfb59bd1be7cd2b0d792fd2ca2627913638a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sunny Kumar <sunkumar@redhat.com>
|
||||||
|
Date: Tue, 24 Sep 2019 18:22:13 +0530
|
||||||
|
Subject: [PATCH 310/313] tests : test case for non-root geo-rep setup
|
||||||
|
|
||||||
|
Added test case for non-root geo-rep setup.
|
||||||
|
|
||||||
|
Backport of:
|
||||||
|
> Patch: https://review.gluster.org/22902
|
||||||
|
> Change-Id: Ib6ebee79949a9f61bdc5c7b5e11b51b262750e98
|
||||||
|
> fixes: bz#1717827
|
||||||
|
> Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
||||||
|
|
||||||
|
Change-Id: Ib6ebee79949a9f61bdc5c7b5e11b51b262750e98
|
||||||
|
BUG: 1763412
|
||||||
|
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
||||||
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/183664
|
||||||
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||||
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||||
|
---
|
||||||
|
tests/00-geo-rep/00-georep-verify-non-root-setup.t | 251 +++++++++++++++++++++
|
||||||
|
1 file changed, 251 insertions(+)
|
||||||
|
create mode 100644 tests/00-geo-rep/00-georep-verify-non-root-setup.t
|
||||||
|
|
||||||
|
diff --git a/tests/00-geo-rep/00-georep-verify-non-root-setup.t b/tests/00-geo-rep/00-georep-verify-non-root-setup.t
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..e753c1f
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/00-geo-rep/00-georep-verify-non-root-setup.t
|
||||||
|
@@ -0,0 +1,251 @@
|
||||||
|
+#!/bin/bash
|
||||||
|
+
|
||||||
|
+. $(dirname $0)/../include.rc
|
||||||
|
+. $(dirname $0)/../volume.rc
|
||||||
|
+. $(dirname $0)/../geo-rep.rc
|
||||||
|
+. $(dirname $0)/../env.rc
|
||||||
|
+
|
||||||
|
+SCRIPT_TIMEOUT=500
|
||||||
|
+
|
||||||
|
+### Basic Non-root geo-rep setup test with Distribute Replicate volumes
|
||||||
|
+
|
||||||
|
+##Cleanup and start glusterd
|
||||||
|
+cleanup;
|
||||||
|
+TEST glusterd;
|
||||||
|
+TEST pidof glusterd
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+##Variables
|
||||||
|
+GEOREP_CLI="$CLI volume geo-replication"
|
||||||
|
+master=$GMV0
|
||||||
|
+SH0="127.0.0.1"
|
||||||
|
+slave=${SH0}::${GSV0}
|
||||||
|
+num_active=2
|
||||||
|
+num_passive=2
|
||||||
|
+master_mnt=$M0
|
||||||
|
+slave_mnt=$M1
|
||||||
|
+
|
||||||
|
+##User and group to be used for non-root geo-rep setup
|
||||||
|
+usr="nroot"
|
||||||
|
+grp="ggroup"
|
||||||
|
+
|
||||||
|
+slave_url=$usr@$slave
|
||||||
|
+slave_vol=$GSV0
|
||||||
|
+ssh_url=$usr@$SH0
|
||||||
|
+
|
||||||
|
+############################################################
|
||||||
|
+#SETUP VOLUMES AND VARIABLES
|
||||||
|
+
|
||||||
|
+##create_and_start_master_volume
|
||||||
|
+TEST $CLI volume create $GMV0 replica 2 $H0:$B0/${GMV0}{1,2,3,4};
|
||||||
|
+TEST $CLI volume start $GMV0
|
||||||
|
+
|
||||||
|
+##create_and_start_slave_volume
|
||||||
|
+TEST $CLI volume create $GSV0 replica 2 $H0:$B0/${GSV0}{1,2,3,4};
|
||||||
|
+TEST $CLI volume start $GSV0
|
||||||
|
+
|
||||||
|
+##Mount master
|
||||||
|
+#TEST glusterfs -s $H0 --volfile-id $GMV0 $M0
|
||||||
|
+
|
||||||
|
+##Mount slave
|
||||||
|
+#TEST glusterfs -s $H0 --volfile-id $GSV0 $M1
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+##########################################################
|
||||||
|
+#TEST FUNCTIONS
|
||||||
|
+
|
||||||
|
+function distribute_key_non_root()
|
||||||
|
+{
|
||||||
|
+ ${GLUSTER_LIBEXECDIR}/set_geo_rep_pem_keys.sh $usr $master $slave_vol
|
||||||
|
+ echo $?
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+function check_status_non_root()
|
||||||
|
+{
|
||||||
|
+ local search_key=$1
|
||||||
|
+ $GEOREP_CLI $master $slave_url status | grep -F "$search_key" | wc -l
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+function check_and_clean_group()
|
||||||
|
+{
|
||||||
|
+ if [ $(getent group $grp) ]
|
||||||
|
+ then
|
||||||
|
+ groupdel $grp;
|
||||||
|
+ echo $?
|
||||||
|
+ else
|
||||||
|
+ echo 0
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+function clean_lock_files()
|
||||||
|
+{
|
||||||
|
+ if [ ! -f /etc/passwd.lock ];
|
||||||
|
+ then
|
||||||
|
+ rm -rf /etc/passwd.lock;
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if [ ! -f /etc/group.lock ];
|
||||||
|
+ then
|
||||||
|
+ rm -rf /etc/group.lock;
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if [ ! -f /etc/shadow.lock ];
|
||||||
|
+ then
|
||||||
|
+ rm -rf /etc/shadow.lock;
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if [ ! -f /etc/gshadow.lock ];
|
||||||
|
+ then
|
||||||
|
+ rm -rf /etc/gshadow.lock;
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+###########################################################
|
||||||
|
+#SETUP NON-ROOT GEO REPLICATION
|
||||||
|
+
|
||||||
|
+##Create ggroup group
|
||||||
|
+##First test if group exists and then create new one
|
||||||
|
+
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_and_clean_group
|
||||||
|
+
|
||||||
|
+##cleanup *.lock files
|
||||||
|
+
|
||||||
|
+clean_lock_files
|
||||||
|
+
|
||||||
|
+TEST /usr/sbin/groupadd $grp
|
||||||
|
+
|
||||||
|
+clean_lock_files
|
||||||
|
+##Create non-root user and assign it to newly created group
|
||||||
|
+
|
||||||
|
+TEST /usr/sbin/useradd -G $grp $usr
|
||||||
|
+
|
||||||
|
+##Modify password for non-root user to have control over distributing ssh-key
|
||||||
|
+echo "$usr:pass" | chpasswd
|
||||||
|
+
|
||||||
|
+##Set up mountbroker root
|
||||||
|
+TEST gluster-mountbroker setup /var/mountbroker-root $grp
|
||||||
|
+
|
||||||
|
+##Associate volume and non-root user to the mountbroker
|
||||||
|
+TEST gluster-mountbroker add $slave_vol $usr
|
||||||
|
+
|
||||||
|
+##Check ssh setting for clear text passwords
|
||||||
|
+sed '/^PasswordAuthentication /{s/no/yes/}' -i /etc/ssh/sshd_config && grep '^PasswordAuthentication ' /etc/ssh/sshd_config && service sshd restart
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+##Restart glusterd to reflect mountbroker changages
|
||||||
|
+TEST killall_gluster;
|
||||||
|
+TEST glusterd;
|
||||||
|
+TEST pidof glusterd;
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+##Create, start and mount meta_volume
|
||||||
|
+TEST $CLI volume create $META_VOL replica 3 $H0:$B0/${META_VOL}{1,2,3};
|
||||||
|
+TEST $CLI volume start $META_VOL
|
||||||
|
+TEST mkdir -p $META_MNT
|
||||||
|
+TEST glusterfs -s $H0 --volfile-id $META_VOL $META_MNT
|
||||||
|
+
|
||||||
|
+##Mount master
|
||||||
|
+TEST glusterfs -s $H0 --volfile-id $GMV0 $M0
|
||||||
|
+
|
||||||
|
+##Mount slave
|
||||||
|
+TEST glusterfs -s $H0 --volfile-id $GSV0 $M1
|
||||||
|
+
|
||||||
|
+## Check status of mount-broker
|
||||||
|
+TEST gluster-mountbroker status
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+##Setup password-less ssh for non-root user
|
||||||
|
+#sshpass -p "pass" ssh-copy-id -i ~/.ssh/id_rsa.pub $ssh_url
|
||||||
|
+##Run ssh agent
|
||||||
|
+eval "$(ssh-agent -s)"
|
||||||
|
+PASS="pass"
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+##Create a temp script to echo the SSH password, used by SSH_ASKPASS
|
||||||
|
+
|
||||||
|
+SSH_ASKPASS_SCRIPT=/tmp/ssh-askpass-script
|
||||||
|
+cat > ${SSH_ASKPASS_SCRIPT} <<EOL
|
||||||
|
+#!/bin/bash
|
||||||
|
+echo "${PASS}"
|
||||||
|
+EOL
|
||||||
|
+chmod u+x ${SSH_ASKPASS_SCRIPT}
|
||||||
|
+
|
||||||
|
+##set no display, necessary for ssh to use with setsid and SSH_ASKPASS
|
||||||
|
+#export DISPLAY=:0
|
||||||
|
+
|
||||||
|
+export SSH_ASKPASS=${SSH_ASKPASS_SCRIPT}
|
||||||
|
+
|
||||||
|
+DISPLAY=: setsid ssh-copy-id -i ~/.ssh/id_rsa.pub $ssh_url
|
||||||
|
+
|
||||||
|
+##Setting up PATH for gluster binaries in case of source installation
|
||||||
|
+##ssh -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $ssh_url "echo "export PATH=$PATH:/usr/local/sbin" >> ~/.bashrc"
|
||||||
|
+
|
||||||
|
+##Creating secret pem pub file
|
||||||
|
+TEST gluster-georep-sshkey generate
|
||||||
|
+
|
||||||
|
+##Create geo-rep non-root setup
|
||||||
|
+
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url create push-pem
|
||||||
|
+
|
||||||
|
+#Config gluster-command-dir
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url config gluster-command-dir ${GLUSTER_CMD_DIR}
|
||||||
|
+
|
||||||
|
+#Config gluster-command-dir
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url config slave-gluster-command-dir ${GLUSTER_CMD_DIR}
|
||||||
|
+
|
||||||
|
+## Test for key distribution
|
||||||
|
+
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 distribute_key_non_root
|
||||||
|
+
|
||||||
|
+##Wait for common secret pem file to be created
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_common_secret_file
|
||||||
|
+
|
||||||
|
+#Enable_metavolume
|
||||||
|
+TEST $GEOREP_CLI $master $slave config use_meta_volume true
|
||||||
|
+
|
||||||
|
+#Start_georep
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url start
|
||||||
|
+
|
||||||
|
+## Meta volume is enabled so looking for 2 Active and 2 Passive sessions
|
||||||
|
+
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 2 check_status_non_root "Active"
|
||||||
|
+
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 2 check_status_non_root "Passive"
|
||||||
|
+
|
||||||
|
+#Pause geo-replication session
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url pause
|
||||||
|
+
|
||||||
|
+#Resume geo-replication session
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url resume
|
||||||
|
+
|
||||||
|
+#Validate failure of volume stop when geo-rep is running
|
||||||
|
+TEST ! $CLI volume stop $GMV0
|
||||||
|
+
|
||||||
|
+#Stop Geo-rep
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url stop
|
||||||
|
+
|
||||||
|
+#Delete Geo-rep
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url delete
|
||||||
|
+
|
||||||
|
+#Cleanup authorized_keys
|
||||||
|
+sed -i '/^command=.*SSH_ORIGINAL_COMMAND#.*/d' ~/.ssh/authorized_keys
|
||||||
|
+sed -i '/^command=.*gsyncd.*/d' ~/.ssh/authorized_keys
|
||||||
|
+
|
||||||
|
+#clear mountbroker
|
||||||
|
+gluster-mountbroker remove --user $usr
|
||||||
|
+gluster-mountbroker remove --volume $slave_vol
|
||||||
|
+
|
||||||
|
+#delete group and user created for non-root setup
|
||||||
|
+TEST userdel -r -f $usr
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_and_clean_group
|
||||||
|
+
|
||||||
|
+##password script cleanup
|
||||||
|
+rm -rf /tmp/ssh-askpass-script
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+cleanup;
|
||||||
|
+
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
186
0311-geo-rep-Fix-Permission-denied-traceback-on-non-root-.patch
Normal file
186
0311-geo-rep-Fix-Permission-denied-traceback-on-non-root-.patch
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
From 4a2441e76f4240568093080769ede07bb7fb2016 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kotresh HR <khiremat@redhat.com>
|
||||||
|
Date: Sun, 20 Oct 2019 01:01:39 +0530
|
||||||
|
Subject: [PATCH 311/313] geo-rep: Fix Permission denied traceback on non root
|
||||||
|
setup
|
||||||
|
|
||||||
|
Problem:
|
||||||
|
While syncing rename of directory in hybrid crawl, geo-rep
|
||||||
|
crashes as below.
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/usr/local/libexec/glusterfs/python/syncdaemon/repce.py", line 118, in worker
|
||||||
|
res = getattr(self.obj, rmeth)(*in_data[2:])
|
||||||
|
File "/usr/local/libexec/glusterfs/python/syncdaemon/resource.py", line 588, in entry_ops
|
||||||
|
src_entry = get_slv_dir_path(slv_host, slv_volume, gfid)
|
||||||
|
File "/usr/local/libexec/glusterfs/python/syncdaemon/syncdutils.py", line 687, in get_slv_dir_path
|
||||||
|
[ENOENT], [ESTALE])
|
||||||
|
File "/usr/local/libexec/glusterfs/python/syncdaemon/syncdutils.py", line 546, in errno_wrap
|
||||||
|
return call(*arg)
|
||||||
|
PermissionError: [Errno 13] Permission denied: '/bricks/brick1/b1/.glusterfs/8e/c0/8ec0fcd4-d50f-4a6e-b473-a7943ab66640'
|
||||||
|
|
||||||
|
Cause:
|
||||||
|
Conversion of gfid to path for a directory uses readlink on backend
|
||||||
|
.glusterfs gfid path. But this fails for non root user with
|
||||||
|
permission denied.
|
||||||
|
|
||||||
|
Fix:
|
||||||
|
Use gfid2path interface to get the path from gfid
|
||||||
|
|
||||||
|
Backport of:
|
||||||
|
> Patch: https://review.gluster.org/23570
|
||||||
|
> Change-Id: I9d40c713a1b32cea95144cbc0f384ada82972222
|
||||||
|
> fixes: bz#1763439
|
||||||
|
> Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
||||||
|
|
||||||
|
Change-Id: I9d40c713a1b32cea95144cbc0f384ada82972222
|
||||||
|
BUG: 1763412
|
||||||
|
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
||||||
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/183665
|
||||||
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||||
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||||
|
---
|
||||||
|
geo-replication/syncdaemon/gsyncd.py | 3 +-
|
||||||
|
geo-replication/syncdaemon/syncdutils.py | 35 ++++++++++++++++------
|
||||||
|
tests/00-geo-rep/00-georep-verify-non-root-setup.t | 30 +++++++++++++++----
|
||||||
|
3 files changed, 52 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/geo-replication/syncdaemon/gsyncd.py b/geo-replication/syncdaemon/gsyncd.py
|
||||||
|
index 7b48d82..8940384 100644
|
||||||
|
--- a/geo-replication/syncdaemon/gsyncd.py
|
||||||
|
+++ b/geo-replication/syncdaemon/gsyncd.py
|
||||||
|
@@ -231,7 +231,8 @@ def main():
|
||||||
|
# Set default path for config file in that case
|
||||||
|
# If an subcmd accepts config file then it also accepts
|
||||||
|
# master and Slave arguments.
|
||||||
|
- if config_file is None and hasattr(args, "config_file"):
|
||||||
|
+ if config_file is None and hasattr(args, "config_file") \
|
||||||
|
+ and args.subcmd != "slave":
|
||||||
|
config_file = "%s/geo-replication/%s_%s_%s/gsyncd.conf" % (
|
||||||
|
GLUSTERD_WORKDIR,
|
||||||
|
args.master,
|
||||||
|
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
|
||||||
|
index aadaebd..b08098e 100644
|
||||||
|
--- a/geo-replication/syncdaemon/syncdutils.py
|
||||||
|
+++ b/geo-replication/syncdaemon/syncdutils.py
|
||||||
|
@@ -57,6 +57,7 @@ from hashlib import sha256 as sha256
|
||||||
|
|
||||||
|
# auxiliary gfid based access prefix
|
||||||
|
_CL_AUX_GFID_PFX = ".gfid/"
|
||||||
|
+ROOT_GFID = "00000000-0000-0000-0000-000000000001"
|
||||||
|
GF_OP_RETRIES = 10
|
||||||
|
|
||||||
|
GX_GFID_CANONICAL_LEN = 37 # canonical gfid len + '\0'
|
||||||
|
@@ -670,6 +671,7 @@ def get_slv_dir_path(slv_host, slv_volume, gfid):
|
||||||
|
global slv_bricks
|
||||||
|
|
||||||
|
dir_path = ENOENT
|
||||||
|
+ pfx = gauxpfx()
|
||||||
|
|
||||||
|
if not slv_bricks:
|
||||||
|
slv_info = Volinfo(slv_volume, slv_host, master=False)
|
||||||
|
@@ -683,15 +685,30 @@ def get_slv_dir_path(slv_host, slv_volume, gfid):
|
||||||
|
gfid[2:4],
|
||||||
|
gfid], [ENOENT], [ESTALE])
|
||||||
|
if dir_path != ENOENT:
|
||||||
|
- realpath = errno_wrap(os.readlink, [dir_path],
|
||||||
|
- [ENOENT], [ESTALE])
|
||||||
|
- if not isinstance(realpath, int):
|
||||||
|
- realpath_parts = realpath.split('/')
|
||||||
|
- pargfid = realpath_parts[-2]
|
||||||
|
- basename = realpath_parts[-1]
|
||||||
|
- pfx = gauxpfx()
|
||||||
|
- dir_entry = os.path.join(pfx, pargfid, basename)
|
||||||
|
- return dir_entry
|
||||||
|
+ try:
|
||||||
|
+ realpath = errno_wrap(os.readlink, [dir_path],
|
||||||
|
+ [ENOENT], [ESTALE])
|
||||||
|
+ if not isinstance(realpath, int):
|
||||||
|
+ realpath_parts = realpath.split('/')
|
||||||
|
+ pargfid = realpath_parts[-2]
|
||||||
|
+ basename = realpath_parts[-1]
|
||||||
|
+ dir_entry = os.path.join(pfx, pargfid, basename)
|
||||||
|
+ return dir_entry
|
||||||
|
+ except OSError:
|
||||||
|
+ # .gfid/GFID
|
||||||
|
+ gfidpath = unescape_space_newline(os.path.join(pfx, gfid))
|
||||||
|
+ realpath = errno_wrap(Xattr.lgetxattr_buf,
|
||||||
|
+ [gfidpath, 'glusterfs.gfid2path'], [ENOENT], [ESTALE])
|
||||||
|
+ if not isinstance(realpath, int):
|
||||||
|
+ basename = os.path.basename(realpath).rstrip('\x00')
|
||||||
|
+ dirpath = os.path.dirname(realpath)
|
||||||
|
+ if dirpath is "/":
|
||||||
|
+ pargfid = ROOT_GFID
|
||||||
|
+ else:
|
||||||
|
+ dirpath = dirpath.strip("/")
|
||||||
|
+ pargfid = get_gfid_from_mnt(dirpath)
|
||||||
|
+ dir_entry = os.path.join(pfx, pargfid, basename)
|
||||||
|
+ return dir_entry
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
diff --git a/tests/00-geo-rep/00-georep-verify-non-root-setup.t b/tests/00-geo-rep/00-georep-verify-non-root-setup.t
|
||||||
|
index e753c1f..c9fd8b2 100644
|
||||||
|
--- a/tests/00-geo-rep/00-georep-verify-non-root-setup.t
|
||||||
|
+++ b/tests/00-geo-rep/00-georep-verify-non-root-setup.t
|
||||||
|
@@ -118,8 +118,8 @@ clean_lock_files
|
||||||
|
TEST /usr/sbin/groupadd $grp
|
||||||
|
|
||||||
|
clean_lock_files
|
||||||
|
-##Create non-root user and assign it to newly created group
|
||||||
|
-
|
||||||
|
+##Del if exists and create non-root user and assign it to newly created group
|
||||||
|
+userdel -r -f $usr
|
||||||
|
TEST /usr/sbin/useradd -G $grp $usr
|
||||||
|
|
||||||
|
##Modify password for non-root user to have control over distributing ssh-key
|
||||||
|
@@ -140,8 +140,6 @@ TEST killall_gluster;
|
||||||
|
TEST glusterd;
|
||||||
|
TEST pidof glusterd;
|
||||||
|
|
||||||
|
-
|
||||||
|
-
|
||||||
|
##Create, start and mount meta_volume
|
||||||
|
TEST $CLI volume create $META_VOL replica 3 $H0:$B0/${META_VOL}{1,2,3};
|
||||||
|
TEST $CLI volume start $META_VOL
|
||||||
|
@@ -225,6 +223,26 @@ TEST $GEOREP_CLI $master $slave_url resume
|
||||||
|
#Validate failure of volume stop when geo-rep is running
|
||||||
|
TEST ! $CLI volume stop $GMV0
|
||||||
|
|
||||||
|
+#Hybrid directory rename test BZ#1763439
|
||||||
|
+TEST $GEOREP_CLI $master $slave_url config change_detector xsync
|
||||||
|
+mkdir ${master_mnt}/dir1
|
||||||
|
+mkdir ${master_mnt}/dir1/dir2
|
||||||
|
+mkdir ${master_mnt}/dir1/dir3
|
||||||
|
+mkdir ${master_mnt}/hybrid_d1
|
||||||
|
+
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/hybrid_d1
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1/dir2
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1/dir3
|
||||||
|
+
|
||||||
|
+mv ${master_mnt}/hybrid_d1 ${master_mnt}/hybrid_rn_d1
|
||||||
|
+mv ${master_mnt}/dir1/dir2 ${master_mnt}/rn_dir2
|
||||||
|
+mv ${master_mnt}/dir1/dir3 ${master_mnt}/dir1/rn_dir3
|
||||||
|
+
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/hybrid_rn_d1
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/rn_dir2
|
||||||
|
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1/rn_dir3
|
||||||
|
+
|
||||||
|
#Stop Geo-rep
|
||||||
|
TEST $GEOREP_CLI $master $slave_url stop
|
||||||
|
|
||||||
|
@@ -232,8 +250,8 @@ TEST $GEOREP_CLI $master $slave_url stop
|
||||||
|
TEST $GEOREP_CLI $master $slave_url delete
|
||||||
|
|
||||||
|
#Cleanup authorized_keys
|
||||||
|
-sed -i '/^command=.*SSH_ORIGINAL_COMMAND#.*/d' ~/.ssh/authorized_keys
|
||||||
|
-sed -i '/^command=.*gsyncd.*/d' ~/.ssh/authorized_keys
|
||||||
|
+sed -i '/^command=.*SSH_ORIGINAL_COMMAND#.*/d' /home/$usr/.ssh/authorized_keys
|
||||||
|
+sed -i '/^command=.*gsyncd.*/d' /home/$usr/.ssh/authorized_keys
|
||||||
|
|
||||||
|
#clear mountbroker
|
||||||
|
gluster-mountbroker remove --user $usr
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
59
0312-Scripts-quota_fsck-script-KeyError-contri_size.patch
Normal file
59
0312-Scripts-quota_fsck-script-KeyError-contri_size.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From b1d8a5ee8b2e320aaaf9b2a145fbc285178d07bb Mon Sep 17 00:00:00 2001
|
||||||
|
From: hari gowtham <hgowtham@redhat.com>
|
||||||
|
Date: Tue, 22 Oct 2019 15:11:03 +0530
|
||||||
|
Subject: [PATCH 312/313] Scripts: quota_fsck script KeyError: 'contri_size'
|
||||||
|
|
||||||
|
back-port of: https://review.gluster.org/#/c/glusterfs/+/23586/
|
||||||
|
|
||||||
|
Problem: In a certain code flow, we weren't handling the
|
||||||
|
unavailability of the contri value in the dict. Trying to print
|
||||||
|
without the value resulted in erroring out.
|
||||||
|
|
||||||
|
Fix: Have printed the whole of dictionary as the values will be
|
||||||
|
helpful in understanding the state of the file/dir
|
||||||
|
|
||||||
|
>Fixes: bz#1764129
|
||||||
|
>Change-Id: I99c538adb712f281ca10e4e0088f404f515b9725
|
||||||
|
>Signed-off-by: hari gowtham <hgowtham@redhat.com>
|
||||||
|
|
||||||
|
BUG: 1719171
|
||||||
|
Change-Id: I99c538adb712f281ca10e4e0088f404f515b9725
|
||||||
|
Signed-off-by: hari gowtham <hgowtham@redhat.com>
|
||||||
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/183720
|
||||||
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||||
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||||
|
---
|
||||||
|
extras/quota/quota_fsck.py | 12 ++++++------
|
||||||
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extras/quota/quota_fsck.py b/extras/quota/quota_fsck.py
|
||||||
|
index f03895d..485a37a 100755
|
||||||
|
--- a/extras/quota/quota_fsck.py
|
||||||
|
+++ b/extras/quota/quota_fsck.py
|
||||||
|
@@ -52,17 +52,17 @@ epilog_msg='''
|
||||||
|
|
||||||
|
def print_msg(log_type, path, xattr_dict = {}, stbuf = "", dir_size = None):
|
||||||
|
if log_type == QUOTA_VERBOSE:
|
||||||
|
- print('%-24s %-60s\nxattr_values: %s\n%s\n' % {"Verbose", path, xattr_dict, stbuf})
|
||||||
|
+ print('%-24s %-60s\nxattr_values: %s\n%s\n' % ("Verbose", path, xattr_dict, stbuf))
|
||||||
|
elif log_type == QUOTA_META_ABSENT:
|
||||||
|
- print('%-24s %-60s\n%s\n' % {"Quota-Meta Absent", path, xattr_dict})
|
||||||
|
+ print('%-24s %-60s\n%s\n' % ("Quota-Meta Absent", path, xattr_dict))
|
||||||
|
elif log_type == QUOTA_SIZE_MISMATCH:
|
||||||
|
print("mismatch")
|
||||||
|
if dir_size is not None:
|
||||||
|
- print('%24s %60s %12s %12s' % {"Size Mismatch", path, xattr_dict['contri_size'],
|
||||||
|
- dir_size})
|
||||||
|
+ print('%24s %60s %12s %12s' % ("Size Mismatch", path,
|
||||||
|
+ xattr_dict, dir_size))
|
||||||
|
else:
|
||||||
|
- print('%-24s %-60s %-12i %-12i' % {"Size Mismatch", path, xattr_dict['contri_size'],
|
||||||
|
- stbuf.st_size})
|
||||||
|
+ print('%-24s %-60s %-12i %-12i' % ("Size Mismatch", path, xattr_dict,
|
||||||
|
+ stbuf.st_size))
|
||||||
|
|
||||||
|
def size_differs_lot(s1, s2):
|
||||||
|
'''
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
From 23091d24d34102c7938ae2890930b73c89c5a8e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mohit Agrawal <moagrawal@redhat.com>
|
||||||
|
Date: Tue, 22 Oct 2019 18:52:25 +0530
|
||||||
|
Subject: [PATCH 313/313] extras: Cgroup(CPU/Mem) restriction are not working
|
||||||
|
on gluster process
|
||||||
|
|
||||||
|
Problem: After Configure the Cgroup(CPU/MEM) limit to a gluster processes
|
||||||
|
resource(CPU/MEM) limits are not applicable to the gluster
|
||||||
|
processes.Cgroup limits are not applicable because all threads are
|
||||||
|
not moved into a newly created cgroup to apply restriction.
|
||||||
|
|
||||||
|
Solution: To move a gluster thread to newly created cgroup change the
|
||||||
|
condition in script
|
||||||
|
|
||||||
|
> Change-Id: I8ad81c69200e4ec43a74f6052481551cf835354c
|
||||||
|
> Fixes: bz#1764208
|
||||||
|
> (Cherry pick from commit 38de02012948013a88597545cf49380ce97f6fa7)
|
||||||
|
> (Reviewed on upstream link https://review.gluster.org/#/c/glusterfs/+/23599/)
|
||||||
|
> Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
||||||
|
|
||||||
|
Change-Id: I8ad81c69200e4ec43a74f6052481551cf835354c
|
||||||
|
BUG: 1764202
|
||||||
|
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
||||||
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/183730
|
||||||
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||||
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||||
|
---
|
||||||
|
extras/control-cpu-load.sh | 2 +-
|
||||||
|
extras/control-mem.sh | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extras/control-cpu-load.sh b/extras/control-cpu-load.sh
|
||||||
|
index b739c82..52dcf62 100755
|
||||||
|
--- a/extras/control-cpu-load.sh
|
||||||
|
+++ b/extras/control-cpu-load.sh
|
||||||
|
@@ -104,7 +104,7 @@ echo "Setting $quota_value to cpu.cfs_quota_us for gluster_cgroup."
|
||||||
|
echo ${quota_value} > ${LOC}/${cgroup_name}/cpu.cfs_quota_us
|
||||||
|
|
||||||
|
if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then
|
||||||
|
- for thid in `ps -T -p ${daemon_pid} | grep gluster | awk -F " " '{print $2}'`;
|
||||||
|
+ for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print $2}'`;
|
||||||
|
do
|
||||||
|
echo ${thid} > ${LOC}/${cgroup_name}/tasks ;
|
||||||
|
done
|
||||||
|
diff --git a/extras/control-mem.sh b/extras/control-mem.sh
|
||||||
|
index 38aa2a0..91b36f8 100755
|
||||||
|
--- a/extras/control-mem.sh
|
||||||
|
+++ b/extras/control-mem.sh
|
||||||
|
@@ -116,7 +116,7 @@ else
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then
|
||||||
|
- for thid in `ps -T -p ${daemon_pid} | grep gluster | awk -F " " '{print $2}'`;
|
||||||
|
+ for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print $2}'`;
|
||||||
|
do
|
||||||
|
echo ${thid} > ${LOC}/${cgroup_name}/tasks ;
|
||||||
|
done
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -231,7 +231,7 @@ Release: 0.1%{?prereltag:.%{prereltag}}%{?dist}
|
|||||||
%else
|
%else
|
||||||
Name: glusterfs
|
Name: glusterfs
|
||||||
Version: 6.0
|
Version: 6.0
|
||||||
Release: 19%{?dist}
|
Release: 20%{?dist}
|
||||||
ExcludeArch: i686
|
ExcludeArch: i686
|
||||||
%endif
|
%endif
|
||||||
License: GPLv2 or LGPLv3+
|
License: GPLv2 or LGPLv3+
|
||||||
@ -618,6 +618,10 @@ Patch0306: 0306-cli-fix-distCount-value.patch
|
|||||||
Patch0307: 0307-ssl-fix-RHEL8-regression-failure.patch
|
Patch0307: 0307-ssl-fix-RHEL8-regression-failure.patch
|
||||||
Patch0308: 0308-dht-Rebalance-causing-IO-Error-File-descriptor-in-ba.patch
|
Patch0308: 0308-dht-Rebalance-causing-IO-Error-File-descriptor-in-ba.patch
|
||||||
Patch0309: 0309-geo-rep-Fix-config-upgrade-on-non-participating-node.patch
|
Patch0309: 0309-geo-rep-Fix-config-upgrade-on-non-participating-node.patch
|
||||||
|
Patch0310: 0310-tests-test-case-for-non-root-geo-rep-setup.patch
|
||||||
|
Patch0311: 0311-geo-rep-Fix-Permission-denied-traceback-on-non-root-.patch
|
||||||
|
Patch0312: 0312-Scripts-quota_fsck-script-KeyError-contri_size.patch
|
||||||
|
Patch0313: 0313-extras-Cgroup-CPU-Mem-restriction-are-not-working-on.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
GlusterFS is a distributed file-system capable of scaling to several
|
GlusterFS is a distributed file-system capable of scaling to several
|
||||||
@ -2331,6 +2335,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 23 2019 Rinku Kothiya <rkothiya@redhat.com> - 6.0-20
|
||||||
|
- fixes bugs bz#1719171 bz#1763412 bz#1764202
|
||||||
|
|
||||||
* Thu Oct 17 2019 Rinku Kothiya <rkothiya@redhat.com> - 6.0-19
|
* Thu Oct 17 2019 Rinku Kothiya <rkothiya@redhat.com> - 6.0-19
|
||||||
- fixes bugs bz#1760939
|
- fixes bugs bz#1760939
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user