Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940651 - net-dns/bind: Allow multiple instances in initscript
Summary: net-dns/bind: Allow multiple instances in initscript
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-10-02 14:56 UTC by pa4wdh
Modified: 2024-10-24 19:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch for named.init-r15 (named.init-r15.patch,503 bytes, patch)
2024-10-02 14:57 UTC, pa4wdh
Details | Diff
Proposed patch to named.init-r14 (named.init-r14.patch,3.21 KB, patch)
2024-10-09 06:52 UTC, pa4wdh
Details | Diff
New patch for named.init-r15 (named.init-r15.patch,1.61 KB, patch)
2024-10-24 19:00 UTC, pa4wdh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pa4wdh 2024-10-02 14:56:36 UTC
With the current OpenRC script it is already possible to run multiple instances of named, only bug left is that all instances are stopped when a single instance is stopped.

Reproducible: Always

Steps to Reproduce:
1. Create two chroots for bind, they can be copies. Make sure they can run.
2. Create symlinks in /etc/init.d called named.<instance> pointing to named
3. Create /etc/conf.d/named.<instance name> files, make sure to use the different chroots you created in step 1
4. Start both instances with /etc/init.d/named.<instance 1> start and /etc/init.d/named.<instance 2> start, both should be running now
5. Stop one instance: /etc/init.d/named.<instance 1> stop
Actual Results:  
Both instances are stopped.

Expected Results:  
Only the intended instance should be stopped.

Bug is caused by the way start-stop-daemon is used in the stop function of the initscript, i'll attach a patch.

The script is not documented to allow this usage, so i'm filing it as an enhancement.
Comment 1 pa4wdh 2024-10-02 14:57:25 UTC
Created attachment 904678 [details, diff]
Proposed patch for named.init-r15

Proposed patch for named.init-r15
Comment 2 pa4wdh 2024-10-09 06:52:56 UTC
Created attachment 905121 [details, diff]
Proposed patch to named.init-r14

Updated patch for named.init-r14. The output did not state which instance it was starting/stopping/reloading, with the updated patch ${SVCNAME} is used so it does show that information.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-24 11:27:08 UTC
(In reply to pa4wdh from comment #2)
> Created attachment 905121 [details, diff] [details, diff]
> Proposed patch to named.init-r14
> 
> Updated patch for named.init-r14. The output did not state which instance it
> was starting/stopping/reloading, with the updated patch ${SVCNAME} is used
> so it does show that information.

I don't think we want to change -r14 which is for EOL 9.16.x. 

Is your -r15 change at https://bugs.gentoo.org/940651#c1 fine? You marked it as obsolete so I'm not sure.
Comment 4 pa4wdh 2024-10-24 19:00:02 UTC
Created attachment 906646 [details, diff]
New patch for named.init-r15

I'm sorry, that's my mistake, i intended to make a new patch for -r15 but somehow mixed it up with -r14. This new attachment is the same patch for named.init-r15.