|
Bugzilla – Full Text Bug Listing |
| Summary: | dnsmasq: directory /etc/resolv.conf for resolv-file is missing, cannot poll | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Distribution | Reporter: | Matwey Kornilov <matwey.kornilov> |
| Component: | Network | Assignee: | Marius Tomaschewski <mt> |
| Status: | RESOLVED DUPLICATE | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P2 - High | CC: | lnussel, max, rombert |
| Version: | Leap 15.1 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Matwey Kornilov
2019-03-31 16:15:54 UTC
Fallout from the move of resolv.conf to /run. Marius, how about creating bot the symlink in /etc as well as the file in run via tmpfiles mechanism? That is done very early by systemd so that way we should be able to create a resolv.conf with only the stub header. Actually needinfo Marius.. AFAICS there is nothing wrong with dnsmasq here, reassigning. Whoops, did everything except for the actual reassignment. Hmm - maybe it could also be fixed via service file dependencies. I see that dnsmasq.service orders itself after network.target and before nss-lookup.target. Is there anything else it could hook to that makes sure it doesn't get started until /etc/resolve.conf is actually there? yes, there is network-online.target (mind bug 1130355). If dnsmasq monitors resolv.conf and can update itself when resolv.conf changes there should be no need to use that crutch though. We just need to make sure resolv.conf is there even when empty. I checked this again, and dnsmasq only needs the directory containing the resolv file for a successful startup, so that it can put an inotify on it. The resolv file itself does not need to exist and will be picked up by dnsmasq through inotify as soon as it appears. So, either /etc or /var/run/netconfig must be missing at the point in time when dnsmasq fails to start. Unfortunately these two cases cannot be distinguished from the error message and I cannot imagine for either of the two to not exist at that point in time, given that dnsmasq orders itself After=network.target . /var/run is symlink to /run which is mounted as tmpfs. # ls -l /var/run lrwxrwxrwx 1 root root 4 Mar 31 07:49 /var/run -> /run Now I use resolv-file=/var/run/netconfig/resolv.conf in dnsmasq config to overcome symlink resolution. dnsmasq still fails at the startup. Apr 01 19:09:41 localhost dnsmasq[999]: dnsmasq: syntax check OK. Apr 01 19:09:41 localhost dnsmasq[1005]: dnsmasq: directory /var/run/netconfig/resolv.conf for resolv-file is missing, cannot poll Apr 01 19:09:41 localhost dnsmasq[1005]: directory /var/run/netconfig/resolv.conf for resolv-file is missing, cannot poll Apr 01 19:09:41 localhost dnsmasq[1005]: FAILED to start up Does it work if you use this? resolv-file=/run/netconfig/resolv.conf try # echo "d /run/netconfig 0755 root root -" > /etc/tmpfiles.d/netconfig.conf (In reply to Reinhard Max from comment #10) > Does it work if you use this? > > resolv-file=/run/netconfig/resolv.conf It still fails: Apr 01 19:18:39 localhost dnsmasq[975]: dnsmasq: syntax check OK. Apr 01 19:18:39 localhost dnsmasq[980]: dnsmasq: directory /run/netconfig/resolv.conf for resolv-file is missing, cannot poll Apr 01 19:18:39 localhost dnsmasq[980]: directory /run/netconfig/resolv.conf for resolv-file is missing, cannot poll Apr 01 19:18:39 localhost dnsmasq[980]: FAILED to start up In this case, Ludwig's suggestion from comment 11 should help and work even without a resolv-file line in the dnsmasq config. (In reply to Ludwig Nussel from comment #11) > try > > # echo "d /run/netconfig 0755 root root -" > /etc/tmpfiles.d/netconfig.conf This makes dnsmasq successfully running both with resolv-file=/run/netconfig/resolv.conf and resolv-file=/etc/resolv.conf Duplicate of boo#1123699 where we've added it: localhost:~ # cat /usr/1123699lib/tmpfiles.d/netconfig.conf d /run/netconfig 0755 root root - f /run/netconfig/resolv.conf 0644 root root - f /run/netconfig/yp.conf 0644 root root - L /etc/resolv.conf - - - - /run/netconfig/resolv.conf L /etc/yp.conf - - - - /run/netconfig/yp.conf *** This bug has been marked as a duplicate of bug 1123699 *** |