Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
6.4.2
-
None
-
3 Node Xpand : Xpand-mainline1-17678
Maxscale Version : MaxScale 6.4.2 - 302d0d88ee2524cdc53f4c4584f1ed3ef0caffa1
-
MXS-SPRINT-163
Description
When the Xpand monitor creates a dynamic server, the settings of the bootstrap servers are not correctly propagated to the dynamic server.
Further, the Xpand monitor does not detect if the bootstrap servers have different settings, leading to a situation where it is unclear what settings the dynamic servers should have. The monitor should detect such a situation and refuse to start.
Original description:
Issue :
====
Issue is more specific to Bootstrap1's proxy_protocol parameter which is always getting set as True in below cases
Case1 : proxy_protocol=off explicitly mentioned under Bootstrap1
[root@karma075 ~]# cat /etc/maxscale.cnf
|
[maxscale]
|
log_info=1
|
threads=auto
|
logdir=/data/clustrix/log
|
|
[Bootstrap1]
|
type=server
|
address=10.2.15.126
|
port=3306
|
protocol=mariadbbackend
|
proxy_protocol=off
|
|
[Clustrix]
|
type=monitor
|
module=xpandmon
|
servers=Bootstrap1
|
user=maxscale
|
password=maxscale_pw
|
cluster_monitor_interval=10000ms
|
|
[RCR]
|
type=service
|
router=readconnroute
|
user=maxscale
|
password=maxscale_pw
|
cluster=Clustrix
|
|
[RCR-Listener]
|
type=listener
|
service=RCR
|
protocol=MariaDBClient
|
address=0.0.0.0
|
port=4008
|
Case2 : No proxy_protocol mentioned under Bootstrap1 section of maxscale.cnf . So
just remove "proxy_protocol=off" from Case1 maxscale.cnf
Output of maxctrl in both Case1 and Case2
[root@karma075 ~]# maxctrl show servers | grep 'Server\|proxy_protocol'
|
│ Server │ Bootstrap1 │
|
│ │ "proxy_protocol": true, │
|
│ Server │ @@Clustrix:node-3 │
|
│ │ "proxy_protocol": true, │
|
│ Server │ @@Clustrix:node-1 │
|
│ │ "proxy_protocol": true, │
|
│ Server │ @@Clustrix:node-2 │
|
│ │ "proxy_protocol": true, │
|
[root@karma075 ~]#
|
Imp Note : There are interesting Case3 and 4 too
Case3 : Declare all 3 nodes of Xpand as Bootstrap1 , Bootstrap2 and Bootstrap3 with proxy_protocol=off
[root@karma075 ~]# cat /etc/maxscale.cnf
|
[maxscale]
|
log_info=1
|
threads=auto
|
logdir=/data/clustrix/log
|
|
[Bootstrap1]
|
type=server
|
address=10.2.15.126
|
port=3306
|
protocol=mariadbbackend
|
proxy_protocol=off
|
|
[Bootstrap2]
|
type=server
|
address=10.2.15.143
|
port=3306
|
protocol=mariadbbackend
|
proxy_protocol=off
|
|
[Bootstrap3]
|
type=server
|
address=10.2.12.232
|
port=3306
|
protocol=mariadbbackend
|
proxy_protocol=off
|
|
[Clustrix]
|
type=monitor
|
module=xpandmon
|
servers=Bootstrap1,Bootstrap2,Bootstrap3
|
user=maxscale
|
password=maxscale_pw
|
cluster_monitor_interval=10000ms
|
|
[RCR]
|
type=service
|
router=readconnroute
|
user=maxscale
|
password=maxscale_pw
|
cluster=Clustrix
|
|
[RCR-Listener]
|
type=listener
|
service=RCR
|
protocol=MariaDBClient
|
address=0.0.0.0
|
port=4008
|
Case4 : No proxy_protocol mentioned under Bootstrap1 ,2, 3 sections of maxscale.cnf. So
just remove "proxy_protocol=off" from Case3 maxscale.cnf
Output of maxctrl in both Case3 and Case4
[root@karma075 ~]# maxctrl show servers | grep 'Server\|proxy_protocol'
|
│ Server │ Bootstrap2 │
|
|
│ │ "proxy_protocol": false, │
|
│ Server │ Bootstrap3 │
|
|
│ │ "proxy_protocol": false, │
|
│ Server │ Bootstrap1 │
|
|
│ │ "proxy_protocol": true, │
|
│ Server │ @@Clustrix:node-1 │
|
|
│ │ "proxy_protocol": false, │
|
│ Server │ @@Clustrix:node-3 │
|
|
│ │ "proxy_protocol": false, │
|
│ Server │ @@Clustrix:node-2 │
|
|
│ │ "proxy_protocol": false, │
|
[root@karma075 ~]#
|
Expected Fix :
==========
Correct value of proxy_protocol should be set for Bootstrap1 which in turn set correct value for the dynamically detected nodes