Bug 1111351 - At shutdown the cups service is waiting for remote printer services without network
At shutdown the cups service is waiting for remote printer services without n...
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Printing
Current
All openSUSE Factory
: P5 - None : Major (vote)
: ---
Assigned To: Johannes Meixner
Johannes Meixner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-10 10:00 UTC by Dr. Werner Fink
Modified: 2020-05-15 13:40 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Werner Fink 2018-10-10 10:00:13 UTC
The cups.service unit file is missing dependency on network.target like

 After=network.target

to allow the cups.service is stop *before* network goes down.  This simply would avoid waiting on remote printer services.
Comment 1 Johannes Meixner 2018-10-10 10:19:29 UTC
FYI from the cups RPM changes (excerpts):
----------------------------------------------------------------------
Fri Jan 16 16:00:20 UTC 2015 - tchvatal@suse.com
...
- Use upstream service and socket files to allow more working tools
.
.
.
Wed Feb 26 15:20:02 CET 2014 - jsmeix@suse.de
...
- Clean up of systemd unit files (bnc#857372):
  Make it working again as simple and secure as it worked
  all the time in the past by providing only one single
  systemd unit file cups.service...
----------------------------------------------------------------------

In SLE12 we have that cups.service
----------------------------------------------------------------------
[Unit]
Description=CUPS Printing Service
After=network.target

[Service]
ExecStart=/usr/sbin/cupsd -f

[Install]
WantedBy=multi-user.target
----------------------------------------------------------------------
Comment 2 Dr. Werner Fink 2018-10-10 10:20:30 UTC
 Fri Jan 16 16:00:20 UTC 2015 - tchvatal@suse.com
 [...]
 - Use upstream service and socket files to allow more working tools

Why this?  This is *plain* wrong as now every user/customer has to wait 1 and a half minute due to wrong order at shutdown.

@ Tomas :  Please fix this for both Tumbleweed and SLES-15/Leap-15
Comment 3 Dr. Werner Fink 2018-10-18 05:59:02 UTC
I've added the simple patch let-cupsd-start-after-network.patch to current development package for cups. This patch includes the explanation

 For remote printer and printer servers, let cupsd always
 start after a possible network connection.  This let cupsd
 also stop before a used network connection goes down, hence
 the cusp does not lock due waiting on remote printers.

hopefully this avoids that the patch becomes removed without a fixed upstream version of the services file. IMHO this patch does not hinder that teh cups service works with plugged local printers but helps a lot if used with remote printers
Comment 4 Dr. Werner Fink 2018-11-15 08:35:29 UTC
@ Tomas : Any News like the current Status ?
Comment 5 Tomáš Chvátal 2018-11-15 09:00:09 UTC
(In reply to Dr. Werner Fink from comment #4)
> @ Tomas : Any News like the current Status ?

Ah apologies, I really didn't notice this bug. Anyhow the patch as in https://build.opensuse.org/package/rdiff/Printing/cups?linkrev=base&rev=353 is correct and you are right that it could've gotten stuck so probably updating it on SLE makes sense too.
Comment 6 Johannes Meixner 2020-05-15 13:40:29 UTC
Fixed since a longer time, cf. cups.changes:
---------------------------------------------------------------------
Thu Oct 18 05:42:23 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Add patch let-cupsd-start-after-network.patch
  Let cuspd start after possible network connection (boo#1111351)
  This let cupsd also stop before a used network connection goes
  down, hence the cusp does not lock due waiting on remote printers.
---------------------------------------------------------------------