os-bind: Validate configuration before saving and display errors
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 863
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 10
Description
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
When configuring bind through the web UI, even small misconfiguration can result in Bind rejecting the config. This information is not forwarded to the user and as long as Bind is not fully stopped and started, it will continue to run with the old config, further delaying identifying this problem. Depending on the problem, it can prevent Bind from starting after the router restarts, e.g. after a power outage or system update.
Describe the solution you'd like
The bind plugin should validate that the configuration is valid. Bind has CLI tools to do that, named-checkconf and named-checkzone. These should be invoked and the output forwarded to the web UI to have a proper feedback loop.
Describe alternatives you've considered
An alternative could be a check-config / check-zones button, but I believe this type of feedback should be part of the standard save action.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the os-bind web UI save action and trace the configuration validation flow. Review the proposed named-checkconf and named-checkzone entry points, then confirm that their output reaches the UI and that invalid configurations cannot be saved without actionable feedback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100