Bugzilla – Bug 116446
useless cupsd restarts in YaST
Last modified: 2008-08-14 06:11:14 UTC
An enhancement request for 10.1: YaST printer config does a lot of cupsd re-starts. In most cases this is not necessary. As each spooler re-start disrupts all active printing jobs (so that they will be re-printed from the beginning), the YaST printer config tool cannot be used for CUPS servers which are under a higher load. The many spooler restarts seem to be a leftover from the time when we had LPRng because LPRng needs a spooler restart to re-read /etc/printcap and to set up the matching spool stuff (with "checkpc") for each changed queue. In contrast cupsd doesn't need a re-start if queues are changed. There is no need to re-start cupsd for anything which can be set up using (only) the "lpadmin" command. There are only a few cases when cupsd must be re-started: * when /etc/cups/cupsd.conf was changed * when /etc/cups/*.types and/or /etc/cups/*.convs were changed * when backends are changed in /usr/lib[64]/cups/backend/ * when PPD files are changed in /usr/share/cups/model/ The last three items should happen only when software is installed or removed by the YaST printer config tool. If the user did such changes manually, he should know that he must re-start cupsd afterwards. Nevertheless YaST must check and make sure that cupsd is running if it is needed: * when at least one local queue exists * when the local host should listen to remote CUPS browsing information When cupsd is started anew and/or when it is re-started, YaST should show a user confirmation request to have the user informed and let him decide: * when a new service is to be started (see bug #115888) * when a running service will go down and up again
fixed first part - reduced cups restarts
Reopening because of second part and: A special note regarding HPLIP: The initial comment reads: ------------------------------------------------------------ cupsd must be re-started * when backends are changed in /usr/lib[64]/cups/backend/ ------------------------------------------------------------ In case of HPLIP it is a bit more special: It wouldn't help to re-start cupsd after the hplip RPM was installed because the HP backends "hp" and "hpfax" don't work unless the "hplip" service is up and running. Therefore for HPLIP it would be as follows: cupsd must be re-started after the "hplip" service is up and running if it was not yet up and running before. (This condition implies that the hplip RPM is already installed.) The final goal is to have the HP backends "hp" and "hpfax" ready to operate in CUPS. Therefore the best test is to check for those backends dierctly. In bash I would do it like: ----------------------------------------------------------------------------- if lpinfo -v | grep -q '^direct hp:' && lpinfo -v | grep -q '^direct hpfax:' then echo ok else rccups restart fi -----------------------------------------------------------------------------
move to later
reopen
fixed
It still re-starts the cupsd much too often. Eeach time when it finishes! There is no re-start of the cupsd needed to add, modify, or delete print queues. Only a config change of the cupsd requires it to be re-started.
An update regarding comment #2: Since hplip version 2.8.4 (i.e. since openSUSE 11.0) there are no longer any daemons. The hp backend is just a normal backend. Therefore the special stuff in comment #2 can be ignored since openSUSE 11.0 so that bug #184798 does no longer depend on this one.
*** Bug 203207 has been marked as a duplicate of this bug. ***
There is new yast2-printer module which fixes most of the bugs. If this problem occurs in this version, please reopen bugreport. http://mzugec.blogspot.com/2008/08/new-yast2-printer-configuration-module.html