Coder Social home page Coder Social logo

proxysql-tools's People

Contributors

akuzminsky avatar juanitofatas avatar otani88 avatar ovaistariq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

proxysql-tools's Issues

Failed to talk to database: (1045, u'near ".90": syntax error')

  • ProxySQL Tools version: 0.3.10, revision e80a84cd1853aa91be9349570b3dda03d04a8c0e

Description

On vagrant machine proxysql galera register fails with error

2017-08-23 05:09:33,220: ERROR: cli.register():102: Failed to talk to database: (1045, u'near ".90": syntax error')

What I Did

All nodes are ONLINE

[root@proxysql vagrant]# proxysql-tool galera server status
2017-08-23 05:11:49,608: INFO: server.server_status():44: Writers:
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+
| hostgroup_id | hostname     | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment                                  |
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+
|           10 | 192.168.90.2 | 3306 | ONLINE |      1 |           0 |           10000 |                   0 |   False |              0 | {"admin_status": null, "role": "Writer"} |
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+
2017-08-23 05:11:49,613: INFO: server.server_status():44: Readers:
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+
| hostgroup_id | hostname     | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment                                  |
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+
|           11 | 192.168.90.3 | 3306 | ONLINE |      1 |           0 |           10000 |                   0 |   False |              0 | {"admin_status": null, "role": "Reader"} |
|           11 | 192.168.90.4 | 3306 | ONLINE |      1 |           0 |           10000 |                   0 |   False |              0 | {"admin_status": null, "role": "Reader"} |
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+

but galera register fails

[root@proxysql vagrant]# proxysql-tool --debug galera register
2017-08-23 05:12:29,690: DEBUG: galera.galera_register():24: Galera config {'password': 'proxysql', 'user': 'proxysql_user'}
2017-08-23 05:12:29,690: DEBUG: galera.galera_register():29: ProxySQL config {'host': '127.0.0.1', 'password': 'admin', 'port': '6032', 'user': 'admin'}
2017-08-23 05:12:29,691: DEBUG: load_balancing_mode.register_writer():103: Registering writers
2017-08-23 05:12:29,694: DEBUG: load_balancing_mode.check_backend():228: Backend hostgroup_id=10, hostname=192.168.90.2, port=3306, status=ONLINE, weight=1, compression=0, max_connections=10000, max_replication_lag=0, use_ssl=False, max_latency_ms=0, comment={"admin_status": null, "role": "Writer"} is already registered
2017-08-23 05:12:29,695: DEBUG: load_balancing_mode.check_backend():229: Checking its health
2017-08-23 05:12:29,763: DEBUG: load_balancing_mode.check_backend():234: 192.168.90.2:3306 state: 4
2017-08-23 05:12:29,764: DEBUG: load_balancing_mode.check_backend():237: Node 192.168.90.2:3306 (ONLINE) is healthy
2017-08-23 05:12:29,767: DEBUG: load_balancing_mode.register_readers():157: Registering readers
2017-08-23 05:12:29,773: DEBUG: load_balancing_mode.register_readers():173: Comparing hostgroup_id=11, hostname=192.168.90.3, port=3306, status=ONLINE, weight=1, compression=0, max_connections=10000, max_replication_lag=0, use_ssl=False, max_latency_ms=0, comment={"admin_status": null, "role": "Reader"} and hostgroup_id=10, hostname=192.168.90.2, port=3306, status=ONLINE, weight=1, compression=0, max_connections=10000, max_replication_lag=0, use_ssl=False, max_latency_ms=0, comment={"admin_status": null, "role": "Writer"}
2017-08-23 05:12:29,773: DEBUG: load_balancing_mode.register_readers():177: Do not match
2017-08-23 05:12:29,773: DEBUG: load_balancing_mode.check_backend():228: Backend hostgroup_id=11, hostname=192.168.90.3, port=3306, status=ONLINE, weight=1, compression=0, max_connections=10000, max_replication_lag=0, use_ssl=False, max_latency_ms=0, comment={"admin_status": null, "role": "Reader"} is already registered
2017-08-23 05:12:29,774: DEBUG: load_balancing_mode.check_backend():229: Checking its health
2017-08-23 05:12:29,778: DEBUG: load_balancing_mode.check_backend():234: 192.168.90.3:3306 state: 4
2017-08-23 05:12:29,779: DEBUG: load_balancing_mode.check_backend():237: Node 192.168.90.3:3306 (ONLINE) is healthy
2017-08-23 05:12:29,779: DEBUG: load_balancing_mode.register_readers():173: Comparing hostgroup_id=11, hostname=192.168.90.4, port=3306, status=ONLINE, weight=1, compression=0, max_connections=10000, max_replication_lag=0, use_ssl=False, max_latency_ms=0, comment={"admin_status": null, "role": "Reader"} and hostgroup_id=10, hostname=192.168.90.2, port=3306, status=ONLINE, weight=1, compression=0, max_connections=10000, max_replication_lag=0, use_ssl=False, max_latency_ms=0, comment={"admin_status": null, "role": "Writer"}
2017-08-23 05:12:29,779: DEBUG: load_balancing_mode.register_readers():177: Do not match
2017-08-23 05:12:29,780: DEBUG: load_balancing_mode.check_backend():228: Backend hostgroup_id=11, hostname=192.168.90.4, port=3306, status=ONLINE, weight=1, compression=0, max_connections=10000, max_replication_lag=0, use_ssl=False, max_latency_ms=0, comment={"admin_status": null, "role": "Reader"} is already registered
2017-08-23 05:12:29,780: DEBUG: load_balancing_mode.check_backend():229: Checking its health
2017-08-23 05:12:29,786: DEBUG: load_balancing_mode.check_backend():234: 192.168.90.4:3306 state: 4
2017-08-23 05:12:29,786: DEBUG: load_balancing_mode.check_backend():237: Node 192.168.90.4:3306 (ONLINE) is healthy
2017-08-23 05:12:29,787: DEBUG: load_balancing_mode.singlewriter():39: Register all missing backends
2017-08-23 05:12:29,787: DEBUG: galera_cluster.find_synced_nodes():58: Looking for a SYNCED node
2017-08-23 05:12:29,794: DEBUG: galera_cluster.find_synced_nodes():63: 192.168.90.2:3306 state: 4
2017-08-23 05:12:29,801: DEBUG: galera_cluster.find_synced_nodes():63: 192.168.90.3:3306 state: 4
2017-08-23 05:12:29,807: DEBUG: galera_cluster.find_synced_nodes():63: 192.168.90.4:3306 state: 4
2017-08-23 05:12:29,809: ERROR: cli.register():102: Failed to talk to database: (1045, u'near ".90": syntax error')

schedule should be more specific when deregistering node

  • ProxySQL Tools version: 0.2.5

Description

When node is gone the scheduler should give a reason, what went wrong.

2017-03-29 13:38:30,219: INFO: proxysql_manager.deregister_backend():116: Deregistering backend 10.0.51.49:3306 in hostgroup 11

Optimize galera scheduler

Based on chat with Rene:

Both mine and Percona's Galera scheduler have a performance issue that I believe can cause high CPU usage. It calls LOAD MYSQL SERVERS TO RUNTIME always, no matter if any change was applied or not.
I will work on improving it, but as you are working on your own version I recommend to look into this optimization.

LOAD MYSQL SERVERS TO RUNTIME is expensive. It needs to compare the new input table with what is already at runtime, find differences and correct them, and remove servers if necessary. It also signal all threads so that they can destroy immediately every connections to removed or offline servers.
So better not run it if not required.

Allow blacklisting of nodes for writer role

  • ProxySQL Tools version: 0.2.12
  • Python version: 2.7
  • Operating System: CentOS 7

Description

There can be cases where a node should not become a writer node.
For such cases a config option should be introduced that allows blacklisting of nodes for the "writer" role.

LOAD ... TO RUNTIME should happen only after changes were made

  • ProxySQL Tools version: 3.10
  • Python version: n/a
  • Operating System: n/a

Description

As of now proxysql-tools executes reload_runtime() quite often when registering backends. This is not without an impact on ProxySQL and performance in general. All changes should be made in "MEMORY" and loaded to runtime only once per 'proxysql-tool galera register' execution. Additionally, if no changes happened (so mysql_servers after changes are the same as runtime_mysql_servers in ProxySQL), there's no need to load them up.

proxysql-tool aws notify_master failed

  • ProxySQL Tools version:
# proxysql-tool --version
0.3.10
  • Operating System: CentOS 7

Description

Tried to move VIP

What I Did

[root@ip-172-31-7-245 proxysql]# proxysql-tool aws notify_master
Traceback (most recent call last):
  File "/bin/proxysql-tool", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/proxysql_tools/cli.py", line 88, in notify_master
    aws_notify_master(cfg)
  File "/usr/lib/python2.7/site-packages/proxysql_tools/aws/aws.py", line 153, in aws_notify_master
    network_interface = get_network_interface(ip)
  File "/usr/lib/python2.7/site-packages/proxysql_tools/aws/aws.py", line 30, in get_network_interface
    ip,
  File "/usr/lib/python2.7/site-packages/botocore/client.py", line 310, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/lib/python2.7/site-packages/botocore/client.py", line 586, in _make_api_call
    operation_model, request_dict)
  File "/usr/lib/python2.7/site-packages/botocore/endpoint.py", line 141, in make_request
    return self._send_request(request_dict, operation_model)
  File "/usr/lib/python2.7/site-packages/botocore/endpoint.py", line 170, in _send_request
    success_response, exception):
  File "/usr/lib/python2.7/site-packages/botocore/endpoint.py", line 249, in _needs_retry
    caught_exception=caught_exception, request_dict=request_dict)
  File "/usr/lib/python2.7/site-packages/botocore/hooks.py", line 227, in emit
    return self._emit(event_name, kwargs)
  File "/usr/lib/python2.7/site-packages/botocore/hooks.py", line 210, in _emit
    response = handler(**kwargs)
  File "/usr/lib/python2.7/site-packages/botocore/retryhandler.py", line 183, in __call__
    if self._checker(attempts, response, caught_exception):
  File "/usr/lib/python2.7/site-packages/botocore/retryhandler.py", line 251, in __call__
    caught_exception)
  File "/usr/lib/python2.7/site-packages/botocore/retryhandler.py", line 277, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/lib/python2.7/site-packages/botocore/retryhandler.py", line 317, in __call__
    caught_exception)
  File "/usr/lib/python2.7/site-packages/botocore/retryhandler.py", line 223, in __call__
    attempt_number, caught_exception)
  File "/usr/lib/python2.7/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
botocore.vendored.requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='ec2.us-west-2.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPSConnection object at 0x28c5e50>, 'Connection to ec2.us-west-2.amazonaws.com timed out. (connect timeout=60)'))

make a donor node available during SST if there are no other nodes.

  • ProxySQL Tools version: 0.3.4
  • Python version: Python 2.7.5

Description

If only one node available it becomes OFFLINE_SOFT when the second node triggers SST.
In this case the first node should be still available.

What I Did

Two nodes out of three are down. When starting a second node the donor becomes OFFLINE_SOFT and doesn't server incoming requests.

mysql> select * from mysql_servers\G
*************************** 1. row ***************************
       hostgroup_id: 10
           hostname: a.b.c.d
               port: 3306
             status: OFFLINE_SOFT
             weight: 1
        compression: 0
    max_connections: 10000
max_replication_lag: 0
            use_ssl: 0
     max_latency_ms: 0
            comment: Writer
*************************** 3. row ***************************
       hostgroup_id: 11
           hostname: a.b.c.d
               port: 3306
             status: OFFLINE_SOFT
             weight: 1
        compression: 0
    max_connections: 10000
max_replication_lag: 0
            use_ssl: 0
     max_latency_ms: 0
            comment: Reader
3 rows in set (0.00 sec)

Two nodes down, but one of them is still in status ONLINE

  • ProxySQL Tools version: 0.3.10

Description

If two nodes out of three are down, proxysql-tool galera register sets OFFLINE_HARD one of them (as it should), but other one is still ONLINE

What I Did

[root@node2 mysql]# systemctl stop mysql
[root@node2 mysql]#
[root@node3 mysql]# systemctl stop mysql
[root@node3 mysql]#

[root@proxysql proxysql_tools]# proxysql-tool galera register
2017-08-31 05:01:33,077: ERROR: load_balancing_mode.check_backend():284: (2003, "Can't connect to MySQL server on '192.168.90.3' ([Errno 111] Connection refused)")
2017-08-31 05:01:33,078: ERROR: load_balancing_mode.check_backend():287: Looks like backend hostgroup_id=11, hostname=192.168.90.3, port=3306, status=OFFLINE_HARD, weight=1, compression=0, max_connections=10000, max_replication_lag=0, use_ssl=False, max_latency_ms=0, comment={"admin_status": "OFFLINE_HARD", "role": "Reader"} is unhealthy. Set OFFLINE_HARD status.
2017-08-31 05:01:33,086: ERROR: cli.register():102: Failed to talk to database: (2003, "Can't connect to MySQL server on '192.168.90.3' ([Errno 111] Connection refused)")

[root@proxysql proxysql_tools]# proxysql-tool galera server status
2017-08-31 05:04:14,827: INFO: server.server_status():44: Writers:
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+
| hostgroup_id | hostname     | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment                                  |
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+
|           10 | 192.168.90.2 | 3306 | ONLINE |      1 |           0 |           10000 |                   0 |   False |              0 | {"admin_status": null, "role": "Writer"} |
+--------------+--------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+------------------------------------------+
2017-08-31 05:04:14,832: INFO: server.server_status():44: Readers:
+--------------+--------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+----------------------------------------------------+
| hostgroup_id | hostname     | port |       status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment                                            |
+--------------+--------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+----------------------------------------------------+
|           11 | 192.168.90.3 | 3306 | OFFLINE_HARD |      1 |           0 |           10000 |                   0 |   False |              0 | {"admin_status": "OFFLINE_HARD", "role": "Reader"} |
|           11 | 192.168.90.4 | 3306 |       ONLINE |      1 |           0 |           10000 |                   0 |   False |              0 | {"admin_status": null, "role": "Reader"}           |
+--------------+--------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+----------------------------------------------------+

Add option to register users with ProxySQL

  • ProxySQL Tools version: 0.2.13
  • Python version: 2.7
  • Operating System: CentOS 7

Description

proxysql-tool should automatically register users in mysql.users table with ProxySQL.
A config option is needed so that it can set the appropriate default_hostgroup for users. This would allow query routing by users.

Node becomes OFFLINE_HARD when taking backup

  • ProxySQL Tools version: 0.2.12

Description

When twindb-backup takes a backup from a node, the node's status is OFFLINE_HARD, but should be OFFLINE_SOFT

What I Did

node-2 # twindb-backup daily
db-prod-proxy02> select * from mysql_servers;
+--------------+------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname   | port | status       | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| 10           | node-2     | 3306 | OFFLINE_HARD | 1      | 0           | 10000           | 0                   | 0       | 0              |         |

Warning: (1231, "'wsrep_desync' is already OFF.")

  • ProxySQL Tools version: 0.3.10

Description

There is a warning during integration test run

What I Did

[root@docker proxysql_tools]# make test-integration
...
tests/integration/galera/test_set_sync.py::test__galera_server_set_sync
  /usr/lib64/python2.7/site-packages/pymysql/cursors.py:323: Warning: (1231, "'wsrep_desync' is already OFF.")
    self._do_get_result()

galera register crashes if mysql unresponsive or error

  • ProxySQL Tools version:

Description

If MySQL node is not available of whatever reason (no connection, too many connections, other error) proxysql-tool galera register crashes with stack

2017-05-31 11:21:37,105: ERROR: galera_manager.refresh_and_validate_node_state():116: Node 10.0.52.98:3306 state could not be fetched
Traceback (most recent call last):
  File "/bin/proxysql-tool", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/proxysql_tools/cli.py", line 128, in register
    galera_cfg):
  File "/usr/lib/python2.7/site-packages/proxysql_tools/galera.py", line 39, in register_cluster_with_proxysql
    galera_man = fetch_galera_manager(galera_cfg)
  File "/usr/lib/python2.7/site-packages/proxysql_tools/galera.py", line 287, in fetch_galera_manager
    galera_man.discover_cluster_nodes()
  File "/usr/lib/python2.7/site-packages/proxysql_tools/managers/galera_manager.py", line 49, in discover_cluster_nodes
    self.refresh_and_validate_node_state(initial_node)
  File "/usr/lib/python2.7/site-packages/proxysql_tools/managers/galera_manager.py", line 117, in refresh_and_validate_node_state
    raise GaleraNodeUnknownState(e.messages)
AttributeError: 'OperationalError' object has no attribute 'messages'

Gracefull handle empty backends list

  • ProxySQL Tools version: 0.3.9

Description

If mysql_servers table is empty proxysql-tool crashes. It should just throw a warning message.

What I Did

