Bug 501778

Summary: Duplicate printer entry causes remainder of printers.conf to be ignored
Product: Red Hat Enterprise Linux 4 Reporter: Jeremy Kindy <kindyjd>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: BaseOS QE <qe-baseos-auto>
Severity: low Docs Contact:
Priority: low    
Version: 4.9CC: kindyjd
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-01 12:05:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeremy Kindy 2009-05-20 16:44:09 UTC
Description of problem:
Duplicate printer entry in printers.conf causes cups to stop reading printers.conf file and any entry below the duplicate entry is not loaded

Version-Release number of selected component (if applicable):
Version     : 1.1.22
Release     : 0.rc1.9.32.el4

How reproducible:
Always

Steps to Reproduce:
1. Create a duplicate printer in printers.conf located above a printer that works and returns "ready" when queried with lpq -P printer_name.
2. Restart cups.
3. lpq -P printer_name
  
Actual results:
Printers defined below duplicate printer are not loaded.  Querying printer results in:

# lpq -P FSWPC2205BW
lpq: Unknown destination "FSWPC2205BW"! 

Expected results:
Printers defined below duplicate printer are loaded and available via cups.  Querying printer results in:

# lpq -P FSWPC2205BW
FSWPC2205BW is ready
no entries


Additional info:
This may have come about due to a bugfix in this advisory: RHBA-2009:0989-1

* printers in CUPS should have unique names. However, if a CUPS
configuration file somehow contained entries for more than one device
with the same name, the CUPS scheduler would create a segmentation
fault and crash while starting up. CUPS now includes code that examines
each printer while loading it from the configuration file. CUPS will not
attempt to load duplicate entries, but will log an error.

Our particular config contained printers that had different names case-wise: e.g. printer and PRINTER.  All entries after PRINTER (that weren't duplicates themselves) were not available for printing.  Also tested with exact duplicate names with the same results.

The following errors occurred in /var/log/cups/error_log:

E [20/May/2009:00:11:23 -0400] Duplicate printer on line 873 of printers.conf.

E [20/May/2009:00:11:15 -0400] LoadAllJobs: Unable to queue job for destination "http://machine.example.com:631/printers/printername"!

Comment 1 Tim Waugh 2009-06-01 12:05:01 UTC
Print queue names are not case-sensitive and so this configuration is invalid.