Bug 1406194

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 ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: jv+fedora, pwouters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: knot-2.5.3-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-18 01:20:54 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:47:42 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
*** Bug 1406195 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2017-07-31 15:43:45 UTC
knot-2.5.3-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-37e736147d

Comment 3 Fedora Update System 2017-08-01 22:18:57 UTC
knot-2.5.3-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-37e736147d

Comment 4 Fedora Update System 2017-08-18 01:20:54 UTC
knot-2.5.3-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.