#1371 Missing resolv.conf should be non-fatal
Closed: Fixed None Opened 6 years ago by sgallagh.

https://bugzilla.redhat.com/show_bug.cgi?id=830095 (Red Hat Enterprise Linux 6)

Description of problem:
sssd silently fails to start if /etc/resolv.conf does not exist. This happens
even if /etc/nsswitch.conf doesn't include dns for the hosts map at all.

Version-Release number of selected component (if applicable):
sssd-1.5.1-66.el6_2.3.x86_64

How reproducible:
always

Steps to Reproduce:
1. rm -f /etc/resolv.conf
2. sed -i "s,dns,,g" /etc/nsswitch.conf
3. service sssd restart

Actual results:
[root@l2-node01 ~]# service sssd restart
Stopping sssd:                                             [  OK  ]
Starting sssd:                                             [  OK  ]
[root@l2-node01 ~]# ps xaw | grep sssd
12869 pts/0    S+     0:00 grep sssd

Expected results:
[root@l2-node01 ~]# service sssd restart
Stopping sssd:                                             [  OK  ]
Starting sssd:                                             [  OK  ]
[root@l2-node01 ~]# ps xaw | grep sssd
12885 ?        Ss     0:00 /usr/sbin/sssd -f -D
12887 ?        S      0:00 /usr/libexec/sssd/sssd_be -d 0 --debug-to-files
--domain default
12888 ?        S      0:00 /usr/libexec/sssd/sssd_nss -d 0 --debug-to-files
12889 ?        S      0:00 /usr/libexec/sssd/sssd_pam -d 0 --debug-to-files
12891 pts/0    S+     0:00 grep sssd

Additional info:
debug log shows what's going on: sssd tries to monitor /etc/resolv.conf for
changes because of its internal resolver:

[root@l2-node01 ~]# sssd -d 10 -i
(Fri Jun  8 10:04:29 2012) [sssd] [ldb] (6): server_sort:Unable to register
control with rootdse!
(Fri Jun  8 10:04:29 2012) [sssd] [confdb_get_domain_internal] (1): No
enumeration for [default]!
(Fri Jun  8 10:04:29 2012) [sssd] [ldb] (6): server_sort:Unable to register
control with rootdse!
(Fri Jun  8 10:04:29 2012) [sssd] [server_setup] (3): CONFDB:
/var/lib/sss/db/config.ldb
(Fri Jun  8 10:04:29 2012) [sssd] [monitor_config_file] (0): Could not stat
file [/etc/resolv.conf]. Error [2:No such file or directory]

Workaround is to create an empty /etc/resolv.conf.

Probably we could test for initial file existence and then skip this check (or better, just switch to our fallback mode when inotify is unavailable on the system of polling for the file every few minutes).


Fields changed

blockedby: =>
blocking: =>
coverity: =>
feature_milestone: =>
milestone: NEEDS_TRIAGE => SSSD 1.10.0
priority: minor => critical
tests: => 0
testsupdated: => 0
upgrade: => 0

Fields changed

proposed_priority: => Important

Cleaning the 1.10 milestones before putting tickets into it.

milestone: SSSD 1.10.0 => Temp milestone

Moving planned features and bug fixes into the 1.10 bucket.

milestone: Temp milestone => SSSD 1.10.0

Fields changed

milestone: SSSD 1.10.0 => Temp milestone

Moving all the features planned for 1.10 release into 1.10 beta.

milestone: Temp milestone => SSSD 1.10 beta

Fields changed

priority: critical => major

Fields changed

priority: major => minor

Fields changed

priority: minor => major

Fields changed

owner: somebody => arielb
status: new => assigned

master: b4262f1

resolution: => fixed
status: assigned => closed

For tickets already closed set the field to "Want"

selected: => Want

Metadata Update from @sgallagh:
- Issue assigned to arielb
- Issue set to the milestone: SSSD 1.10 beta

2 years ago

Login to comment on this ticket.

Metadata