diff --git a/.gitignore b/.gitignore index 31f023971..eb485f86c 100644 --- a/.gitignore +++ b/.gitignore @@ -83,6 +83,7 @@ src/*log* #test artifacts ci_infra_logs/ test/tap/tap/*.mri +test/tap/tests/test_cluster_sync_config/test_cluster_sync_withmonitor/cluster_sync_node_stderr.txt proxysql-2.0.0/ docker/images/proxysql/rhel-compliant/rpmmacros diff --git a/test/infra/infra-mariadb10/conf/proxysql/infra-config.sql b/test/infra/infra-mariadb10/conf/proxysql/infra-config.sql index f9e0bf7e4..7e48cdf0d 100644 --- a/test/infra/infra-mariadb10/conf/proxysql/infra-config.sql +++ b/test/infra/infra-mariadb10/conf/proxysql/infra-config.sql @@ -18,19 +18,19 @@ LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK; DELETE FROM mysql_users WHERE comment LIKE '%${INFRA}'; -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('root','${ROOT_PASSWORD}',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('user','user',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('testuser','testuser',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest1','sbtest1',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest2','sbtest2',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest3','sbtest3',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest4','sbtest4',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('ssluser','ssluser',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('${INFRA}','${INFRA}',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('root','${ROOT_PASSWORD}',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('user','user',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('testuser','testuser',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest1','sbtest1',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest2','sbtest2',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest3','sbtest3',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest4','sbtest4',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('ssluser','ssluser',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('${INFRA}','${INFRA}',1,${WHG},'${INFRA}'); -- MariaDB specific users for the Fast Forward test -REPLACE INTO mysql_users (username,password,active,default_hostgroup,fast_forward,comment) values ('mariadbuser','mariadbuser',1,${WHG},0,'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,fast_forward,comment) values ('mariadbuserff','mariadbuserff',1,${WHG},1,'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,fast_forward,comment) values ('mariadbuser','mariadbuser',1,${WHG},0,'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,fast_forward,comment) values ('mariadbuserff','mariadbuserff',1,${WHG},1,'${INFRA}'); LOAD MYSQL USERS TO RUNTIME; SAVE MYSQL USERS TO DISK; diff --git a/test/infra/infra-mysql57/bin/docker-proxy-post.bash b/test/infra/infra-mysql57/bin/docker-proxy-post.bash index 646ab0c93..445add3bb 100755 --- a/test/infra/infra-mysql57/bin/docker-proxy-post.bash +++ b/test/infra/infra-mysql57/bin/docker-proxy-post.bash @@ -14,16 +14,16 @@ DELETE FROM mysql_users WHERE username='root'; DELETE FROM mysql_users WHERE username='testuser'; -- Register root user (fast_forward=0 by default) -REPLACE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) +INSERT OR IGNORE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) VALUES ('root', '${ROOT_PASSWORD}', 1, ${WHG}, 0, 1, 1, 'dynamic-root-user'); -- Register testuser (fast_forward=0 by default) -REPLACE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) +INSERT OR IGNORE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) VALUES ('testuser', 'testuser', 1, ${WHG}, 0, 1, 1, 'universal-testuser'); -- Ensure cluster specific user is also correctly set DELETE FROM mysql_users WHERE username='${INFRA}'; -REPLACE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) +INSERT OR IGNORE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) VALUES ('${INFRA}', '${INFRA}', 1, ${WHG}, 0, 1, 1, '${INFRA}'); -- Synchronize monitor credentials diff --git a/test/infra/infra-mysql57/conf/orchestrator/orc1/orchestrator.conf.json b/test/infra/infra-mysql57/conf/orchestrator/orc1/orchestrator.conf.json index 714b9baaf..2ae23c4e2 100644 --- a/test/infra/infra-mysql57/conf/orchestrator/orc1/orchestrator.conf.json +++ b/test/infra/infra-mysql57/conf/orchestrator/orc1/orchestrator.conf.json @@ -3,7 +3,7 @@ "ListenAddress": ":3000", "MySQLTopologySSLSkipVerify": true, "MySQLTopologyUser": "root", - "MySQLTopologyPassword": "05e1229f3d", + "MySQLTopologyPassword": "177f004d88", "BackendDB": "sqlite", "SQLite3DataFile": "/var/lib/orchestrator/orchestrator.db", "RaftEnabled": true, diff --git a/test/infra/infra-mysql57/conf/orchestrator/orc2/orchestrator.conf.json b/test/infra/infra-mysql57/conf/orchestrator/orc2/orchestrator.conf.json index 53256eba3..2707887aa 100644 --- a/test/infra/infra-mysql57/conf/orchestrator/orc2/orchestrator.conf.json +++ b/test/infra/infra-mysql57/conf/orchestrator/orc2/orchestrator.conf.json @@ -3,7 +3,7 @@ "ListenAddress": ":3000", "MySQLTopologySSLSkipVerify": true, "MySQLTopologyUser": "root", - "MySQLTopologyPassword": "05e1229f3d", + "MySQLTopologyPassword": "177f004d88", "BackendDB": "sqlite", "SQLite3DataFile": "/var/lib/orchestrator/orchestrator.db", "RaftEnabled": true, diff --git a/test/infra/infra-mysql57/conf/orchestrator/orc3/orchestrator.conf.json b/test/infra/infra-mysql57/conf/orchestrator/orc3/orchestrator.conf.json index 439caa223..0be2d6076 100644 --- a/test/infra/infra-mysql57/conf/orchestrator/orc3/orchestrator.conf.json +++ b/test/infra/infra-mysql57/conf/orchestrator/orc3/orchestrator.conf.json @@ -3,7 +3,7 @@ "ListenAddress": ":3000", "MySQLTopologySSLSkipVerify": true, "MySQLTopologyUser": "root", - "MySQLTopologyPassword": "05e1229f3d", + "MySQLTopologyPassword": "177f004d88", "BackendDB": "sqlite", "SQLite3DataFile": "/var/lib/orchestrator/orchestrator.db", "RaftEnabled": true, diff --git a/test/infra/infra-mysql57/conf/proxysql/infra-config.sql b/test/infra/infra-mysql57/conf/proxysql/infra-config.sql index 260b4c6fb..adcf49505 100644 --- a/test/infra/infra-mysql57/conf/proxysql/infra-config.sql +++ b/test/infra/infra-mysql57/conf/proxysql/infra-config.sql @@ -24,16 +24,16 @@ LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK; DELETE FROM mysql_users WHERE comment LIKE '%${INFRA}'; -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('root','root',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('root','root',1,${WHG},'${INFRA}'); UPDATE mysql_users SET default_hostgroup=${WHG},comment='${INFRA}' WHERE username='root'; -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('user','user',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('testuser','testuser',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest1','sbtest1',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest2','sbtest2',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest3','sbtest3',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest4','sbtest4',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('ssluser','ssluser',1,${WHG},'${INFRA}'); -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('${INFRA}','${INFRA}',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('user','user',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('testuser','testuser',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest1','sbtest1',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest2','sbtest2',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest3','sbtest3',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('sbtest4','sbtest4',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('ssluser','ssluser',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('${INFRA}','${INFRA}',1,${WHG},'${INFRA}'); LOAD MYSQL USERS TO RUNTIME; SAVE MYSQL USERS TO DISK; diff --git a/test/infra/infra-mysql84/bin/docker-proxy-post.bash b/test/infra/infra-mysql84/bin/docker-proxy-post.bash index 646ab0c93..445add3bb 100755 --- a/test/infra/infra-mysql84/bin/docker-proxy-post.bash +++ b/test/infra/infra-mysql84/bin/docker-proxy-post.bash @@ -14,16 +14,16 @@ DELETE FROM mysql_users WHERE username='root'; DELETE FROM mysql_users WHERE username='testuser'; -- Register root user (fast_forward=0 by default) -REPLACE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) +INSERT OR IGNORE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) VALUES ('root', '${ROOT_PASSWORD}', 1, ${WHG}, 0, 1, 1, 'dynamic-root-user'); -- Register testuser (fast_forward=0 by default) -REPLACE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) +INSERT OR IGNORE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) VALUES ('testuser', 'testuser', 1, ${WHG}, 0, 1, 1, 'universal-testuser'); -- Ensure cluster specific user is also correctly set DELETE FROM mysql_users WHERE username='${INFRA}'; -REPLACE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) +INSERT OR IGNORE INTO mysql_users (username, password, active, default_hostgroup, fast_forward, backend, frontend, comment) VALUES ('${INFRA}', '${INFRA}', 1, ${WHG}, 0, 1, 1, '${INFRA}'); -- Synchronize monitor credentials diff --git a/test/infra/infra-mysql84/conf/proxysql/infra-config.sql b/test/infra/infra-mysql84/conf/proxysql/infra-config.sql index 8c73ca454..24448c2e1 100644 --- a/test/infra/infra-mysql84/conf/proxysql/infra-config.sql +++ b/test/infra/infra-mysql84/conf/proxysql/infra-config.sql @@ -25,7 +25,7 @@ LOAD MYSQL SERVERS TO RUNTIME; SAVE MYSQL SERVERS TO DISK; DELETE FROM mysql_users WHERE comment LIKE '%${INFRA}'; -REPLACE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('${INFRA}','${INFRA}',1,${WHG},'${INFRA}'); +INSERT OR IGNORE INTO mysql_users (username,password,active,default_hostgroup,comment) values ('${INFRA}','${INFRA}',1,${WHG},'${INFRA}'); LOAD MYSQL USERS TO RUNTIME; SAVE MYSQL USERS TO DISK; diff --git a/test/tap/tests/reg_test_3223_scripts/write_to_std_streams.py-RECV_SIGTERM b/test/tap/tests/reg_test_3223_scripts/write_to_std_streams.py-RECV_SIGTERM new file mode 100644 index 000000000..e69de29bb diff --git a/test/tap/tests/test_cluster_sync_config/test_cluster_sync_withmonitor/cluster_sync_node_stderr.txt b/test/tap/tests/test_cluster_sync_config/test_cluster_sync_withmonitor/cluster_sync_node_stderr.txt index 4f017c81d..0b59fcad8 100644 --- a/test/tap/tests/test_cluster_sync_config/test_cluster_sync_withmonitor/cluster_sync_node_stderr.txt +++ b/test/tap/tests/test_cluster_sync_config/test_cluster_sync_withmonitor/cluster_sync_node_stderr.txt @@ -211,3 +211,45 @@ WARNING: this is a DEBUG release and can be slow or perform poorly. Do not use i 2026-03-08 23:56:51 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) 2026-03-08 23:56:53 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) 2026-03-08 23:56:55 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) +2026-03-08 23:56:57 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) +2026-03-08 23:56:59 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) +2026-03-08 23:57:01 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) +2026-03-08 23:57:03 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) +2026-03-08 23:57:06 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) +2026-03-08 23:57:08 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) +2026-03-08 23:57:10 ProxySQL_Cluster.cpp:244:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql:6032 . Error: ProxySQL Error: Access denied for user 'cluster1'@'172.21.0.14' (using password: YES) +2026-03-08 23:57:10 ProxySQL_GloVars.cpp:32:term_handler(): [WARNING] Received TERM signal: shutdown in progress... +2026-03-08 23:57:10 main.cpp:3122:main(): [INFO] Starting shutdown... +GloMTH joined in 0.003465 secs. +GloPTH joined in 0.001297 secs. +2026-03-08 23:57:10 PgSQL_Monitor.cpp:2254:PgSQL_monitor_scheduler_thread(): [INFO] Exiting PgSQL_Monitor scheduling thread +2026-03-08 23:57:10 PgSQL_Monitor.cpp:1763:worker_thread(): [INFO] Received exit signal. Stopping worker thread=137464819742400 +2026-03-08 23:57:10 PgSQL_Monitor.cpp:1763:worker_thread(): [INFO] Received exit signal. Stopping worker thread=137464817641152 +GloMyMon joined in 0.176468 secs. +GloPgMon joined in 0.370958 secs. +GloMyQC and GloPgQC joined in 6.5e-05 secs. +All threads joined in 0.552288 secs. +GloMyMon shutdown in 5.3e-05 secs. +GloPgMon shutdown in 2e-05 secs. +GloMyQC shutdown in 1.8e-05 secs. +GloPgQC shutdown in 1.2e-05 secs. +GloMyQPro shutdown in 1.6e-05 secs. +GloPgQPro shutdown in 1e-05 secs. +GloMyAuth shutdown in 1.6e-05 secs. +GloPgAuth shutdown in 5e-06 secs. +GloMTH shutdown in 8.5e-05 secs. +GloPTH shutdown in 3.6e-05 secs. +GloMCPH shutdown in 2e-06 secs. +2026-03-08 23:57:11 GenAI_Thread.cpp:330:shutdown(): [INFO] Shutting down GenAI module +GloGATH shutdown in 0.000287 secs. +2026-03-08 23:57:11 AI_Features_Manager.cpp:483:shutdown(): [INFO] AI: Shutting down AI Features Manager +2026-03-08 23:57:11 AI_Features_Manager.cpp:489:shutdown(): [INFO] AI: AI Features Manager shutdown complete +GloAI shutdown in 1.9e-05 secs. +GloMyLogger shutdown in 1.5e-05 secs. +GloPgSQL_Logger shutdown in 6e-06 secs. +GloAdmin shutdown in 0.001051 secs. +GloMyHGM shutdown in 0.000145 secs. +GloPgHGM shutdown in 6.6e-05 secs. +Main init phase4 shutdown completed in 0.554228 secs. +2026-03-08 23:57:11 main.cpp:3129:main(): [INFO] Shutdown completed! +2026-03-08 23:57:11 main.cpp:3142:main(): [INFO] Exiting...