# proxysql-tool galera server status
2017-07-10 00:18:41,949: INFO: server.server_status():31: Writers:
Traceback (most recent call last):
  File "/bin/proxysql-tool", line 9, in <module>
    load_entry_point('proxysql-tools==0.3.9', 'console_scripts', 'proxysql-tool')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/proxysql_tools/cli.py", line 140, in status
    server_status(cfg)
  File "/usr/lib/python2.7/site-packages/proxysql_tools/galera/server.py", line 32, in server_status
    for backend in proxysql.find_backends(hostgroup_id):
  File "/usr/lib/python2.7/site-packages/proxysql_tools/proxysql/proxysql.py", line 316, in find_backends
    raise ProxySQLBackendNotFound('Can not find any backends')
proxysql_tools.proxysql.exceptions.ProxySQLBackendNotFound: Can not find any backends
[root@proxysql vagrant]#

Newly created users don't persist on disk.

  • ProxySQL Tools version: 0.3.10
  • Python version: Python 2.7.13

Description

Newly created users don't persist on disk.

What I Did

Create user.

proxysql-tool galera user create root --default_hostgroup 200 --password **** --transaction_persistent

Restart proxy. After the restart user is missing.

Warning: (1681, "'PASSWORD' is deprecated and will be removed in a future release.")

  • ProxySQL Tools version: 0.3.10

Description

There is a warning during integration test run

What I Did

[root@docker proxysql_tools]# make test-integration
...
tests/integration/galera/user/test_set_password.py::test__galera_user_set_password_if_user_is_exist
  /usr/lib64/python2.7/site-packages/pymysql/cursors.py:323: Warning: (1681, "'PASSWORD' is deprecated and will be removed in a future release.")
    self._do_get_result()

When deregistering node from proxysql, delete them

  • ProxySQL Tools version: 0.2.13
  • Python version: 2.7
  • Operating System: CentOS 7

Description

When proxysql-tool deregisters a node, due to writer node failover or some other condition related to a node becoming unhealthy, then it sets the node status to OFFLINE_HARD.
Instead proxysql-tool should simply delete the record from the table, otherwise it can get confusing.

Write log to file

  • ProxySQL Tools version: 0.3.10
  • Python version: n/a
  • Operating System: n/a

Description

notify_master must write log to file

Save config after user is created

  • ProxySQL Tools version: 0.3.10

Description

When user is created it is created in memory but not saved to disk.
Also, if user is created only users should be reloaded

split reload_runtime()

  • ProxySQL Tools version: 0.3.10

Description

Current implementation is

def reload_runtime(self):
        """Reload the ProxySQL runtime configuration."""
        self.execute('LOAD MYSQL SERVERS TO RUNTIME')
        self.execute('LOAD MYSQL USERS TO RUNTIME')
        self.execute('LOAD MYSQL VARIABLES TO RUNTIME')

It should be split in

def reload_runtime(self):
        """Reload the ProxySQL runtime configuration."""
        self.reload_servers()
        self.reload_users()
        self.reload_variables()

TypeError: bug1258464killer() got multiple values for keyword argument 'default_file'

  • ProxySQL Tools version: 0.3.4
  • Python version: 2.7.5
  • Operating System: CentOS 7

Description

proxysql-tool galera bug1258464killer crashes.

What I Did

# proxysql-tool galera bug1258464killer
Traceback (most recent call last):
  File "/bin/proxysql-tool", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
TypeError: bug1258464killer() got multiple values for keyword argument 'default_file'

Readers OFFLINE_SOFT, writer not in readers group

  • ProxySQL Tools version: 0.3.0

Description

When two readers become OFFLINE_SOFT the remaining writer node doesn't get assigned to a readers host group.

What I Did

  • Set two out of three nodes in desync state: set global wsrep_desync=ON;.
  • Wait until a next proxysql-tool galera register run.
  • Check mysql_servers table:
mysql> select * from mysql_servers;
+--------------+--------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname     | port | status       | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+--------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| 10           | xxx.yy.9.31  | 3306 | ONLINE       | 1      | 0           | 10000           | 0                   | 0       | 0              |         |
| 20           | xxx.yy.6.22  | 3307 | ONLINE       | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
| 11           | xxx.yy.5.172 | 3306 | OFFLINE_SOFT | 1      | 0           | 10000           | 0                   | 0       | 0              |         |
| 11           | xxx.yy.6.22  | 3306 | OFFLINE_SOFT | 1      | 0           | 10000           | 0                   | 0       | 0              |         |
+--------------+--------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.