Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition on boot between cups and sssd #5550

Closed
vtapia opened this issue Mar 28, 2019 · 2 comments
Closed

Race condition on boot between cups and sssd #5550

vtapia opened this issue Mar 28, 2019 · 2 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@vtapia
Copy link

vtapia commented Mar 28, 2019

When cups has set the "SystemGroup" directive to an external group provided through sss and cups starts before sssd has finished booting, cups will crash because the group does not exist. For instance, with a group named lpadmins@tests.local served from Active Directory through sssd, if the sssd service hasn't booted before cups:

Mar 27 10:10:33 cups-sssd systemd[1]: Started CUPS Scheduler.
Mar 27 10:10:33 cups-sssd systemd[1]: Started CUPS Scheduler.
Mar 27 10:10:33 cups-sssd systemd[1]: Started Make remote CUPS printers available locally.
Mar 27 10:10:33 cups-sssd cupsd[21463]: Unknown SystemGroup "lpadmins@tests.local" on line 19 of /etc/cups/cups-files.conf.
Mar 27 10:10:33 cups-sssd cupsd[21463]: Unable to read "/etc/cups/cups-files.conf" due to errors.
Mar 27 10:10:33 cups-sssd systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 10:10:33 cups-sssd systemd[1]: cups.service: Failed with result 'exit-code'.
Mar 27 10:10:33 cups-sssd systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Mar 27 10:10:33 cups-sssd systemd[1]: cups.service: Scheduled restart job, restart counter is at 2.
Mar 27 10:10:33 cups-sssd systemd[1]: Stopping Make remote CUPS printers available locally...
Mar 27 10:10:33 cups-sssd systemd[1]: Stopped Make remote CUPS printers available locally.
Mar 27 10:10:33 cups-sssd systemd[1]: Stopped CUPS Scheduler.

If sssd is available before cups starts, everything works as expected.

@vtapia
Copy link
Author

vtapia commented Mar 28, 2019

Adding "After=sssd.service" to the [Unit] section in scheduler/org.cups.cupsd.service.in should be enough to fix this issue. I'll prepare a PR with the change.

vtapia added a commit to vtapia/cups that referenced this issue Mar 28, 2019
… starts

When the group defined in the SystemGroup directive is provided via
sssd, and sssd is not available when cups starts, cups will crash. This
patch makes cups start after sssd when both are present in the machine.
(Issue apple#5550)
@michaelrsweet
Copy link
Collaborator

Closing this issue; will track changes in the referenced pull request instead.

@michaelrsweet michaelrsweet self-assigned this Apr 15, 2019
@michaelrsweet michaelrsweet added the duplicate This issue or pull request already exists label Apr 15, 2019
@michaelrsweet michaelrsweet added this to the CUPS 2.2.x Updates milestone Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants