Rush has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370217 )

Change subject: labsdb: maintain-views and maintain_meta-p sock option
......................................................................


labsdb: maintain-views and maintain_meta-p sock option

Bug: T172496
Change-Id: I4f35960f6718550f425d5d57e6cc7f92393b31c1
---
M modules/role/files/labs/db/views/maintain-meta_p.py
M modules/role/files/labs/db/views/maintain-views.py
2 files changed, 15 insertions(+), 2 deletions(-)

Approvals:
  Rush: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/role/files/labs/db/views/maintain-meta_p.py 
b/modules/role/files/labs/db/views/maintain-meta_p.py
index 2963d4e..787f14b 100644
--- a/modules/role/files/labs/db/views/maintain-meta_p.py
+++ b/modules/role/files/labs/db/views/maintain-meta_p.py
@@ -153,6 +153,12 @@
     )
 
     argparser.add_argument(
+        "--mysql-socket",
+        help=("Path to MySQL socket file"),
+        default="/tmp/mysql.sock"
+    )
+
+    argparser.add_argument(
         '--debug',
         help='Turn on debug logging',
         action='store_true'
@@ -177,7 +183,7 @@
     dbh = pymysql.connect(
         user=config["mysql_user"],
         passwd=config["mysql_password"],
-        unix_socket="/tmp/mysql.sock",
+        unix_socket=args.mysql_socket,
         charset="utf8"
     )
 
diff --git a/modules/role/files/labs/db/views/maintain-views.py 
b/modules/role/files/labs/db/views/maintain-views.py
index 1f793f7..3905420 100644
--- a/modules/role/files/labs/db/views/maintain-views.py
+++ b/modules/role/files/labs/db/views/maintain-views.py
@@ -329,6 +329,13 @@
               " values can be given space-separated."),
         default="/usr/local/lib/mediawiki-config"
     )
+
+    argparser.add_argument(
+        "--mysql-socket",
+        help=("Path to MySQL socket file"),
+        default="/tmp/mysql.sock"
+    )
+
     argparser.add_argument(
         '--debug',
         help='Turn on debug logging',
@@ -376,7 +383,7 @@
     dbh = pymysql.connect(
         user=config["mysql_user"],
         passwd=config["mysql_password"],
-        unix_socket="/tmp/mysql.sock",
+        unix_socket=args.mysql_socket,
         charset="utf8"
     )
 

-- 
To view, visit https://gerrit.wikimedia.org/r/370217
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f35960f6718550f425d5d57e6cc7f92393b31c1
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush <r...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Rush <r...@wikimedia.org>
Gerrit-Reviewer: Volans <rcocci...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to