Bug 1406195

Summary: Knotd when HUP-reloading loads wrong symlink, please include upstream patch
Product: [Fedora] Fedora EPEL Reporter: Tobias Florek <me>
Component: knotAssignee: Paul Wouters <pwouters>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: jv+fedora, pspacek, pwouters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-31 12:41:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tobias Florek 2016-12-19 23:48:38 UTC
Description of problem:

As described at https://gitlab.labs.nic.cz/labs/knot/issues/493
knotd when HUP-reloading tries to load the original symlink's destination, not the default file.

There is a patch to be included in the next release. AFAICT, there is no schedule yet on when that might be. Can you include the patch directly?

Version-Release number of selected component (if applicable):
> knotd --version
Knot DNS, version 1.6.8
> rpm -q knot
knot-1.6.8-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
sh-4.2$ # knot.conf is a valid config file
sh-4.2$ cd /tmp/
sh-4.2$ mkdir orig
sh-4.2$ mv knot.conf orig/
sh-4.2$ ln -s orig/knot.conf .
sh-4.2$ vi knot.conf 
sh-4.2$ knot^C
sh-4.2$ mkdir new^C
sh-4.2$ mv orig new
sh-4.2$ ln -fs new/knot.conf .
sh-4.2$ kill -HUP 113

With the following knotd output (logging to stderr).

sh-4.2$ knotd -c /tmp/knot.conf 
Warning: log severity 'all' is no longer supported. Using 'info' instead.
2016-12-19T13:15:33 info: Knot DNS 1.6.8 starting
2016-12-19T13:15:33 info: binding to interface '0.0.0.0@53536'
2016-12-19T13:15:33 info: binding to interface '::@53536'
2016-12-19T13:15:33 info: configured 2 interfaces and 0 zones
2016-12-19T13:15:33 info: loading zones
2016-12-19T13:15:33 warning: no zones loaded
2016-12-19T13:15:33 info: starting server
2016-12-19T13:15:33 info: server started in the foreground, PID 113
2016-12-19T13:15:33 info: binding remote control interface to '/tmp/knot/knot.sock'
2016-12-19T13:16:14 info: reloading configuration
2016-12-19T13:16:14 error: configuration file '/tmp/orig/knot.conf' not found

Comment 1 Petr Špaček 2017-07-31 12:41:38 UTC

*** This bug has been marked as a duplicate of bug 1406194 ***