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

remove-all-servers option doesn't work on enable

    Details

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

      Description

      I am running the following command, but still see unexpeced errors:

      + proxysql-admin --config-file=/etc/proxysql-admin.cnf --cluster-hostname=cluster1-pxc-0.cluster1-pxc.run-master-29707.svc.cluster.local --enable --update-cluster --remove-all-servers --use-ssl=yes
      ProxySQL has not been configured, enabling
      ERROR (line:1138) : One or more of the hostgroups(11,10,12,13) has a server assigned to that hostgroup.
      -- To avoid conflicts, please use different values for the hostgroups.
      +--------------+--------------+------+--------+--------+
      | hostgroup_id | hostname     | port | status | weight |
      +--------------+--------------+------+--------+--------+
      | 10           | 10.129.0.244 | 3306 | ONLINE | 1000   |
      | 10           | 10.130.0.77  | 3306 | ONLINE | 1000   |
      | 11           | 10.131.0.65  | 3306 | ONLINE | 1000   |
      | 12           | 10.129.0.244 | 3306 | ONLINE | 1000   |
      | 12           | 10.130.0.77  | 3306 | ONLINE | 1000   |
      +--------------+--------------+------+--------+--------+
      , err: exit status 1 

      In kubernetes, we cannot detect if it is the first run of the command, so we need to pass -enable and -update-cluster options together.
      but the command fails, which means ProxySQL doesn't have the latest list of cluster members.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                ramesh.sivaraman Ramesh Sivaraman
                Reporter:
                mykola.marzhan Mykola Marzhan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2 days, 4 hours
                  2d 4h