# VERIFICATION: COSMIC - Using the reproducer defined in the test case and the version in -updates:
ubuntu@cosmic-sssd-ad:~$ dpkg -l | grep -E "cups-daemon| cups |cups-common" ii cups 2.2.8-5ubuntu1.2 amd64 Common UNIX Printing System(tm) - PPD/driver support, web interface ii cups-common 2.2.8-5ubuntu1.2 all Common UNIX Printing System(tm) - common files ii cups-daemon 2.2.8-5ubuntu1.2 amd64 Common UNIX Printing System(tm) - daemon ubuntu@cosmic-sssd-ad:~$ grep -i systemgroup /etc/cups/cups-files.conf SystemGroup lpadmins@TESTS.LOCAL ubuntu@cosmic-sssd-ad:~$ systemd-analyze critical-chain cups.service The time after the unit is active or started is printed after the "@" character. The time the unit takes to start is printed after the "+" character. cups.service @5d 44min 19.075s └─basic.target @32.610s └─sockets.target @32.602s └─snap.lxd.daemon.unix.socket @2min 24.862s └─snap-lxd-10601.mount @2min 1.485s +39ms └─local-fs-pre.target @8.493s └─systemd-tmpfiles-setup-dev.service @8.103s +386ms └─systemd-sysusers.service @7.546s +550ms └─systemd-remount-fs.service @7.143s +373ms └─systemd-journald.socket @7.033s └─-.mount @6.938s └─system.slice @6.938s └─-.slice @6.938s - After reboot, cups fails to start: ubuntu@cosmic-sssd-ad:~$ systemctl status cups ● cups.service - CUPS Scheduler Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2019-05-07 10:06:49 UTC; 57min ago Docs: man:cupsd(8) Process: 1173 ExecStart=/usr/sbin/cupsd -l (code=exited, status=1/FAILURE) Main PID: 1173 (code=exited, status=1/FAILURE) May 07 10:06:49 cosmic-sssd-ad systemd[1]: cups.service: Service RestartSec=100ms expired, scheduling rest May 07 10:06:49 cosmic-sssd-ad systemd[1]: cups.service: Scheduled restart job, restart counter is at 5. May 07 10:06:49 cosmic-sssd-ad systemd[1]: Stopped CUPS Scheduler. May 07 10:06:49 cosmic-sssd-ad systemd[1]: cups.service: Start request repeated too quickly. May 07 10:06:49 cosmic-sssd-ad systemd[1]: cups.service: Failed with result 'exit-code'. May 07 10:06:49 cosmic-sssd-ad systemd[1]: Failed to start CUPS Scheduler. ubuntu@cosmic-sssd-ad:~$ grep cupsd /var/log/syslog | grep -v kernel May 7 10:06:45 cosmic-sssd-ad cupsd[1033]: Unknown SystemGroup "lpadmins@TESTS.LOCAL" on line 19 of /etc/cups/cups-files.conf. May 7 10:06:45 cosmic-sssd-ad cupsd[1033]: Unable to read "/etc/cups/cups-files.conf" due to errors. May 7 10:06:47 cosmic-sssd-ad cupsd[1122]: Unknown SystemGroup "lpadmins@TESTS.LOCAL" on line 19 of /etc/cups/cups-files.conf. May 7 10:06:47 cosmic-sssd-ad cupsd[1122]: Unable to read "/etc/cups/cups-files.conf" due to errors. ... - Using the version in -proposed, after rebooting, cups works fine: ubuntu@cosmic-sssd-ad:~$ dpkg -l | grep -E "cups-daemon| cups |cups-common" ii cups 2.2.8-5ubuntu1.3 amd64 Common UNIX Printing System(tm) - PPD/driver support, web interface ii cups-common 2.2.8-5ubuntu1.3 all Common UNIX Printing System(tm) - common files ii cups-daemon 2.2.8-5ubuntu1.3 amd64 Common UNIX Printing System(tm) - daemon ubuntu@cosmic-sssd-ad:~$ systemctl status cups ● cups.service - CUPS Scheduler Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-05-07 11:13:20 UTC; 58s ago Docs: man:cupsd(8) Main PID: 1297 (cupsd) Tasks: 1 (limit: 2361) Memory: 2.7M CGroup: /system.slice/cups.service └─1297 /usr/sbin/cupsd -l May 07 11:13:20 cosmic-sssd-ad systemd[1]: Started CUPS Scheduler. ubuntu@cosmic-sssd-ad:~$ systemd-analyze critical-chain cups.service The time after the unit is active or started is printed after the "@" character. The time the unit takes to start is printed after the "+" character. cups.service @1min 6.619s └─sssd.service @54.111s +12.499s └─basic.target @54.032s └─sockets.target @54.030s └─snapd.socket @53.965s +61ms └─sysinit.target @53.361s └─cloud-init.service @48.760s +4.493s └─systemd-networkd-wait-online.service @46.946s +1.809s └─systemd-networkd.service @46.237s +675ms └─network-pre.target @46.230s └─cloud-init-local.service @22.765s +23.458s └─systemd-remount-fs.service @10.923s +199ms └─systemd-journald.socket @10.574s └─system.slice @10.466s └─-.slice @10.466s - Using the version in -proposed, with sssd not installed in the machine (and setting SystemGroup to the original local group "lpadmin"), cups still starts: ubuntu@cosmic-sssd-ad:~$ systemctl status cups ● cups.service - CUPS Scheduler Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-05-07 11:21:12 UTC; 1min 16s ago Docs: man:cupsd(8) Main PID: 955 (cupsd) Tasks: 1 (limit: 2361) Memory: 3.7M CGroup: /system.slice/cups.service └─955 /usr/sbin/cupsd -l May 07 11:21:12 cosmic-sssd-ad systemd[1]: Started CUPS Scheduler. ubuntu@cosmic-sssd-ad:~$ systemd-analyze critical-chain cups.service The time after the unit is active or started is printed after the "@" character. The time the unit takes to start is printed after the "+" character. cups.service @41.284s └─basic.target @41.231s └─sockets.target @41.228s └─snapd.socket @41.024s +200ms └─sysinit.target @40.998s └─cloud-init.service @33.042s +7.648s └─systemd-networkd-wait-online.service @31.517s +1.510s └─systemd-networkd.service @31.378s +130ms └─network-pre.target @31.367s └─cloud-init-local.service @17.766s +13.595s └─systemd-remount-fs.service @7.097s +411ms └─systemd-journald.socket @7.053s └─-.mount @6.984s └─system.slice @6.984s └─-.slice @6.984s -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to cups in Ubuntu. https://bugs.launchpad.net/bugs/1822062 Title: Race condition on boot between cups and sssd Status in cups package in Ubuntu: Fix Released Status in cups source package in Xenial: Fix Committed Status in cups source package in Bionic: Fix Committed Status in cups source package in Cosmic: Fix Committed Status in cups source package in Disco: Fix Committed Status in cups source package in Eoan: Fix Released Bug description: [Impact] * 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. * The patch adds an "After=sssd.service" clause to the service unit file. [Test Case] * Configure an external authentication service (LDAP, AD...) and create a group, for instance "lpadmins@tests.local" * Set SystemGroup to match that group in /etc/cups/cups-files.conf: SystemGroup lpadmins@tests.local * Reboot * If cups has started before sssd has finished booting, cups will crash: Mar 27 10:10:33 cups-sssd cupsd[21463]: Unknown SystemGroup "lpadmins@tests.local" on line 19 of /etc/cups/cups-files.conf. * If cups starts after sssd, it will work fine. [Regression Potential] * Minimal: this patch affects just the ordering of the service unit file. [Other Info] * Upstream: https://github.com/apple/cups/commit/4d0f1959a3f46973caec2cd41828c59674fe195d [Original description] 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 running before cups starts, everything works as expected. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1822062/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp