Opened 8 years ago

Closed 8 years ago

#1997 closed enhancement (complete)

Convert static data source to new data source

Reported by: shane Owned by: vorner
Priority: medium Milestone: Sprint-20120612
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 5 Add Hours to Ticket: 0
Total Hours: 2.51 Internal?: no

Description

We need to support the built-in answers with our new data source.

At the same time, we may also want to make it configurable.

Specifically, we should allow:

  1. Disabling VERSION.BIND
  2. Setting VERSION.BIND to a specific string
  3. Disabling HOSTNAME.BIND
  4. Setting HOSTNAME.BIND to a specific string
  5. Disabling AUTHORS.BIND (or setting to a specific string?)
  6. Disabling ID.SERVER
  7. Setting ID.SERVER to a specific string

There appears to also be some DNS64 voodoo with the latest BIND 9, but probably we can defer that until some day when we implement DNS64 in BIND 10.

Subtickets

Change History (9)

comment:1 Changed 8 years ago by vorner

Hello

I'd like to remind that as we talked on the F2F, it would be possible to implement it this way:

  1. Make sure we can configure data sources properly, including data sources for other than IN class.
  2. Generate version.bind master file and place it to some known location.
  3. Modify the default configuration to create an In-Memory data source from that master file.

The user than would be able to either disable it completely through configuration, or modify the master file to change the options.

comment:2 Changed 8 years ago by jelte

  • Milestone changed from Next-Sprint-Proposed to Sprint-20120612

comment:3 Changed 8 years ago by vorner

  • Owner set to vorner
  • Status changed from new to accepted

comment:4 Changed 8 years ago by vorner

  • Owner changed from vorner to UnAssigned
  • Status changed from accepted to reviewing

Hello

It is ready for review.

I took the approach I described. The data source is an in-memory one, but there's a new factory for it, with hardcoding the options. The only configuration is the file to load. The file is generated (by providing the version and the list of authors from the AUTHORS file ‒ which probably solves a ticket I saw somewhere by a sideeffect).

If this is merged, it would be used by providing a default configuration in the #1976 ticket. I'll put a note there when it is merged.

I don't think this needs a changelog entry. The data source is not used anywhere yet.

comment:5 Changed 8 years ago by jelte

  • Owner changed from UnAssigned to jelte

comment:6 follow-up: Changed 8 years ago by jelte

  • Owner changed from jelte to vorner

One minor issue; the tests use TEST_DATA_DIR for the location of static.zone, I believe this should be TEST_DATA_BUILDDIR since the file is generated at build time.

I am kinda wondering on whether editing a zone file is the friendliest of ways to change version.bind (the mostly used one), but at this point I have no better suggestion and this seems at least good enough so we can get rid of the old one (for which this would already be a big improvement).

So with the test fix i think this is ready for merge.

comment:7 in reply to: ↑ 6 Changed 8 years ago by vorner

  • Owner changed from vorner to jelte

Hello

Replying to jelte:

One minor issue; the tests use TEST_DATA_DIR for the location of static.zone, I believe this should be TEST_DATA_BUILDDIR since the file is generated at build time.

Actually, there are two files static.zone. One is the generated one and one is tested, in tests/testdata. The later one is not generated and is directly in git. It's the one used in the tests (I want the tests to have the same content all the time).

I believe if it was like you say, distcheck would fail for me and it didn't.

OK to merge this way?

Thanks

comment:8 Changed 8 years ago by jelte

  • Owner changed from jelte to vorner

(recap of jabber conversation for record keeping)

sorry, my bad, but it does fail for me, in that case i guess the file needs to be added to EXTRA_DIST in src/lib/datasrc/tests/Makefile.am

comment:9 Changed 8 years ago by vorner

  • Resolution set to complete
  • Status changed from reviewing to closed
  • Total Hours changed from 0 to 2.51
Note: See TracTickets for help on using tickets.