[bind10-dev] datasources config
JINMEI Tatuya / 神明達哉
jinmei at isc.org
Thu Sep 22 18:51:41 UTC 2011
At Thu, 22 Sep 2011 11:09:56 +0200,
Jelte Jansen <jelte at isc.org> wrote:
> I've been looking at the datasource factory function for #1206, and what
> i'm currently running into is how we would configure them
I've not fully thought about the points you raised, but I have a
few preliminary comments related to the topic in general.
1. I suspect the data source configuration will have to be system wide
(like TSIG keys) rather than a spec of auth.
2. Note that (at least in our current sqlite3 schema) a data source
may contain zones of multiple RR classes. We provide an accessor
class named DataSourceClient, which is for a given single data
source and for a given single RR class.
3. It may also not so obvious where data source specific configuration
(e.g., the zones contained in the data source) should go. It's
already inconsistent in the current implementation: sqlite3 manages
that information in its database file; for in-memory we need to
specify them via the standard BIND 10 configuration.
Considering 1 and 2, I'd envision a higher level view like this:
- there's a system-wide configuration for "data sources" (not
clients):
[ { type: "sqlite3", config: some way.. },
{ type: "inmemory", config: some way.. },
{ type: "static", config: some way..(or maybe no config here) } ]
- each application has its own configuration of data source "clients",
which is per-class (and eventually maybe per-view when we support
views):
for auth
[ { class: "IN",
clients: [ { type: "inmemory" }, { type: "sqlite3" } ] },
{ class: "CH",
clients: [ { type: "static" } ] } ]
for xfrin
[ { class: "IN",
clients: [ { type: "sqlite3" } ] },
{ class: "CH",
clients: [ { type: "static" } ] } ]
Regarding point 3 (which is also related to how we define config for
each data source in the above example), I guess we might want to
provide a consistent interface, where the generic BIND 10 config only
provides minimal level of information to get access to the data
source, and detailed config is within the data source itself. So, for
example, the system-wide configuration example would be:
[ { type: "sqlite3",
config: { db_file: "/var/bind10/sqlite3_data_source.db" } },
{ type: "mysql",
config: { server_address: "2001:db8::53",
server_port: "53535" } },
{ type: "inmemory", config: some way.. },
{ type: "static", (probably no config here) } ]
(I'm not sure what "config" at this level would be appropriate for the
in-memory data source - maybe we'll introduce an on-disk zone table in
which a list of supported zones is defined with corresponding zone
files).
---
JINMEI, Tatuya
More information about the bind10-dev
mailing list