Bug 53851 - Cron fails to execute jobs of LDAP users
Cron fails to execute jobs of LDAP users
Status: NEW
Product: UCS
Classification: Unclassified
Component: General
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-29 18:05 CEST by Philipp Hahn
Modified: 2023-08-30 10:15 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.057
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): bitesize
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2021-09-29 18:05:06 CEST
`cron.service` does not declare a After-dependency on nss-user-lookup.target.
Because of that cron.service is started before NSS is ready to resolve users from LDAP.
`cron` parses its files in `/etc/cron*` on start and drops all jobs of users, which are un-resolvable.
They are never executed until `cron` is restarted.
This lead to some services never being executed after a `reboot` until this is manually fixed.

# journalctl -b 0 -u cron.service
-- Logs begin at Mon 2021-09-06 11:25:01 CEST, end at Wed 2021-09-29 17:54:31 CEST. --
Sep 18 09:12:40 ladda systemd[1]: Started Regular background program processing daemon.
Sep 18 09:12:40 ladda cron[454]: (CRON) INFO (pidfile fd = 3)
Sep 18 09:12:40 ladda cron[454]: nss-ldap: do_open: do_start_tls failed:stat=-1
Sep 18 09:12:40 ladda cron[454]: nss_ldap: reconnecting to LDAP server...
Sep 18 09:12:40 ladda cron[454]: nss-ldap: do_open: do_start_tls failed:stat=-1
Sep 18 09:12:40 ladda cron[454]: nss_ldap: reconnecting to LDAP server (sleeping 1 seconds)...
Sep 18 09:12:41 ladda cron[454]: nss-ldap: do_open: do_start_tls failed:stat=-1
Sep 18 09:12:41 ladda cron[454]: nss_ldap: could not search LDAP server - Server is unavailable
Sep 18 09:12:41 ladda cron[454]: Error: bad username; while reading /etc/cron.d/repo-ng

# systemctl edit cron.service
[Service]
After=nss-user-lookup.target