-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
ldapsync code will overwrite the scratchquota in ldap with any scratch storage quota, not only the default scratch one (inlc retired scratches).
to properly fix this, we need to do something. not sure how to filter for "default" scratch, but we should also at least filter out the retired scratches. for that the AP needs to add the retired state to the storage serialiser, so we can filter on it.
ideally, we can drop the storage quota from ldap, and sync straight from rest api (and use the exact storage name).
for now, this was fixed by hand by filtering any 'muk' from the quota parts
--- /usr/lib/python2.7/site-packages/vsc/administration/ldapsync.py~ 2020-06-09 11:34:19.000000000 +0200
+++ /usr/lib/python2.7/site-packages/vsc/administration/ldapsync.py 2020-08-26 14:04:55.144106363 +0200
@@ -152,7 +152,8 @@
for stype in ['home', 'data', 'scratch']:
# only gent sets filesets for vo's, so not gvo is user. (other institutes is empty or "None"
if quota['storage']['storage_type'] == stype and not quota['fileset'].startswith('gvo'):
- ldap_attributes['%sQuota' % stype] = ["%d" % quota["hard"]]
+ if 'muk' not in quota['storage']['name'].lower():
+ ldap_attributes['%sQuota' % stype] = ["%d" % quota["hard"]]
result = self.add_or_update(VscLdapUser, account.vsc_id, ldap_attributes, dry_run)
accounts[result].add(account.vsc_id)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels