Bug 12441 - unbound is missing hosts.conf include after restoring a backup of an older version
Summary: unbound is missing hosts.conf include after restoring a backup of an older ve...
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: - Unknown - - Unknown -
Assignee: Adolf Belka
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-15 18:59 UTC by oskar mayr
Modified: 2021-11-27 18:04 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description oskar mayr 2020-06-15 18:59:58 UTC
After restoring a backup of an older version of IPFire (in my case it was a very old 2.19 core update 120), unbound is not able to resolve local hosts anymore, returning NXDOMAIN.

What I found out, is that after restoring the backup on both boxes the following line was missing in unbound.conf (the line was present before restoring):

# Include hosts
include: "/etc/unbound/hosts.conf"

After adding that line back and restarting unbound, everything is working as expected now.

(Maybe related to #12352)
Comment 1 Adolf Belka 2021-05-19 08:18:58 UTC
The Include hosts line was added to the IPFire unbound.conf file in March 2020. Backups carried out prior to that change would not have included that line.

A backup from Core Update 120 (April 2018) would have not included this line and therefore could not restore it.

Therefore this is not a bug.
Comment 2 Michael Tremer 2021-05-25 11:28:35 UTC
Why is unbound.conf part of the backup?

It shouldn't be.
Comment 3 Adolf Belka 2021-05-25 12:57:42 UTC
I have checked the include list in my IPFire and it has /etc/unbound listed.

I have checked my backups and they include all the contents of the /etc/unbound directory.

I checked in the git repository and /etc/unbound was added to the backup/include list in Oct 2016.

From your comment do I take it that I should raise a patch to remove /etc/unbound from the include list
Comment 4 Michael Tremer 2021-05-25 14:45:19 UTC
Hmm, very good question.

I suppose the intention was to have hosts.conf and some other files backed up. Maybe we should just add unbound.conf to the exclude list so that it won't be restored from existing backups any more?!
Comment 5 Adolf Belka 2021-05-25 20:16:12 UTC
(In reply to Michael Tremer from comment #4)
> Hmm, very good question.
> 
> I suppose the intention was to have hosts.conf and some other files backed
> up. Maybe we should just add unbound.conf to the exclude list so that it
> won't be restored from existing backups any more?!

I will raise a patch to do that.
Comment 6 Adolf Belka 2021-05-26 10:45:46 UTC
Patch to add unbound.conf to the exclude list has been submitted.

https://patchwork.ipfire.org/patch/4376/
Comment 7 Peter Müller 2021-09-04 10:09:29 UTC
Resetting this back to ASSIGNED since the patch has not been merged yet.
Comment 8 Adolf Belka 2021-10-22 21:31:55 UTC
Patch has been committed into next (Core Update 161)

https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=d2c2025b3d0271d3afdccc43b550a07b59480c94
Comment 9 Adolf Belka 2021-11-02 15:31:52 UTC
Patch has been released for testing in Core Update 161

https://blog.ipfire.org/post/ipfire-2-27-core-update-161-available-for-testing