Bug 1484916 - Can not get destinations from CUPS server
Summary: Can not get destinations from CUPS server
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker https://fedoraproject...
Depends On:
Blocks: F27FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2017-08-24 14:22 UTC by Marek Kašík
Modified: 2017-10-04 14:52 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-04 14:52:37 UTC
Type: Bug


Attachments (Terms of Use)

Description Marek Kašík 2017-08-24 14:22:33 UTC
Description of problem:
When I try to get destinations (cupsGetDests()) from a remote CUPS server I get empty list on Fedora 27 but I get the printers when calling it on Fedora 26.
This happens in control-center's Printers panel. (but I test it in python)


Version-Release number of selected component (if applicable):
cups-2.2.4-3.fc27


How reproducible:
Always


Steps to Reproduce:
1. run python
2. import cups
3. c = cups.Connection ('a-server')
4. cups.getDests()


Actual results:
{}


Expected results:
all dests on the server


Additional info:
c.getPrinters() works on both Fedoras
The remote server is CUPS 1.4.2.

Comment 1 Marek Kašík 2017-08-25 13:41:09 UTC
Looking at https://bugzilla.gnome.org/show_bug.cgi?id=786765 and testing in F27 VM, the same applies to local CUPS server.

Comment 2 Marek Kašík 2017-08-25 13:57:08 UTC
I've just downgraded to cups-2.2.3-6 and it works. So the problem is between 2.2.3-6 and 2.2.4-3. Looking at cupsGetDests2() it seems that it was reimplemented using cupsEnumDests().

Comment 3 Zdenek Dohnal 2017-09-01 07:46:53 UTC
Hi Marek,

sorry for late response, I had sickness leave. I'll look into it. My guess is changes will be needed in python-cups to work with reimplemented function.

Comment 4 Marek Kašík 2017-09-01 08:56:00 UTC
(In reply to Zdenek Dohnal from comment #3)
> Hi Marek,
> 
> sorry for late response, I had sickness leave. I'll look into it. My guess
> is changes will be needed in python-cups to work with reimplemented function.

Hi Zdenek,

I think that the problem resides in cups itself since gnome-control-center's Printer panel is also affected and it uses C API.

Comment 5 Pablo Estigarribia 2017-09-25 21:14:07 UTC
Today I got upgrade to cups-2.2.4-4

Control panel and libreoffice and also tested with python cups module, all are working fine so everything seems to be fixed.

Comment 6 Zdenek Dohnal 2017-09-27 13:21:33 UTC
This issue is reported and solved as cups issue #5046 and solution will be in 2.2.5 version. I'm focusing on other things right now, so I will backport it to f27 as I will have more time.

Comment 7 Fedora Blocker Bugs Application 2017-09-29 13:29:59 UTC
Proposed as a Blocker for 27-beta by Fedora user sgallagh using the blocker tracking app because:

 "All applications that can be launched using the standard graphical mechanism of a release-blocking desktop after a default installation of that desktop must start successfully and withstand a basic functionality test."

This bug results in printing being essentially unavailable entirely on Fedora 27. As this is critical functionality relied upon by most users, I think this qualifies for Final blocker status.

Comment 8 Fedora Blocker Bugs Application 2017-09-29 13:30:41 UTC
Proposed as a Blocker for 27-final by Fedora user sgallagh using the blocker tracking app because:

 "All applications that can be launched using the standard graphical mechanism of a release-blocking desktop after a default installation of that desktop must start successfully and withstand a basic functionality test."

This bug results in printing being essentially unavailable entirely on Fedora 27. As this is critical functionality relied upon by most users, I think this qualifies for Final blocker status.

Comment 9 Fedora Update System 2017-10-02 09:59:04 UTC
cups-2.2.4-5.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-bbb629b3ae

Comment 10 Kamil Páral 2017-10-02 15:29:40 UTC
Making replies non-confidential since there was nothing confidential in them.

Comment 11 Kamil Páral 2017-10-02 15:54:06 UTC
To add more details: By default you don't see any printers in GNOME dialogs if you have no default printer set. You can still see them using cups-browsed. If you set a default printer, the printers will appear even in GNOME dialogs.

Comment 12 Zdenek Dohnal 2017-10-02 16:24:32 UTC
Default printer doesn't have to even exist, it can be fake, non-functional printer, but it needs to be set as default. Then other printers will show up.
How to create fake printer f.e.:
$ lpadmin -p printer-name -v socket://localhost:1200/printer-name -E
$ lpadmin -d printer-name

then other printers show up, when I use getDests() method.

Comment 13 Kamil Páral 2017-10-02 16:34:31 UTC
Discussed at blocker review meeting [1]:

AcceptedBlocker (Final) - This violates "All applications that can be launched using the standard graphical mechanism of a release-blocking desktop after a default installation of that desktop must start successfully and withstand a basic functionality test" for control center app and showing printers.

[1] https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2017-10-02/

Comment 14 Fedora Update System 2017-10-02 21:26:54 UTC
cups-2.2.4-5.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-bbb629b3ae

Comment 15 Lukas Brabec 2017-10-03 08:50:54 UTC
(In reply to Fedora Update System from comment #14)
> cups-2.2.4-5.fc27 has been pushed to the Fedora 27 testing repository. If
> problems still persist, please make note of it in this bug report.
> See https://fedoraproject.org/wiki/QA:Updates_Testing for
> instructions on how to install test updates.
> You can provide feedback for this update here:
> https://bodhi.fedoraproject.org/updates/FEDORA-2017-bbb629b3ae

this update fixes the problem for me

Comment 16 Kamil Páral 2017-10-03 09:43:44 UTC
Setting status per comment 15

Comment 17 Stephen Gallagher 2017-10-03 11:50:50 UTC
I can confirm that this allows me to see the printers I have configured on my local network. However, specifying a CUPS server to search for new printers returns zero results, so I'm not sure this is completely fixed.

Let me know if you'd prefer I open a new BZ to track that.

Comment 18 Marek Kašík 2017-10-03 16:02:01 UTC
It seems that the reimplementation of cupsGetDests2() does not use the "http_t *" parameter at all and hence only local printers are listed. I've created an issue for this in upstream tracker and will see whether it was intentional or not (see https://github.com/apple/cups/issues/5135).

Comment 19 Fedora Update System 2017-10-04 14:22:16 UTC
cups-2.2.4-5.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Kamil Páral 2017-10-04 14:52:37 UTC
Bodhi failed to close this, closing.


Note You need to log in before you can comment on or make changes to this bug.