Uploaded image for project: 'ProxySQL Admin Scripts'
  1. ProxySQL Admin Scripts
  2. PSQLADM-127

proxysql_galera_checker corrupts scheduler cnfiguration after restart

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 1.4.12
    • Fix Version/s: 1.4.13
    • Component/s: None
    • Labels:
      None

      Description

      After https://github.com/sysown/proxysql/issues/1787 and https://github.com/sysown/proxysql/issues/1723 are fixed it is possible to restart ProxySQL while child processes were not detached yet. In this case few proxysql_galera_checker instances can run at the same time: fired by the "original" process and by "restarted" process. It works fine for couple of minutes but later content of the SCHEDULER table gets rewritten: arg1 to proxysql_galera_checker  script is missed, thus subsequent runs of proxysql_galera_checker  fail with error.

      How to Repeat.

      1. Modify proxysql_galera_checker as described at https://github.com/sysown/proxysql/issues/1723
      2. Start PXC
      3. Start ProxySQL with option -r ( --reuseport)
      4. Run proxysql-admin script to enable proxysql_galera_checker
      5. Stop ProxySQL
      6. Start ProxySQL with option -r ( --reuseport)
      7. Check that ProxySQL is running, PXC nodes are accessible via it, admin interface is accessible, content of the scheduler table is fine.
      8. Check content of the scheduler table after 5 minutes, find arg1 is disappeared

      Before restart and right after restart:

      MySQL [(none)]> select * from scheduler;
      +----+--------+-------------+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+------+------+------+------------------+
      | id | active | interval_ms | filename                        | arg1                                                                                                                                                                                                                          | arg2 | arg3 | arg4 | arg5 | comment          |
      +----+--------+-------------+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+------+------+------+------------------+
      | 1  | 1      | 3000        | /usr/bin/proxysql_galera_checker |  --config-file=/etc/proxysql-admin.cnf --writer-is-reader=ondemand --write-hg=10 --read-hg=11 --writer-count=1 --mode=singlewrite  --use-slave-as-writer=no --log=/var/lib/proxysql/my_wsrep_cluster_proxysql_galera_check.log | NULL | NULL | NULL | NULL | my_wsrep_cluster |
      +----+--------+-------------+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+------+------+------+------------------+
      1 row in set (0.00 sec)

      After some time:

      MySQL [(none)]> select * from scheduler;
      +----+--------+-------------+----------------------------------+------+------+------+------+------+------------------+
      | id | active | interval_ms | filename                        | arg1 | arg2 | arg3 | arg4 | arg5 | comment          |
      +----+--------+-------------+----------------------------------+------+------+------+------+------+------------------+
      | 1  | 1      | 3000        | /usr/bin/proxysql_galera_checker |      | NULL | NULL | NULL | NULL | my_wsrep_cluster |
      +----+--------+-------------+----------------------------------+------+------+------+------+------+------------------+
      1 row in set (0.01 sec)

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  kenn.takara Kenn Takara
                  Reporter:
                  sveta.smirnova Sveta Smirnova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: