NSCD does not monitor files (/etc/resolv.conf) properly and it does not follow new name servers added in to the resolv.conf file unless it restart?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6.6

    • Prior to glibc-2.12-1.149.el6_6.7
  • Red Hat Enterprise Linux 7.2

Issue

  • Using the "check-files hosts yes"-option in nscd.conf turns on the inotify-support on resolv.conf, which in turns enables nscd to watch for changes in that file and call res_init (); when changes occurs. The problem though is that the inotify-watch isn't "readded" when the file has been moved, when editing the file with a texteditor for example.

Resolution

Red Hat Enterprise Linux 6.6 has following zstream fixed released

  • This update glibc-2.12-1.149.el6_6.7 adds a system of inotify-based monitoring and stat-based backup monitoring for nscd configuration files. As a result, nscd now detects changes to its configuration files and reloads the data properly, which prevents it from returning stale data.

Red Hat Enterprise Linux 7.2 has following fixed released

  • This update glibc-2.17-105.el7 adds a system of inotify-based monitoring and stat-based backup monitoring for nscd configuration files. As a result, nscd now detects changes to its configuration files and reloads the data properly, which prevents it from returning stale data.

Root Cause

  • Previously, the nscd daemon did not properly reload modified data when the user edited monitored nscd configuration files. As a consequence, nscd returned stale data to system processes.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments