[MXS-4425] Support config sync with Xpand Created: 2022-12-02  Updated: 2023-10-04  Resolved: 2023-10-04

Status: Closed
Project: MariaDB MaxScale
Component/s: N/A
Affects Version/s: 6.4.4
Fix Version/s: N/A

Type: New Feature Priority: Major
Reporter: Paul Rothrock Assignee: Todd Stoffel (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Environment:

Xpand 6.0.5, MaxScale 6.4.4


Issue Links:
Problem/Incident
Sprint: MXS-SPRINT-172

 Description   

Xpand doesn't have a mysql database and it does not implement the current set of JSON functions that MaxScale uses. Support for config synchronization can be added by making the database configurable (MXS-4499) and changing the SQL to do the JSON manipulation in MaxScale.


Original description:

Environment

  • Xpand 6.0.5
  • MaxScale Version: 6.4.4

Steps to Reproduce

1. Set up Xpand and then run this SQL:

CREATE DATABASE mysql;
GRANT ALL on mysql.* TO 'sync_user'@'%' IDENTIFIED BY 'secure_password';

2. Set up MaxScale Clustering with this config:

# Globals
[maxscale]
config_sync_cluster = XpandMonitor
config_sync_user = sync_user
config_sync_password = secure_password

3. View the MaxScale Logs

Observed Behavior

This error is repeated every five seconds:

2022-12-02 21:44:29   warning: (ConfigManager); Failed to update node state to ‘Failed to update server ‘XpandBootstrap’’ for hostname ‘ip-10-0-0-48.us-east-2.compute.internal’: Query ‘UPDATE mysql.maxscale_config SET nodes = JSON_SET(nodes, CONCAT(‘$.’, JSON_QUOTE(‘ip-10-0-0-48.us-east-2.compute.internal’)), ‘Failed to update server \’XpandBootstrap\’’) WHERE version = 1 AND cluster = ‘XpandMonitor’’ failed. Error 1046: [11285] No database selected.

Also, the record is not updated in mysql.maxscale_config



 Comments   
Comment by markus makela [ 2022-12-08 ]

This looks like a bug in Xpand where it requires a default database for some part of that query whereas in MariaDB the query executes successfully without a default database. We might have to add a workaround to this that does a USE mysql before proceeding with the query.

Xpand doesn't support JSON functions which means the configuration synchronization won't work with it.

Comment by Christine Lieu (Inactive) [ 2022-12-09 ]

Xpand does not support JSON_SET: https://mariadb.com/docs/xpand/sql/features/json/xpand/

Comment by markus makela [ 2023-02-08 ]

Reopened this as a feature request.

Generated at Thu Feb 08 04:28:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.