Ryan Lane has submitted this change and it was merged.

Change subject: Make restart runner and info util more dependable
......................................................................


Make restart runner and info util more dependable

Change-Id: I59033d7ed594735623f917ad5696700d79339b01
---
M modules/deployment/files/git-deploy/utils/service-restart
M modules/deployment/files/runners/deploy.py
2 files changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/modules/deployment/files/git-deploy/utils/service-restart 
b/modules/deployment/files/git-deploy/utils/service-restart
index 66c3774..856e520 100644
--- a/modules/deployment/files/git-deploy/utils/service-restart
+++ b/modules/deployment/files/git-deploy/utils/service-restart
@@ -66,11 +66,15 @@
         raise SystemExit(1)
     minion_data = minion_data['local']
     for i in minion_data:
-        for minion, data in i.items():
-            try:
-                LOG.info('{0}: {1}'.format(minion, data['status']))
-            except KeyError:
-                LOG.info('{0}: No status available'.format(minion))
+        try:
+            for minion, data in i.items():
+                try:
+                    LOG.info('{0}: {1}'.format(minion, data['status']))
+                except KeyError:
+                    LOG.info('{0}: No status available'.format(minion))
+        except AttributeError:
+            LOG.error('Got bad return from salt. Here is the raw data:')
+            LOG.error('{}'.format(i))
 
 if __name__ == "__main__":
     main()
diff --git a/modules/deployment/files/runners/deploy.py 
b/modules/deployment/files/runners/deploy.py
index 6f2ec33..9a5db48 100755
--- a/modules/deployment/files/runners/deploy.py
+++ b/modules/deployment/files/runners/deploy.py
@@ -68,7 +68,7 @@
     arg = (repo,)
     ret = []
     for data in client.cmd_batch(grain, cmd, expr_form='grain', arg=arg,
-                                 timeout=30, ret='deploy_redis', batch=batch):
+                                 timeout=60, ret='deploy_redis', batch=batch):
         ret.append(data)
     print "Restart completed"
     return ret

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59033d7ed594735623f917ad5696700d79339b01
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ryan Lane <rl...@wikimedia.org>
Gerrit-Reviewer: Ryan Lane <rl...@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