Skip to content

Fix directory watcher#1211

Open
JaewonHur wants to merge 3 commits intoapple:mainfrom
JaewonHur:fix-directory-watcher
Open

Fix directory watcher#1211
JaewonHur wants to merge 3 commits intoapple:mainfrom
JaewonHur:fix-directory-watcher

Conversation

@JaewonHur
Copy link
Contributor

Current DirectoryWatcher fails if /etc/resolver does not exist. This PR fixes DirectoryWatcher to handle non-existing /etc/resolver directory. If that directory does not exist, it first watches /etc directory to check if /etc/resolver directory is created later. Once it detects new /etc/resolver directory, it starts watching new DNS resolver files there.

This PR also fixes to log the exception thrown by API server's tasks.

Resolves #1207

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

In case of non-existing /etc/resolver starting API server fails.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

In case of target directory doesn't exist, watch the parent directory
first, and start watching the target directory if it is created. Throw
error if parent directory doesn't exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Directory monitor for localhost DNS fails if no resolver directory.

1 participant