Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jannik Hellenkamp
website
Commits
31613714
Commit
31613714
authored
May 03, 2017
by
Andreas Valder
Browse files
fixed db status 500 error
parent
dbe16b57
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
31613714
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment