From 3f2a881b6714d23b26d1eb0deeefd79be06dabd4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 28 2020 08:09:14 +0000 Subject: import resource-agents-4.1.1-71.el8 --- diff --git a/SOURCES/bz1763249-manpages-fix-pcs-syntax.patch b/SOURCES/bz1763249-manpages-fix-pcs-syntax.patch new file mode 100644 index 0000000..eff376b --- /dev/null +++ b/SOURCES/bz1763249-manpages-fix-pcs-syntax.patch @@ -0,0 +1,53 @@ +From 0903a60930238238d5caa6c3b42b28d7bc4cccf4 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Mon, 26 Oct 2020 13:11:05 +0100 +Subject: [PATCH 1/2] man: use promotable keyword in manpage examples + +--- + doc/man/ra2refentry.xsl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/man/ra2refentry.xsl b/doc/man/ra2refentry.xsl +index d0535fd36..f3cdcdbb2 100644 +--- a/doc/man/ra2refentry.xsl ++++ b/doc/man/ra2refentry.xsl +@@ -556,7 +556,7 @@ + + +- --master ++ promotable + + + + +From bfcd5796ae12e6a43a245d0c785f183342943393 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Mon, 26 Oct 2020 16:56:00 +0100 +Subject: [PATCH 2/2] man: use OCF_CHECK_LEVEL for depth parameters in pcs + examples + +--- + doc/man/ra2refentry.xsl | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/doc/man/ra2refentry.xsl b/doc/man/ra2refentry.xsl +index f3cdcdbb2..f8e12321f 100644 +--- a/doc/man/ra2refentry.xsl ++++ b/doc/man/ra2refentry.xsl +@@ -612,7 +612,14 @@ + + + +- ++ ++ ++ ++ ++ ++ OCF_CHECK_LEVEL ++ ++ + =" + + " diff --git a/SOURCES/bz1815013-redis-parse-password-correctly-based-on-version.patch b/SOURCES/bz1815013-redis-parse-password-correctly-based-on-version.patch new file mode 100644 index 0000000..c61a306 --- /dev/null +++ b/SOURCES/bz1815013-redis-parse-password-correctly-based-on-version.patch @@ -0,0 +1,169 @@ +From 2270c5d6aaf8b3b6d663d413a8e7193a493cfdc5 Mon Sep 17 00:00:00 2001 +From: Konstantin Pokotilenko +Date: Tue, 24 Sep 2019 17:26:11 +0300 +Subject: [PATCH 1/2] Consider redis-cli features to choose optimal password + passing method and warning filtering workaround + +--- + heartbeat/redis.in | 60 +++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 57 insertions(+), 3 deletions(-) + +diff --git a/heartbeat/redis.in b/heartbeat/redis.in +index ec7186d8b..409961d0b 100644 +--- a/heartbeat/redis.in ++++ b/heartbeat/redis.in +@@ -237,6 +237,51 @@ CRM_ATTR_REPL_INFO="${HA_SBIN_DIR}/crm_attribute --type crm_config --name ${INST + MASTER_HOST="" + MASTER_ACTIVE_CACHED="" + MASTER_ACTIVE="" ++CLI_HAVE_AUTH_WARNING=0 ++CLI_HAVE_ARG_NO_AUTH_WARNING=0 ++CLI_HAVE_ENV_AUTH=0 ++ ++cmp_redis_version() ++{ ++ ++ if [ "$1" == "$2" ]; then ++ return 1 ++ elif [ $(echo -e "$1\n$2" | sort -V | head -1) == "$1" ]; then ++ return 0 ++ else ++ return 2 ++ fi ++} ++ ++redis_cli_features() ++{ ++ ++ CLI_VER=$(redis-cli --version | tr " " "\n" | tail -1) ++ # Starting with 4.0.10 there is a warning on stderr when using a pass ++ # Starting with 5.0.0 there is an argument to silence the warning: --no-auth-warning ++ # Starting with 5.0.3 there is an option to use REDISCLI_AUTH evironment variable for password, no warning in this case ++ ++ cmp_redis_version $CLI_VER 5.0.3 ++ res=$? ++ echo 5.0.3: $res ++ if [[ res -ge 1 ]]; then ++ CLI_HAVE_ENV_AUTH=1 ++ fi ++ ++ cmp_redis_version $CLI_VER 5.0.0 ++ res=$? ++ echo 5.0.0: $res ++ if [[ res -ge 1 ]]; then ++ CLI_HAVE_ARG_NO_AUTH_WARNING=1 ++ fi ++ ++ cmp_redis_version $CLI_VER 4.0.10 ++ res=$? ++ echo 4.0.10: $res ++ if [[ res -ge 1 ]]; then ++ CLI_HAVE_AUTH_WARNING=1 ++ fi ++} + + master_is_active() + { +@@ -315,9 +360,16 @@ set_score() + redis_client() { + ocf_log debug "redis_client: '$REDIS_CLIENT' -s '$REDIS_SOCKET' $*" + if [ -n "$clientpasswd" ]; then +- # Starting with 4.0.10 there is a warning on stderr when using a pass +- # Once we stop supporting versions < 5.0.0 we can add --no-auth-warning here +- ("$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd" "$@" 2>&1 >&3 3>&- | grep -v "Using a password" >&2 3>&-) 3>&1 | sed 's/\r//' ++ # Consider redis-cli features to choose optimal password passing method and warning filtering workaround ++ if [[ CLI_HAVE_ENV_AUTH -eq 1 ]]; then ++ REDISCLI_AUTH=$clientpasswd "$REDIS_CLIENT" -s "$REDIS_SOCKET" "$@" | sed 's/\r//' ++ elif [[ CLI_HAVE_ARG_NO_AUTH_WARNING -eq 1 ]]; then ++ "$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd" "$@" --no-auth-warning | sed 's/\r//' ++ elif [[ CLI_HAVE_AUTH_WARNING -eq 1 ]]; then ++ ("$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd" "$@" 2>&1 >&3 3>&- | grep -v "Using a password" >&2 3>&-) 3>&1 | sed 's/\r//' ++ else ++ "$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd" "$@" | sed 's/\r//' ++ fi + else + "$REDIS_CLIENT" -s "$REDIS_SOCKET" "$@" | sed 's/\r//' + fi +@@ -686,6 +738,8 @@ if [ -r "$REDIS_CONFIG" ]; then + clientpasswd="$(sed -n -e 's/^\s*requirepass\s*\(.*\)\s*$/\1/p' < $REDIS_CONFIG | tail -n 1)" + fi + ++redis_cli_features ++ + ocf_log debug "action=${1:-$__OCF_ACTION} notify_type=${OCF_RESKEY_CRM_meta_notify_type} notify_operation=${OCF_RESKEY_CRM_meta_notify_operation} master_host=${OCF_RESKEY_CRM_meta_notify_master_uname} slave_host=${OCF_RESKEY_CRM_meta_notify_slave_uname} promote_host=${OCF_RESKEY_CRM_meta_notify_promote_uname} demote_host=${OCF_RESKEY_CRM_meta_notify_demote_uname}; params: bin=${OCF_RESKEY_bin} client_bin=${OCF_RESKEY_client_bin} config=${OCF_RESKEY_config} user=${OCF_RESKEY_user} rundir=${OCF_RESKEY_rundir} port=${OCF_RESKEY_port}" + + case "${1:-$__OCF_ACTION}" in + +From 0b9f942a88bfc3ad04938aa5135fad8f8bece69c Mon Sep 17 00:00:00 2001 +From: Konstantin Pokotilenko +Date: Tue, 24 Sep 2019 18:35:59 +0300 +Subject: [PATCH 2/2] use ocf_version_cmp instead of own implementation use + same method of getting redis-cli version as already used before in file, this + also uses redis client from variable instead of hardcoded remove debug output + fix --no-auth-warning argument position + +--- + heartbeat/redis.in | 25 +++++-------------------- + 1 file changed, 5 insertions(+), 20 deletions(-) + +diff --git a/heartbeat/redis.in b/heartbeat/redis.in +index 409961d0b..d722fb12c 100644 +--- a/heartbeat/redis.in ++++ b/heartbeat/redis.in +@@ -241,43 +241,28 @@ CLI_HAVE_AUTH_WARNING=0 + CLI_HAVE_ARG_NO_AUTH_WARNING=0 + CLI_HAVE_ENV_AUTH=0 + +-cmp_redis_version() +-{ +- +- if [ "$1" == "$2" ]; then +- return 1 +- elif [ $(echo -e "$1\n$2" | sort -V | head -1) == "$1" ]; then +- return 0 +- else +- return 2 +- fi +-} +- + redis_cli_features() + { + +- CLI_VER=$(redis-cli --version | tr " " "\n" | tail -1) ++ CLI_VER=$("$REDIS_CLIENT" -v | awk '{print $NF}') + # Starting with 4.0.10 there is a warning on stderr when using a pass + # Starting with 5.0.0 there is an argument to silence the warning: --no-auth-warning + # Starting with 5.0.3 there is an option to use REDISCLI_AUTH evironment variable for password, no warning in this case + +- cmp_redis_version $CLI_VER 5.0.3 ++ ocf_version_cmp $CLI_VER 5.0.3 + res=$? +- echo 5.0.3: $res + if [[ res -ge 1 ]]; then + CLI_HAVE_ENV_AUTH=1 + fi + +- cmp_redis_version $CLI_VER 5.0.0 ++ ocf_version_cmp $CLI_VER 5.0.0 + res=$? +- echo 5.0.0: $res + if [[ res -ge 1 ]]; then + CLI_HAVE_ARG_NO_AUTH_WARNING=1 + fi + +- cmp_redis_version $CLI_VER 4.0.10 ++ ocf_version_cmp $CLI_VER 4.0.10 + res=$? +- echo 4.0.10: $res + if [[ res -ge 1 ]]; then + CLI_HAVE_AUTH_WARNING=1 + fi +@@ -364,7 +349,7 @@ redis_client() { + if [[ CLI_HAVE_ENV_AUTH -eq 1 ]]; then + REDISCLI_AUTH=$clientpasswd "$REDIS_CLIENT" -s "$REDIS_SOCKET" "$@" | sed 's/\r//' + elif [[ CLI_HAVE_ARG_NO_AUTH_WARNING -eq 1 ]]; then +- "$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd" "$@" --no-auth-warning | sed 's/\r//' ++ "$REDIS_CLIENT" -s "$REDIS_SOCKET" --no-auth-warning -a "$clientpasswd" "$@" | sed 's/\r//' + elif [[ CLI_HAVE_AUTH_WARNING -eq 1 ]]; then + ("$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd" "$@" 2>&1 >&3 3>&- | grep -v "Using a password" >&2 3>&-) 3>&1 | sed 's/\r//' + else diff --git a/SOURCES/bz1890068-gcp-pd-move-fix-partially-matched-disk_name.patch b/SOURCES/bz1890068-gcp-pd-move-fix-partially-matched-disk_name.patch new file mode 100644 index 0000000..83aef93 --- /dev/null +++ b/SOURCES/bz1890068-gcp-pd-move-fix-partially-matched-disk_name.patch @@ -0,0 +1,58 @@ +From 2927279ba1677e9dda202121176a8245a7ef76ca Mon Sep 17 00:00:00 2001 +From: tositaka77 <45960626+tositaka77@users.noreply.github.com> +Date: Wed, 14 Oct 2020 22:22:56 +0900 +Subject: [PATCH] fixes and improvements + +- Fixed "regional" PD functionality in attach_disk() +- Improve to exact match disk_name with disks.source in detach_disk() +--- + heartbeat/gcp-pd-move.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/heartbeat/gcp-pd-move.in b/heartbeat/gcp-pd-move.in +index f82bd25e5..e99cc71f8 100644 +--- a/heartbeat/gcp-pd-move.in ++++ b/heartbeat/gcp-pd-move.in +@@ -49,6 +49,7 @@ else: + CONN = None + PROJECT = None + ZONE = None ++REGION = None + LIST_DISK_ATTACHED_INSTANCES = None + INSTANCE_NAME = None + +@@ -148,6 +149,7 @@ def populate_vars(): + global INSTANCE_NAME + global PROJECT + global ZONE ++ global REGION + global LIST_DISK_ATTACHED_INSTANCES + + # Populate global vars +@@ -175,6 +177,7 @@ def populate_vars(): + PROJECT = get_metadata('project/project-id') + if PARAMETERS['disk_scope'] in ['detect', 'regional']: + ZONE = get_metadata('instance/zone').split('/')[-1] ++ REGION = ZONE[:-2] + else: + ZONE = PARAMETERS['disk_scope'] + LIST_DISK_ATTACHED_INSTANCES = get_disk_attached_instances( +@@ -255,7 +258,7 @@ def detach_disk(instance, disk_name): + + device_name = None + for disk in response['disks']: +- if disk_name in disk['source']: ++ if disk_name == re.sub('.*disks/',"",disk['source']): + device_name = disk['deviceName'] + break + +@@ -273,6 +276,9 @@ def detach_disk(instance, disk_name): + + def attach_disk(instance, disk_name): + location = 'zones/%s' % ZONE ++ if PARAMETERS['disk_scope'] == 'regional': ++ location = 'regions/%s' % REGION ++ + prefix = 'https://www.googleapis.com/compute/v1' + body = { + 'source': '%(prefix)s/projects/%(project)s/%(location)s/disks/%(disk)s' % { diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index 4d47b7b..0e57d97 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -70,7 +70,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.1.1 -Release: 70%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 71%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -242,6 +242,9 @@ Patch150: bz1795535-pgsql-2-fix-uppercase-hostname-support.patch Patch151: bz1858752-Filesystem-support-whitespace-device-dir.patch Patch152: bz1872999-aws-vpc-move-ip-add-region-parameter.patch Patch153: bz1881114-galera-recover-joining-non-existing-cluster.patch +Patch154: bz1815013-redis-parse-password-correctly-based-on-version.patch +Patch155: bz1763249-manpages-fix-pcs-syntax.patch +Patch156: bz1890068-gcp-pd-move-fix-partially-matched-disk_name.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -551,6 +554,9 @@ exit 1 %patch151 -p1 -F1 %patch152 -p1 %patch153 -p1 +%patch154 -p1 -F1 +%patch155 -p1 +%patch156 -p1 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -1114,6 +1120,15 @@ ccs_update_schema > /dev/null 2>&1 ||: %endif %changelog +* Tue Oct 27 2020 Oyvind Albrigtsen - 4.1.1-71 +- redis: parse password correctly based on version +- all agents: fix pcs syntax in manpage for pcs 0.10+ +- gcp-pd-move: dont stop partially matched "disk_name" + + Resolves: rhbz#1815013 + Resolves: rhbz#1763249 + Resolves: rhbz#1890068 + * Wed Oct 7 2020 Oyvind Albrigtsen - 4.1.1-70 - galera: recover from joining a non existing cluster