From d1ef649bb0f8f350a9551853343f005be7c4f021 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Wed, 3 Jun 2026 18:11:03 +0200 Subject: [PATCH] MT#65243 Plugin::NGCP::Redis handle 'active-replica' state * Catalyst::Plugin::NGCP::Redis::_wait_for_master_role() only expected the 'master' value to be considered as OK, whereas with Redis/KeyDB the value can be also 'active-replica'. Therefore, consider both 'master' and 'active-replica' values as OK. Change-Id: I16a0657a3a78a2f2b3c892c21ce0d9d6ebec0a0c (cherry picked from commit 5d7e137ec9bdec72ae9d577404026a83e4aca550) (cherry picked from commit 2c1c0642edf4c75ab1c87302263f0b8b637cb583) --- lib/Catalyst/Plugin/NGCP/Redis.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Catalyst/Plugin/NGCP/Redis.pm b/lib/Catalyst/Plugin/NGCP/Redis.pm index 2872f0f276..63a48e818c 100644 --- a/lib/Catalyst/Plugin/NGCP/Redis.pm +++ b/lib/Catalyst/Plugin/NGCP/Redis.pm @@ -50,7 +50,8 @@ sub _wait_for_master_role { my $wait = 5; while ($cnt < $wait) { - return 1 if _get_replication_role($conn_ref) eq 'master'; + my $repl_role = _get_replication_role($conn_ref); + return 1 if $repl_role =~ /^(master|active-replica)$/; sleep $interval; $cnt += $interval; }