Buy Percona ServicesBuy Now!

proxysql_galera_checker arguments are incorrect.

  • Filter
  • Time
  • Show
Clear All
new posts

  • proxysql_galera_checker arguments are incorrect.

    Hello. I just installed PXC, according to your documentation. It seems that the documention is out of date, in regards to the correct arguments for, as the arguments changed between version 1.2.1 and 1.2.2 of the script (see:

    My PXC is a 3-node cluster, where all 3 nodes can read & write. It has a single hostgroup, with an id of zero.

    Would you please tell me what arguments I should be passing to the script, for my cluster? Thanks!

  • #2
    I dove into the script and figure out what it needed.

    The latest documentation I can find (Percona-XtraDB-Cluster-5.7.18-29.20.pdf), in 29.3.4 of "Manual Configuration" of ProxySQL, says to add this entry to the scheduler:

    INSERT INTO scheduler(id,interval_ms,filename,arg1,arg2,arg3,a rg4) VALUES(1,'10000','/usr/bin/proxysql_galera_checker','','6032','0','/var/lib/proxysql/proxysql_galera_checker.log');

    That *used* to be correct, but the script has left the documentation behind, and now requires different arguments, specifically:

    Usage: $0 <hostgroup_id write> [hostgroup_id read] [number writers] [writers are readers 0|1] [log_file]

    - HOSTGROUP WRITERS (required) (0..) The hostgroup_id that contains nodes that will server 'writes'
    - HOSTGROUP READERS (optional) (0..) The hostgroup_id that contains nodes that will server 'reads'
    - NUMBER WRITERS (optional) (0..) Maximum number of write hostgroup_id node that can be marked ONLINE
    When 0 (default), all nodes can be marked ONLINE
    - WRITERS ARE READERS (optional) (0|1) When 1 (default), ONLINE nodes in write hostgroup_id will prefer not
    to be ONLINE in read hostgroup_id
    - LOG_FILE (optional) file logfile where node state checks & changes are written to (verbose)

    So, the documentation *should* now say to add this entry to the scheduler, for the example setup they walk through in "Manual Configuration":

    INSERT INTO scheduler(id,active,interval_ms,filename,arg1,arg2 ,arg3,arg4,arg5) VALUES(1,'1','10000','/usr/bin/proxysql_galera_checker','0','-1','0','1','/var/lib/proxysql/proxysql_galera_checker.log');

    The only other thing I had to do was update /etc/proxysql-admin.cnf with the password for 'admin', that I'd set in ProxySQL.

    It's working like a charm now. SOLVED.