warn that rss requires e2d; closes #1104

This commit is contained in:
ed 2025-12-14 17:17:44 +00:00
parent fecc3fd507
commit 921954037b

View file

@ -2616,18 +2616,16 @@ class AuthSrv(object):
vol.flags[k] = int(vol.flags[k]) vol.flags[k] = int(vol.flags[k])
if "e2d" not in vol.flags: if "e2d" not in vol.flags:
if "lifetime" in vol.flags: zs = "lifetime rss"
t = 'removing lifetime config from volume "/{}" because e2d is disabled' drop = [x for x in zs.split() if x in vol.flags]
self.log(t.format(vol.vpath), 1)
del vol.flags["lifetime"]
needs_e2d = [x for x in hooks if x in ("xau", "xiu")] zs = "xau xiu"
drop = [x for x in needs_e2d if vol.flags.get(x)] drop += [x for x in zs.split() if vol.flags.get(x)]
if drop:
t = 'removing [{}] from volume "/{}" because e2d is disabled' for k in drop:
self.log(t.format(", ".join(drop), vol.vpath), 1) t = 'cannot enable [%s] for volume "/%s" because this requires one of the following: e2d / e2ds / e2dsa (either as volflag or global-option)'
for x in drop: self.log(t % (k, vol.vpath), 1)
vol.flags.pop(x) vol.flags.pop(k)
zi = vol.flags.get("lifetime") or 0 zi = vol.flags.get("lifetime") or 0
zi2 = time.time() // (86400 * 365) zi2 = time.time() // (86400 * 365)