Muehlenhoff has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/373048 )
Change subject: Reduce information density for restarts
......................................................................
Reduce information density for restarts
The PID isn't very useful since it's different on each host and only
makes the result noisy.
Change-Id: Ic0f7f3bc0fa766f8223b05830390400c29c80189
---
M clients/debdeploy-restarts
1 file changed, 6 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/debs/debdeploy
refs/changes/48/373048/1
diff --git a/clients/debdeploy-restarts b/clients/debdeploy-restarts
index f36e982..5cf2293 100755
--- a/clients/debdeploy-restarts
+++ b/clients/debdeploy-restarts
@@ -117,20 +117,18 @@
procname, pid, fname = (i)
for libname in args.libname:
if fname.find(libname) != -1:
- if not restarts_needed.get(procname, None):
- restarts_needed[procname] = {}
-
- if not restarts_needed[procname].get(pid, None):
- restarts_needed[procname][pid] = []
-
- restarts_needed[procname][pid].append(fname)
+ if not restarts_needed.get(fname, None):
+ restarts_needed[fname] = set()
+ restarts_needed[fname].add(procname)
+ else:
+ restarts_needed[fname].add(procname)
if len(restarts_needed) == 0:
return result("OK", "No service needs a restart", args.json)
else:
logger.info("These services need a restart:")
for i in restarts_needed:
- logger.info(i + " (" + str(len(restarts_needed[i].keys())) + "
processes)")
+ logger.info(i + " (" + str(len(restarts_needed)) + " processes)")
return result("OK", restarts_needed, args.json)
--
To view, visit https://gerrit.wikimedia.org/r/373048
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0f7f3bc0fa766f8223b05830390400c29c80189
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/debdeploy
Gerrit-Branch: master
Gerrit-Owner: Muehlenhoff <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits