FS#42837 - [polipo] service needs to start after systemd-resolved.service

Attached to Project: Community Packages
Opened by Eric Wang (enihcam) - Wednesday, 19 November 2014, 04:30 GMT
Last edited by Thorsten Töpper (Atsutane) - Sunday, 09 August 2015, 06:21 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Thorsten Töpper (Atsutane)
Jelle van der Waa (jelly)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
polipo service needs to start after systemd-resolved.service, or you will see the following error:
[code]
polipo[233]: DNS: couldn't open /etc/resolv.conf: No such file or directory
[/code]

This is because when you use systemd-resolved.service rather than dhcpcd/dhcpclient, /etc/resolv.conf will be linked to /run/systemd/resolve/resolv.conf, which is dynamic file created after systemd-resolved.service starts up.

Additional info:
* package version(s)
Any
* config and/or log files etc.


Steps to reproduce:
1. Setup and enable systemd-resolved.service
2. Make sure /etc/resolv.conf is linked to /run/systemd/resolve/resolv.conf
3. Enable polipo.service
4. Reboot
5. See 'journalctl -b'
This task depends upon

Closed by  Thorsten Töpper (Atsutane)
Sunday, 09 August 2015, 06:21 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Silence for 9 months. Seems the proposed .service file works.
Comment by Eric Wang (enihcam) - Wednesday, 19 November 2014, 04:32 GMT
Please add 'After=systemd-resolved.service' in polipo.service. Thanks.
Comment by Jelle van der Waa (jelly) - Wednesday, 19 November 2014, 20:49 GMT
Maybe the solution is to edit the installed service file https://wiki.archlinux.org/index.php/Systemd#Editing_provided_unit_files ?
Comment by Dave Reisner (falconindy) - Wednesday, 19 November 2014, 21:05 GMT
If there's anything to order this after, it should be nss-lookup.target. Ordering after only systemd-resolved is short-sighted.
Comment by Eric Wang (enihcam) - Thursday, 20 November 2014, 00:25 GMT
@Dave I have little knowledge about .target. Then please change to nss-lookup.target.
@Jelle Editing the service file will be undo after package upgrade?
Comment by Thorsten Töpper (Atsutane) - Wednesday, 26 November 2014, 18:08 GMT
Dunno, my polipo runs even when the system boots without a network connection(=no cable) and works fine later... So I'd prefer Jelle's proposal.

Eric, when you copy the file to the folder /etc/systemd/system/multi-user.target.wants/ and don't create a symlink using "systemctl enable polipo.service" you have a stable service file that won't be touched by any updates.

Loading...