Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201352

Change subject: tools: Make webservice2 accept old style -{server} arguments
......................................................................

tools: Make webservice2 accept old style -{server} arguments

Is a hack, should go away at some point!

Bug: T90855
Change-Id: I8ea623e8f8fd43da2158bd8db60b9c33dea065c7
---
M modules/toollabs/files/webservice2
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/201352/1

diff --git a/modules/toollabs/files/webservice2 
b/modules/toollabs/files/webservice2
index 7a277a5..54a75ed 100644
--- a/modules/toollabs/files/webservice2
+++ b/modules/toollabs/files/webservice2
@@ -136,6 +136,7 @@
     ), '4g'
 ).strip()
 
+
 def main():
     parser = argparse.ArgumentParser()
     parser.add_argument('server', help='Type of server to start',
@@ -146,7 +147,13 @@
     parser.add_argument('--release',
                         help='Which Ubuntu release the node running the 
webservice sould be on',
                         choices=['precise', 'trusty'], default='trusty')
-    args = parser.parse_args()
+
+    # Compat with 'old style' webservice params, which were '-lighttpd' and 
'-tomcat'
+    # Only support lighttpd and tomcat because old webservice only supported 
those
+    # FIXME: Instrument this, get rid of old style callers, and get rid of 
this hack
+    hacked_args = [arg.strip('-') if arg in ('-lighttpd', '-tomcat') else arg
+                   for arg in sys.argv[1:]]
+    args = parser.parse_args(hacked_args)
 
     job_name = '%s-%s' % (args.server, TOOL) # Format for job names. one tool 
can have only one job running on webgrid
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ea623e8f8fd43da2158bd8db60b9c33dea065c7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to