Skip to content

Commit 6c42799

Browse files
author
Athanasios Koukoulis
committed
Added missing gtid_port to proxysql_backend_servers module
1 parent defeeae commit 6c42799

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

plugins/modules/proxysql_backend_servers.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
- The port at which the mysqld instance can be contacted.
3232
type: int
3333
default: 3306
34+
gtid_port:
35+
description:
36+
- The backend server port where ProxySQL Binlog Reader listens on for GTID tracking
37+
type: int
3438
status:
3539
description:
3640
- ONLINE - Backend server is fully operational.
@@ -150,6 +154,7 @@
150154
"max_latency_ms": "0",
151155
"max_replication_lag": "0",
152156
"port": "3306",
157+
"gtid_port": "0",
153158
"status": "ONLINE",
154159
"use_ssl": "0",
155160
"weight": "1"
@@ -181,6 +186,12 @@ def perform_checks(module):
181186
msg="port must be a valid unix port number (0-65535)"
182187
)
183188

189+
if module.params["gtid_port"] < 0 \
190+
or module.params["gtid_port"] > 65535:
191+
module.fail_json(
192+
msg="gtid_port must be a valid unix port number (0-65535)"
193+
)
194+
184195
if module.params["compression"]:
185196
if module.params["compression"] < 0 \
186197
or module.params["compression"] > 102400:
@@ -207,7 +218,8 @@ def __init__(self, module):
207218
self.hostname = module.params["hostname"]
208219
self.port = module.params["port"]
209220

210-
config_data_keys = ["status",
221+
config_data_keys = ["gtid_port",
222+
"status",
211223
"weight",
212224
"compression",
213225
"max_connections",
@@ -413,6 +425,7 @@ def main():
413425
hostgroup_id=dict(default=0, type='int'),
414426
hostname=dict(required=True, type='str'),
415427
port=dict(default=3306, type='int'),
428+
gtid_port=dict(type='int'),
416429
status=dict(choices=['ONLINE',
417430
'OFFLINE_SOFT',
418431
'OFFLINE_HARD']),

0 commit comments

Comments
 (0)