From 32ae78920517554e6066abadd65927a46c944006 Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Wed, 14 Jun 2023 15:09:27 +0200 Subject: [PATCH] - mysql: fix replication issues Resolves: rhbz#2039692 --- ... bz2039692-mysql-1-replication-fixes.patch | 0 ...692-mysql-2-fix-demoted-score-bounce.patch | 32 +++++++++++++++++++ resource-agents.spec | 13 +++++--- 3 files changed, 41 insertions(+), 4 deletions(-) rename bz2039692-mysql-replication-fixes.patch => bz2039692-mysql-1-replication-fixes.patch (100%) create mode 100644 bz2039692-mysql-2-fix-demoted-score-bounce.patch diff --git a/bz2039692-mysql-replication-fixes.patch b/bz2039692-mysql-1-replication-fixes.patch similarity index 100% rename from bz2039692-mysql-replication-fixes.patch rename to bz2039692-mysql-1-replication-fixes.patch diff --git a/bz2039692-mysql-2-fix-demoted-score-bounce.patch b/bz2039692-mysql-2-fix-demoted-score-bounce.patch new file mode 100644 index 0000000..30815b4 --- /dev/null +++ b/bz2039692-mysql-2-fix-demoted-score-bounce.patch @@ -0,0 +1,32 @@ +From 34483f8029ea9ab25220cfee71d53adaf5aacaa0 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Wed, 14 Jun 2023 14:37:01 +0200 +Subject: [PATCH] mysql: fix promotion_score bouncing between ~3600 and 1 on + demoted nodes + +--- + heartbeat/mysql | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/heartbeat/mysql b/heartbeat/mysql +index 29ed42731..1df2fc0f2 100755 +--- a/heartbeat/mysql ++++ b/heartbeat/mysql +@@ -517,17 +517,6 @@ check_slave() { + + exit $OCF_ERR_INSTALLED + fi +- elif ocf_is_ms; then +- # Even if we're not set to evict lagging slaves, we can +- # still use the seconds behind master value to set our +- # master preference. +- local master_pref +- master_pref=$((${OCF_RESKEY_max_slave_lag}-${secs_behind})) +- if [ $master_pref -lt 0 ]; then +- # Sanitize a below-zero preference to just zero +- master_pref=0 +- fi +- $CRM_MASTER -v $master_pref + fi + + # is the slave ok to have a VIP on it diff --git a/resource-agents.spec b/resource-agents.spec index baf2960..a2e589d 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -69,7 +69,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.9.0 -Release: 42%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 43%{?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} @@ -139,10 +139,11 @@ Patch47: bz2157873-5-pgsqlms-alidate-all-OCF_CHECK_LEVEL-10.patch Patch48: bz2040110-IPaddr2-IPsrcaddr-support-policy-based-routing.patch Patch49: bz2149970-lvmlockd-add-use_lvmlockd-if-missing.patch Patch50: bz2154727-ethmonitor-dont-log-iface-doesnt-exist-monitor.patch -Patch51: bz2039692-mysql-replication-fixes.patch +Patch51: bz2039692-mysql-1-replication-fixes.patch Patch52: bz2181019-azure-events-1-fix-no-transition-summary.patch Patch53: bz2181019-azure-events-2-improve-logic.patch Patch54: bz2183152-Filesystem-fail-efs-utils-not-installed.patch +Patch55: bz2039692-mysql-2-fix-demoted-score-bounce.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -377,6 +378,7 @@ exit 1 %patch52 -p1 %patch53 -p1 %patch54 -p1 +%patch55 -p1 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -952,6 +954,11 @@ ccs_update_schema > /dev/null 2>&1 ||: %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Wed Jun 14 2023 Oyvind Albrigtsen - 4.9.0-43 +- mysql: fix replication issues + + Resolves: rhbz#2039692 + * Mon May 1 2023 Oyvind Albrigtsen - 4.9.0-42 - azure-events*: fix for no "Transition Summary" for Pacemaker 2.1+ - Filesystem: fail if AWS efs-utils not installed when fstype=efs @@ -963,12 +970,10 @@ ccs_update_schema > /dev/null 2>&1 ||: - IPaddr2/IPsrcaddr: support policy-based routing - lvmlockd: add "use_lvmlockd = 1" if it's commented out or missing - ethmonitor: dont log "Interface does not exist" for monitor-action -- mysql: fix replication issues Resolves: rhbz#2040110 Resolves: rhbz#2149970 Resolves: rhbz#2154727 - Resolves: rhbz#2039692 * Tue Jan 17 2023 Oyvind Albrigtsen - 4.9.0-40 - all agents: dont check notify/promotable settings during