jenkins-bot has submitted this change and it was merged.
Change subject: Support specifying portnames with hostnames
......................................................................
Support specifying portnames with hostnames
Change-Id: If9e1cfaccdeb020a99a6f84cae8db34d706986ac
---
M labsdb/auditor/runner.py
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Yuvipanda: Looks good to me, approved
jenkins-bot: Verified
diff --git a/labsdb/auditor/runner.py b/labsdb/auditor/runner.py
index f80bb06..3354de3 100644
--- a/labsdb/auditor/runner.py
+++ b/labsdb/auditor/runner.py
@@ -41,8 +41,12 @@
def run(self):
all_reports = []
for host in self.config['hosts']:
+ if ':' in host:
+ hostname, port = host.split(':')
+ else:
+ hostname, port = host, 3306
logging.info('Generating reports for host %s', host)
- conn = MySQLdb.connect(host=host, read_default_file='~/.my.cnf')
+ conn = MySQLdb.connect(host=hostname, port=int(port),
read_default_file='~/.my.cnf')
host_report = {
'host': host,
--
To view, visit https://gerrit.wikimedia.org/r/185848
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If9e1cfaccdeb020a99a6f84cae8db34d706986ac
Gerrit-PatchSet: 6
Gerrit-Project: operations/software/labsdb-auditor
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits