Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • nsd nsd
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Debian DNS Team
  • nsdnsd
  • Merge requests
  • !1

Systemd fixes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon Deziel requested to merge sdeziel-guest/nsd:systemd-fixes into debian/master Oct 27, 2018
  • Overview 1
  • Commits 4
  • Pipelines 0
  • Changes 1

With those fixes, nsd starts without complaining.

The CAP_CHOWN is not idea but it silences errors shown in red by journalctl:

Oct 27 21:27:50 knowing-snail nsd[1685]: [2018-10-27 21:27:50.627] nsd[1685]: notice: nsd starting (NSD 4.1.25)
Oct 27 21:27:50 knowing-snail nsd[1685]: cannot chown 111.115 /run/nsd/nsd.pid: Operation not permitted
Oct 27 21:27:50 knowing-snail nsd[1685]: cannot overwrite the pidfile /run/nsd/nsd.pid: Operation not permitted
Oct 27 21:27:50 knowing-snail nsd[1685]: [2018-10-27 21:27:50.632] nsd[1685]: error: cannot chown 111.115 /run/nsd/nsd.pid: Operation not permitted
Oct 27 21:27:50 knowing-snail nsd[1685]: [2018-10-27 21:27:50.632] nsd[1685]: error: cannot overwrite the pidfile /run/nsd/nsd.pid: Operation not permitted
Oct 27 21:27:50 knowing-snail nsd[1686]: nsd started (NSD 4.1.25), pid 1685

Upstream was receptive to lower the log level of the PID chown failure for unbound so presumably they would accept the same change for nsd. I didn't get the time to open the bug upstream but feel free to not merge the CAP change.

During a service stop some warnings/errors will be logged because nsd wants to unlink its PID:

Oct 27 21:54:17 knowing-snail nsd[2303]: [2018-10-27 21:54:17.885] nsd[2304]: warning: signal received, shutting down...
Oct 27 21:54:17 knowing-snail nsd[2303]: [2018-10-27 21:54:17.885] nsd[2304]: warning: failed to unlink pidfile /run/nsd/nsd.pid: Permission denied
Oct 27 21:54:17 knowing-snail nsd[2304]: failed to unlink pidfile /run/nsd/nsd.pid: Permission denied

This is harmless AFAICT and with RuntimeDirectory, systemd will take care of removing /run/nsd after the daemon is stopped so nothing will be left behind. In this case, I also think that upstream wouldn't mind bumping the verbose level of those failure messages.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: systemd-fixes