As reported by our colleagues at AU (thanks @Bjarke42 ) the janitor fails with log messages like:
2026-06-04 08:37:57,746 INFO handle any pending janitor tasks
2026-06-04 08:37:57,747 ERROR (415) Caught unexpected exception: [Errno 2] No such file or directory: '/PATH/TO/mig/state/twofactor_home/1.2.3.4_RANDOMSESSIONID'
in the regular 2fa clean up on GDP-mode sites.
It looks like the os.path.getmtime(tmp_path) lookup failing when it encounters a dead session symlink in _clean_stale_state_files from clean_twofactor_sessions. It should probably be adjusted to clean up both the symlink and the session file on GDP-mode sites, but at least fail gracefully if such dead links are expected and encountered.
As reported by our colleagues at AU (thanks @Bjarke42 ) the janitor fails with log messages like:
in the regular 2fa clean up on GDP-mode sites.
It looks like the
os.path.getmtime(tmp_path)lookup failing when it encounters a dead session symlink in_clean_stale_state_filesfromclean_twofactor_sessions. It should probably be adjusted to clean up both the symlink and the session file on GDP-mode sites, but at least fail gracefully if such dead links are expected and encountered.