From 316137149f52ae1efe44e23faa559afa1480814d Mon Sep 17 00:00:00 2001 From: Andreas <andreasv@fsmpi.rwth-aachen.de> Date: Wed, 3 May 2017 23:33:57 +0200 Subject: [PATCH] fixed db status 500 error --- server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 3cf8f28..ba4a6b5 100644 --- a/server.py +++ b/server.py @@ -629,8 +629,11 @@ def dbstatus(): status = {} variables = {} for host in config.get('MYSQL_DBSTATUS_HOSTS', [])+[config.get('MYSQL_HOST', None)]: - for _host in show('SHOW VARIABLES LIKE "wsrep_cluster_address"', host=host)['wsrep_cluster_address'][len('gcomm://'):].split(','): - hosts.add(_host) + try: + for _host in show('SHOW VARIABLES LIKE "wsrep_cluster_address"', host=host)['wsrep_cluster_address'][len('gcomm://'):].split(','): + hosts.add(_host) + except: + pass for host in sorted(list(hosts)): try: status[host] = show('SHOW GLOBAL STATUS LIKE "wsrep%"', host=host) -- GitLab