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
systemd doesn't actually support launch-on-demand services, need to fake it #5640
Comments
I can confirm this is the same issue as it is in Fedora 30+ where I built cups-2.2.12. Here are the logs from journal |
This commit seems to cause it: Specifically this part: --- a/scheduler/main.c #ifdef HAVE_ONDEMAND
#endif /* HAVE_ONDEMAND */
|
It is only new assignment to stop_scheduler since 2.2.11 and setting it to 1 causes cupsd to end correctly, which breaks usage of cupsctl - cupsd ended as 'failure' before that and systemd restarted it. |
Looks like a regression caused by c1a310f. |
OK, so looking at the systemd documentation (ugh!) it looks like we need to return an error exit code in order for systemd to restart cupsd... There is no real support for idle exiting or minimizing the number of processes that are running... :/ |
cupsctl
Pushed changes reverting the "stop_scheduler" change for systemd: [master f8688d7] Add workaround for systemd's lack of true launch-on-demand support (Issue #5640) [branch-2.2 40a54a3] Add workaround for systemd's lack of true launch-on-demand support (Issue #5640) For all other supervisor programs supported by cupsd we can just exit with no error and the right thing happens - immediate restart if the "I need to be running" file is present, otherwise an on-demand restart if a socket connection is made. Why systemd doesn't support this pattern is baffling... |
Thank you very much, it works correctly now. I have backported the patch to Ubuntu Eoan (19.10) now. |
When building CUPS with all build options at their default values changing the CUPS configuration with the "cupsctl" command does not work. "cupsctl" shows the configuration summary correctly when being started without argument, but when supplying any configuration option, cupsd.conf gets appropriately modified, but cupsd does not get started after the change. Such a behavior was already there, back in CUPS 2.2.12 (apple/cups#5640) and there was done a correction on the on-demand use handling of cupsd on systems using systemd as PID 1. So I came to the idea to test with systemd support turned off altogether ("./configure --disable-systemd") as inside the Snap we run CUPS permanently and not on-demand anyway. This made cupsctl working correctly again, restarting cupsd after applying the configuration change. So we are going with "--disable-systemd" now.
@michaelrsweet Sorry if I misunderstood the issue, but are you looking for a way for systemd to restart the service, even when it exits cleanly? I think there is a config option |
I have updated the upcoming Ubuntu 19.10 to CUPS 2.2.12 and now I cannot do quick configuration changes with
cupsctl
any more.When I run
or
I cannot access CUPS any more:
I have to restart the daemon to get access again. At least then the configuration change gets effective:
Here are my config files and error_log (in debug mode):
cupsd.conf.txt
cups-files.conf.txt
error_log.txt
The text was updated successfully, but these errors were encountered: