proxysql errors when used in replica cluster

Description

I bumped into issue when tried to use proxysql in the replica cluster:

ERROR (line:2135) : --write-node is a read-only node(cluster1-pxc-0.cluster1-pxc.pxc-repl.svc.cluster.local:3306). Terminating. debug (line:3474) : Restoring ProxySQL checksum updates debug (line:3498) : exec_sql : proxyadmin@localhost:6032 ==> SET admin-cluster_username = 'proxyadmin' debug: --> query returned 0 : <query returned no data> debug (line:3507) : exec_sql : proxyadmin@localhost:6032 ==> SET admin-cluster_check_interval_ms = '200' debug: --> query returned 0 : <query returned no data> debug (line:3516) : exec_sql : proxyadmin@localhost:6032 ==> SET admin-checksum_mysql_query_rules = 'true' debug: --> query returned 0 : <query returned no data> debug (line:3525) : exec_sql : proxyadmin@localhost:6032 ==> SET admin-checksum_mysql_servers = 'true' debug: --> query returned 0 : <query returned no data> debug (line:3534) : exec_sql : proxyadmin@localhost:6032 ==> SET admin-checksum_mysql_users = 'true' debug: --> query returned 0 : <query returned no data> debug (line:3545) : exec_sql : proxyadmin@localhost:6032 ==> LOAD ADMIN VARIABLES TO RUNTIME debug: --> query returned 0 : <query returned no data> , err: exit status 1

Notice the first line, seems it doesn't like that the write pod is read only.

Pods are in crashloop:

NAME READY STATUS RESTARTS AGE cluster1-proxysql-0 2/3 CrashLoopBackOff 4 7m34s cluster1-proxysql-1 2/3 CrashLoopBackOff 4 6m58s cluster1-proxysql-2 2/3 CrashLoopBackOff 4 6m28s cluster1-pxc-0 3/3 Running 0 7m34s cluster1-pxc-1 3/3 Running 0 5m56s cluster1-pxc-2 3/3 Running 0 4m23s percona-xtradb-cluster-operator-7c4786cb9d-6m2mj 1/1 Running 0 8m11s

Operator logs:

{"level":"info","ts":1627983672.71704,"caller":"zapr/zapr.go:69","msg":"reconcile replication error","err":"get primary pxc pod: not found"} {"level":"info","ts":1627983673.8444414,"caller":"zapr/zapr.go:69","msg":"reconcile replication error","err":"get primary pxc pod: not found"} {"level":"info","ts":1627983676.6274755,"caller":"zapr/zapr.go:69","msg":"reconcile replication error","err":"get primary pxc pod: not found"} {"level":"info","ts":1627983677.7520366,"caller":"zapr/zapr.go:69","msg":"reconcile replication error","err":"get primary pxc pod: not found"} {"level":"info","ts":1627983678.8680234,"caller":"zapr/zapr.go:69","msg":"reconcile replication error","err":"get primary pxc pod: not found"} {"level":"info","ts":1627983680.0036445,"caller":"zapr/zapr.go:69","msg":"reconcile replication error","err":"get primary pxc pod: not found"}

Environment

None

Smart Checklist

Activity

natalia.marukovich December 6, 2022 at 4:35 PM

Slava Sarzhan April 14, 2022 at 11:23 AM

Hi,

We had a limitation that proxysql can't be used with replica cluster due to limitation on proxyadmin end. It
was improved and now we can fix it on our end too. If --update-cluster is used with the --force flag, a warning will be issued (instead of an error) if the write-node is a read-only node.

Bulat Zamalutdinov August 16, 2021 at 9:34 AM

We need to remove --write-node flag to be able to use proxysql on read-only node

 

Done

Details

Assignee

Reporter

Needs QA

Yes

Fix versions

Affects versions

Priority

Smart Checklist

Created August 3, 2021 at 9:47 AM
Updated March 5, 2024 at 5:47 PM
Resolved July 11, 2023 at 6:44 PM