You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
@itkovian thoughts? i'm in favour of adding the retired state to the serialised storage json from the AP, but not sure if it deserves lots of time/effort atm.
--- /usr/lib/python2.7/site-packages/vsc/administration/ldapsync.py 2020-09-23 13:52:27.080665201 +0200
+++ /root/ldapsync.py_1.3.0 2020-09-17 12:59:59.962371269 +0200
@@ -152,8 +152,7 @@
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'):
- if (('muk' not in quota['storage']['name'].lower()) and
- ('theia' not in quota['storage']['name'].lower() and str(account.person.institute['name']) == 'leuven')):
+ 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)
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
The text was updated successfully, but these errors were encountered: