Yuvipanda has uploaded a new change for review.

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

Change subject: Just do a $webservice restart
......................................................................

Just do a $webservice restart

The appropriate webservice commands will read service.manifest
and do the appropriate things.

Change-Id: Ia5b93f0a361e76e24fcedef1b99b2fb32e52f0cc
---
M tools/manifest/webservicemonitor.py
1 file changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest 
refs/changes/88/284088/1

diff --git a/tools/manifest/webservicemonitor.py 
b/tools/manifest/webservicemonitor.py
index 878e11f..0c0127d 100644
--- a/tools/manifest/webservicemonitor.py
+++ b/tools/manifest/webservicemonitor.py
@@ -16,20 +16,20 @@
 
     def _start_webservice(self, manifest):
         self.log.info('Starting webservice for tool %s', manifest.tool.name)
+
+        command = [
+            '/usr/bin/sudo',
+            '-i', '-u', manifest.tool.username
+        ]
         if manifest.version == 1:
-            command = '/usr/local/bin/webservice'
+            command.append('/usr/local/bin/webservice')
         else:
-            command = '/usr/bin/webservice-new'
+            command.append('/usr/bin/webservice-new')
+        # Restart instead of start so they get restarted even if they are 
running in zombie state
+        command.append('restart')
         manifest.record_starting()
         try:
-            subprocess.check_output([
-                '/usr/bin/sudo',
-                '-i', '-u', manifest.tool.username,
-                command,
-                '--release', manifest.webservice_release,
-                manifest.webservice_server,
-                'restart'  # Restart instead of start so they get restarted 
even if they are running in zombie state
-            ], timeout=15)  # 15 second timeout!
+            subprocess.check_output(command, timeout=15)  # 15 second timeout!
             self.log.info('Started webservice for %s', manifest.tool.name)
             return True
         except subprocess.CalledProcessError as e:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5b93f0a361e76e24fcedef1b99b2fb32e52f0cc
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <yuvipa...@wikimedia.org>

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

Reply via email to