Andrew Bogott has submitted this change and it was merged.
Change subject: Don't send puppet nags to the novaadmin user.
......................................................................
Don't send puppet nags to the novaadmin user.
Bug: T124516
Change-Id: Iddf913109e1e9752159a855f72c7ef330ce66d97
---
M modules/base/files/labs/puppetalert.py
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
Andrew Bogott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/base/files/labs/puppetalert.py
b/modules/base/files/labs/puppetalert.py
index facd0e2..9fe6df0 100755
--- a/modules/base/files/labs/puppetalert.py
+++ b/modules/base/files/labs/puppetalert.py
@@ -28,6 +28,10 @@
# Nag if it's been 24 hours since the last puppet run
NAG_INTERVAL = 60 * 60 * 24
+# Don't bother to notify the novaadmin user; that just
+# sends spam to ops@
+USER_IGNORE_LIST = ['uid=novaadmin,ou=people,dc=wikimedia,dc=org']
+
with open('/etc/wmflabs-project') as f:
PROJECT_NAME = f.read().strip()
@@ -75,6 +79,9 @@
admins = adminrec[0][1]['roleOccupant']
for admin in admins:
+ if admin.lower() in USER_IGNORE_LIST:
+ continue
+
userrec = conn.search_s(admin, ldap.SCOPE_BASE)
email = userrec[0][1]['mail'][0]
--
To view, visit https://gerrit.wikimedia.org/r/266192
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iddf913109e1e9752159a855f72c7ef330ce66d97
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Tim Landscheidt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits