Bug 1135150

Summary: dnsmasq fails to start on boot
Product: [openSUSE] openSUSE Distribution Reporter: Stephan Kulow <coolo>
Component: NetworkAssignee: Reinhard Max <max>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: mt, schwab
Version: Leap 15.1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stephan Kulow 2019-05-15 05:23:18 UTC
Since resolv.conf is a link to be recreated by wicked, dnsmasq fails to start on boot pretty reproducibly:

● dnsmasq.service - DNS caching server.
   Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
  Drop-In: /run/systemd/generator/dnsmasq.service.d
           └─50-insserv.conf-$named.conf
   Active: failed (Result: exit-code) since Wed 2019-05-15 07:17:37 CEST; 2min 22s ago
 Main PID: 3590 (code=exited, status=5)

May 15 07:17:37 cleopatra systemd[1]: Starting DNS caching server....
May 15 07:17:37 cleopatra dnsmasq[3570]: dnsmasq: syntax check OK.
May 15 07:17:37 cleopatra dnsmasq[3590]: dnsmasq: directory /etc/resolv.conf for resolv-file is missing, cannot poll
May 15 07:17:37 cleopatra dnsmasq[3590]: directory /etc/resolv.conf for resolv-file is missing, cannot poll
May 15 07:17:37 cleopatra dnsmasq[3590]: FAILED to start up
May 15 07:17:37 cleopatra systemd[1]: dnsmasq.service: Main process exited, code=exited, status=5/NOTINSTALLED
May 15 07:17:37 cleopatra systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
May 15 07:17:37 cleopatra systemd[1]: Failed to start DNS caching server..

After boot everything is fine, so a simple restart fixes it.
Comment 1 Andreas Schwab 2019-07-08 16:58:41 UTC
Fails also on 15.1.
Comment 2 Reinhard Max 2019-07-10 11:57:23 UTC
Unfortunately the error message is misleading.
See bug 1123699 comment 34 for a detailed explanation of what's going on.

*** This bug has been marked as a duplicate of bug 1123699 ***
Comment 3 Andreas Schwab 2019-07-10 13:58:47 UTC
No, this has nothing to do with libvirt.
Comment 4 Reinhard Max 2019-07-11 07:41:30 UTC
The other one was found in a libvirt context, but the underlaying problem that dnsmasq fails to start because the directory that contains /etc/resolv.conf does not exist is the same.

*** This bug has been marked as a duplicate of bug 1123699 ***
Comment 5 Reinhard Max 2019-07-11 07:53:17 UTC
Andreas, please test if this helps:

# echo "d /run/netconfig 0755 root root -" > /etc/tmpfiles.d/netconfig.conf
# reboot

I suggested this in bug 112369 comment 36, but nobody seems to have tried it yet.
Comment 6 Andreas Schwab 2019-07-15 12:57:08 UTC
Yes, this works for me.
Comment 7 Reinhard Max 2019-07-15 13:28:04 UTC
Thanks for testing.
I just noticed that I missed a digit in the bug number I posted in comment 5.
I meant bug 1123699 comment 36.