Bug 1437065 - CUPS does not recognize changes to /etc/resolv.conf until CUPS restart
Summary: CUPS does not recognize changes to /etc/resolv.conf until CUPS restart
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 25
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Patch, Reopened
: 1439124 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-29 13:00 UTC by Zdenek Dohnal
Modified: 2017-04-12 19:50 UTC (History)
15 users (show)

(edit)
Clone Of: 1325692
(edit)
Last Closed: 2017-04-09 02:54:32 UTC


Attachments (Terms of Use)

Comment 1 Fedora Update System 2017-03-30 11:51:57 UTC
cups-2.1.4-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-af9f3f0102

Comment 2 Fedora Update System 2017-03-30 11:53:42 UTC
cups-2.2.0-6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-aaa2f5c814

Comment 3 Fedora Update System 2017-03-30 12:01:44 UTC
cups-2.2.2-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cb1c7c3146

Comment 4 Fedora Update System 2017-03-30 18:53:41 UTC
cups-2.2.2-3.fc26 has been pushed to the Fedora 26 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-cb1c7c3146

Comment 5 Fedora Update System 2017-03-31 03:19:53 UTC
cups-2.1.4-4.fc24 has been pushed to the Fedora 24 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-af9f3f0102

Comment 6 Fedora Update System 2017-03-31 03:22:08 UTC
cups-2.2.0-6.fc25 has been pushed to the Fedora 25 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-aaa2f5c814

Comment 7 Fedora Update System 2017-04-01 22:21:23 UTC
cups-2.2.0-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2017-04-02 21:00:36 UTC
cups-2.2.2-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2017-04-03 10:45:22 UTC
cups-2.1.4-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-af9f3f0102

Comment 10 Fedora Update System 2017-04-04 00:23:35 UTC
cups-2.1.4-4.fc24 has been pushed to the Fedora 24 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-af9f3f0102

Comment 11 Doug Hutcheson 2017-04-04 03:45:18 UTC
(In reply to Fedora Update System from comment #7)
> cups-2.2.0-6.fc25 has been pushed to the Fedora 25 stable repository. If
> problems still persist, please make note of it in this bug report.

On my Fedora 25 x86_64 system, I have cups-2.2.0-6.fc25.x86_64 and can confirm the bug is still there. In fact, I only encountered this bug report because I was Googling the problem, which only came to my attention on this machine yesterday.

It is strange, because I had no problem previously and I have not run a system update since Saturday afternoon Australian time.

Comment 12 Doug Hutcheson 2017-04-04 03:47:14 UTC
(In reply to Doug Hutcheson from comment #11)
> (In reply to Fedora Update System from comment #7)
> > cups-2.2.0-6.fc25 has been pushed to the Fedora 25 stable repository. If
> > problems still persist, please make note of it in this bug report.
> 
> On my Fedora 25 x86_64 system, I have cups-2.2.0-6.fc25.x86_64 and can
> confirm the bug is still there. In fact, I only encountered this bug report
> because I was Googling the problem, which only came to my attention on this
> machine yesterday.
> 
> It is strange, because I had no problem previously and I have not run a
> system update since Saturday afternoon Australian time.

Ignore me - I replied to the wrong bug report. Humble apologies.

Comment 13 Jiri Eischmann 2017-04-04 09:46:25 UTC
I can also confirm there is still a problem. CUPS fails to start at boot, but it's somehow started and running when I check it afterwards. Nevertheless cups-browsed fails to start at boot because cups as its dependency failed to start and it stays that way until you manually restart it.

Comment 14 Zdenek Dohnal 2017-04-04 13:16:02 UTC
Thanks Jirka and Doug, I will look into it.

Comment 15 Fedora Update System 2017-04-04 13:59:45 UTC
cups-2.1.4-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-19ab04c1b9

Comment 16 Jean-Luc Richier 2017-04-04 15:32:02 UTC
(In reply to Jiri Eischmann from comment #13)
> I can also confirm there is still a problem. CUPS fails to start at boot,
> but it's somehow started and running when I check it afterwards.
> Nevertheless cups-browsed fails to start at boot because cups as its
> dependency failed to start and it stays that way until you manually restart
> it.

I have the same problem using cups-2.2.0-6.fc25.x86_64 : cups fails at boot time, 
withe message
cupsd[991]: cupsd: Cannot get a status of /etc/resolv.conf

and therefore the dependency cups-browsed fails to start at boot
To solve the problem, I modified /lib/systemd/system/cups.service to wait for
the activation of NetworkManager

diff /lib/systemd/system/cups.service.DIST /lib/systemd/system/cups.service
4c4
< After=network.target
---
> After=network-online.target NetworkManager-wait-online.service

Comment 17 Jean-Luc Richier 2017-04-04 16:05:35 UTC
(In reply to Need Real Name from comment #16)

> I have the same problem using cups-2.2.0-6.fc25.x86_64 : cups fails at boot
> time, 
> with message
> cupsd[991]: cupsd: Cannot get a status of /etc/resolv.conf

I installed cups-2.2.0-7.fc25.x86_64 and it solves the problem

Comment 18 Zdenek Dohnal 2017-04-04 16:07:53 UTC
Yes, it solves problem, but I removed that patch only temporarily until I fix this issue.
Your solution will delay boot process for 90s if network-online.target fails. IMHO it is not the way it should be solved. 
Issue is with cups.service, which tries to start when network.target is completed, but network.target completion doesn't guarantee that /etc/resolv.conf exists. I'll try to do stat call later in daemon, when /etc/resolv.conf could exist.

Comment 19 Zdenek Dohnal 2017-04-04 16:24:29 UTC
Ad comment #18:

After some time CUPS restarts, but cups-browsed, which depends on CUPS, will not restart and stays dead from boot time.

Comment 20 Fedora Update System 2017-04-04 22:21:38 UTC
cups-2.1.4-5.fc24 has been pushed to the Fedora 24 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-19ab04c1b9

Comment 21 Zdenek Dohnal 2017-04-05 10:13:57 UTC
*** Bug 1439124 has been marked as a duplicate of this bug. ***

Comment 22 Fedora Update System 2017-04-05 19:45:32 UTC
cups-2.1.4-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-61498b10c5

Comment 23 Fedora Update System 2017-04-05 19:46:26 UTC
cups-2.2.0-8.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-37931b24eb

Comment 24 Fedora Update System 2017-04-05 20:03:56 UTC
cups-2.2.2-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-81ec2a7046

Comment 25 Zdenek Dohnal 2017-04-05 20:18:16 UTC
Issue should be fixed with 2.1.4-6.fc24, 2.2.0-8.fc25, 2.2.2-5.fc26 and 2.2.3-4.fc27 releases. It contains again cups-resolv_reload.patch, which now does following:

- when /etc/resolv.conf doesn't exist, it tries to reload resolver with local nameserver (more info in 'man resolv.conf'). 
- when even reloading resolver with local nameserver fails, function httpCheckResolv returns error, which is checked in cupsd main function - it only prints message to stderr about "Cannot reload resolver - using old configuration" - and no hard exit

I tested it in my F25, no error mesages for CUPS and cups-browsed service is still running.
Purpose of cups-resolv_reload.patch is to make CUPS recognize changes of nameserver IP's configuration without CUPS restart. This patch is only temporary workaround until glibc doesn't fix issue with dynamically changing nameservers IP configuration. Please check if this feature works too (it should be, I tested it too).

Comment 26 Fedora Update System 2017-04-06 19:53:11 UTC
cups-2.1.4-6.fc24 has been pushed to the Fedora 24 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-61498b10c5

Comment 27 Fedora Update System 2017-04-06 20:24:10 UTC
cups-2.2.0-8.fc25 has been pushed to the Fedora 25 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-37931b24eb

Comment 28 Fedora Update System 2017-04-06 22:22:26 UTC
cups-2.2.2-5.fc26 has been pushed to the Fedora 26 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-81ec2a7046

Comment 29 Fedora Update System 2017-04-09 02:54:32 UTC
cups-2.2.0-8.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2017-04-10 16:01:49 UTC
cups-2.2.2-5.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 31 Fedora Update System 2017-04-12 19:50:20 UTC
cups-2.1.4-6.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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