Muehlenhoff has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/342826 )
Change subject: Add a delay in LDAP memberof rewrite script to cope with
replication
......................................................................
Add a delay in LDAP memberof rewrite script to cope with replication
Replication occurs every minute, so if we rewrite the group directly
after another, this isn't noticed by the replication host.
Bug: T142817
Change-Id: If9bdd2e246dcc4b04aee1c4bcd1e223a7f0f850c
---
M modules/ldap/files/rewrite-group-for-memberof
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/26/342826/1
diff --git a/modules/ldap/files/rewrite-group-for-memberof
b/modules/ldap/files/rewrite-group-for-memberof
index ef4fabc..4070973 100755
--- a/modules/ldap/files/rewrite-group-for-memberof
+++ b/modules/ldap/files/rewrite-group-for-memberof
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import ldap, argparse, sys
+import ldap, argparse, sys, time
from ldap import modlist as modlist
group_container = "ou=groups,dc=wikimedia,dc=org"
@@ -42,6 +42,7 @@
empty_ldif = modlist.modifyModlist(members, empty_group)
refill_ldif = modlist.modifyModlist(empty_group, members)
l.modify_s(dn, empty_ldif)
+ time.sleep(65)
l.modify_s(dn, refill_ldif)
except ldap.LDAPError, e:
print e
--
To view, visit https://gerrit.wikimedia.org/r/342826
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9bdd2e246dcc4b04aee1c4bcd1e223a7f0f850c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits