Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.2.2
-
None
-
MXS-SPRINT-103
Description
If altering server address to an invalid address, the monitor does not take address to use unless the monitor is stopped and restarted.
MaxScale> list servers
|
Servers.
|
-------------------+-----------------+-------+-------------+--------------------
|
Server | Address | Port | Connections | Status
|
-------------------+-----------------+-------+-------------+--------------------
|
LocalMaster1 | 127.0.0.1 | 3001 | 0 | Master, Running
|
LocalSlave1 | 127.0.0.1 | 3002 | 0 | Slave, Running
|
LocalSlave2 | 127.0.0.1 | 3003 | 0 | Slave, Running
|
-------------------+-----------------+-------+-------------+--------------------
|
MaxScale> alter server LocalMaster1 address=nowhere
|
MaxScale> list servers
|
Servers.
|
-------------------+-----------------+-------+-------------+--------------------
|
Server | Address | Port | Connections | Status
|
-------------------+-----------------+-------+-------------+--------------------
|
LocalMaster1 | nowhere | 3001 | 0 | Master, Running
|
LocalSlave1 | 127.0.0.1 | 3002 | 0 | Slave, Running
|
LocalSlave2 | 127.0.0.1 | 3003 | 0 | Slave, Running
|
-------------------+-----------------+-------+-------------+--------------------
|
MaxScale> call command mariadbmon switchover MariaDB-Monitor LocalSlave1
|
MaxScale> list servers
|
Servers.
|
-------------------+-----------------+-------+-------------+--------------------
|
Server | Address | Port | Connections | Status
|
-------------------+-----------------+-------+-------------+--------------------
|
LocalMaster1 | nowhere | 3001 | 0 | Slave, Running
|
LocalSlave1 | 127.0.0.1 | 3002 | 0 | Master, Running
|
LocalSlave2 | 127.0.0.1 | 3003 | 0 | Slave, Running
|
-------------------+-----------------+-------+-------------+--------------------
|
MaxScale> shutdown monitor MariaDB-Monitor
|
MaxScale> restart monitor MariaDB-Monitor
|
MaxScale> list servers
|
Servers.
|
-------------------+-----------------+-------+-------------+--------------------
|
Server | Address | Port | Connections | Status
|
-------------------+-----------------+-------+-------------+--------------------
|
LocalMaster1 | nowhere | 3001 | 0 | Down
|
LocalSlave1 | 127.0.0.1 | 3002 | 1 | Master, Running
|
LocalSlave2 | 127.0.0.1 | 3003 | 1 | Slave, Running
|
-------------------+-----------------+-------+-------------+--------------------
|
MaxScale> alter server LocalMaster1 address=127.0.0.1
|
MaxScale> list servers
|
Servers.
|
-------------------+-----------------+-------+-------------+--------------------
|
Server | Address | Port | Connections | Status
|
-------------------+-----------------+-------+-------------+--------------------
|
LocalMaster1 | 127.0.0.1 | 3001 | 0 | Slave, Running
|
LocalSlave1 | 127.0.0.1 | 3002 | 1 | Master, Running
|
LocalSlave2 | 127.0.0.1 | 3003 | 1 | Slave, Running
|
-------------------+-----------------+-------+-------------+--------------------
|
The router does detect the error immediately.