New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a way to add comments or include files? #52

Closed
carock96 opened this Issue Dec 17, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@carock96

carock96 commented Dec 17, 2013

My named.conf contains a lot of comments from previous edits.

I would like to be able to retain that information if possible. I didn't figure out a way to add comments to the named.conf files generated.

Also, I would like to be able to include files.

I have entries like this.
include "/etc/named.root.key";
include "/etc/named.rfc1912.zones";
include "tsig-kira-ns1.key";
include "root-stubs.conf";

I didn't figure out a way to do that either.

Thanks,
Chuck

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Dec 17, 2013

I think adding comment support would be rather simple. I'm envisioning adding a comment box to views, acls, keys, options, and logging configs.

Having the ability to include additional files is complicated because there will be no way of running named-checkconf prior to config saves as it's currently performed. The reason is fmDNS generates all of the config files and writes them to a local temporary directory on the fmHost (server UI) to run named-checkconf. The included files would not be written thus causing the checks to fail. One idea is to create empty files that get included for the checks since fmDNS would have no way of knowing their contents.

@carock96

This comment has been minimized.

carock96 commented Dec 17, 2013

Maybe the temporary named.conf file could be in the named directory, just not named named.conf until it passes the test.

It looks like the command will also allow you to set a directory for checking includes as well.

named-checkconf [-h] [-v] [-j] [-t directory] {filename} [-p] [-z]

   -t directory
       Chroot to directory so that include directives in the configuration file are processed as if run by a similarly chrooted named.

   filename
       The name of the configuration file to be checked. If not specified, it defaults to /etc/named.conf.

I like the different filename option since you aren't messing with directory paths logically (in the brain).

There would also be an opportunity to create a roll-back feature if the config change didn't work, you could have a local previous copy to restore maybe? If you don't already have something like that in the database.

Chuck

WillyXJ pushed a commit that referenced this issue Dec 26, 2013

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Dec 26, 2013

Hi Chuck,

Changes have been checked in to the 1.1-release branch (https://github.com/WillyXJ/facileManager/tree/1.1-release) that support the use of comments in the configs. Feel free to test the changes out if you have a test or POC environment.

Please note, v1.1 is not released so it cannot be considered stable yet.

I'm still working on the request to include files that are not generated by fmDNS.

WillyXJ pushed a commit that referenced this issue Jan 13, 2014

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Jan 14, 2014

Hi Chuck,

I've been pondering your request to include files that are not managed by fmDNS and started wondering what the benefit would be (given the example files you listed). Is there a reason those file contents could not be added to fmDNS? TSIG keys are already supported by fmDNS and support to create stub zones should be simple enough to add to v1.1.

Let me know your thoughts.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Feb 21, 2014

Adding support to include files not generated by fM does not seem doable at this time. Given the above example files, support for keys and stub zones work in v1.1 to achieve the same results.

@WillyXJ WillyXJ closed this Feb 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment