Bug 837590

Summary: service cups start too quickly and cups can not be ready for following command
Product: Red Hat Enterprise Linux 7 Reporter: Petr Sklenar <psklenar>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Sklenar <psklenar>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: azelinka, jpopelka, psklenar
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-20 12:18:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Sklenar 2012-07-04 10:25:41 UTC
Description of problem:
Systemd starts cups in too quickly as it starts in the background.
Dont know if its due to systemd or cups but it can affect some of the customers' scripts

Version-Release number of selected component (if applicable):
cups-1.5.3-1.1.el7.x86_64
systemd-44-12.el7.x86_64

How reproducible:
deterministic

Steps to Reproduce:
1. service cups restart; lpstat -p
  
Actual results:
lpstat: Connection refused

more details:

# service cups restart; lpstat -p
Redirecting to /bin/systemctl  restart cups.service
lpstat: Connection refused

# service cups restart; sleep 1; lpstat -p
Redirecting to /bin/systemctl  restart cups.service
printer Generic-text-only disabled since Tue 03 Jul 2012 12:39:51 PM EDT -
	The printer URI is incorrect or no longer exists.
printer testprinter disabled since Tue 03 Jul 2012 12:41:09 PM EDT -
	/usr/lib/cups/backend//dev/null failed
printer tmpname1 is idle.  enabled since Wed 04 Jul 2012 08:47:58 AM EDT
printer tmpname2 is idle.  enabled since Wed 04 Jul 2012 08:47:10 AM EDT

-----
rhel6 works as expected (cups-1.4.2-48.el6.i686)
[root@xyz ~]# service cups restart; lpstat -p
Stopping cups:                                             [  OK  ]
Starting cups:                                             [  OK  ]
printer myPrinterOnRhel5 is idle.  enabled since Wed 04 Jul 2012 12:12:59 PM CEST
printer Officejet-Pro-8500-A909a disabled since Wed 20 Jun 2012 12:39:01 PM CEST -
	Unplugged or turned off
printer Officejet-Pro-8500-A909a-Fax disabled since Wed 20 Jun 2012 12:39:01 PM CEST -
	Unplugged or turned off
printer pdf-on-psklenar is idle.  enabled since Wed 04 Jul 2012 12:12:59 PM CEST
printer printer is idle.  enabled since Wed 04 Jul 2012 12:12:59 PM CEST
printer serialraw is idle.  enabled since Tue 03 Jul 2012 12:44:42 PM CEST
printer test disabled since Wed 04 Jul 2012 12:12:59 PM CEST -
	reason unknown
printer textonly is idle.  enabled since Mon 02 Jul 2012 12:40:51 PM CEST
printer tmpname1 is idle.  enabled since Wed 04 Jul 2012 10:48:32 AM CEST
printer tmpname2 is idle.  enabled since Wed 04 Jul 2012 10:47:46 AM CEST

[root@xyz ~]# rpm -q cups


Expected results:
service cups restart ends when cups process is fully loaded

Additional info:

Comment 3 Tim Waugh 2012-07-17 14:42:27 UTC
Petr: I haven't been able to reproduce this.

What you run 'service cups stop', what output do you get?  What about when you run 'lpstat -p' at that point (after you've stopped the service)?

Comment 5 Tim Waugh 2012-07-18 08:14:13 UTC
What does 'systemctl status cups.socket' say?

Comment 9 Petr Sklenar 2013-06-20 12:18:34 UTC
it does not produce any issue now:
https://beaker.engineering.redhat.com/jobs/438144

I guess it was somehow solved by systemd , tried RHEL-7.0-20130606.0 Server x86_64