Opened 12 years ago

Last modified 6 years ago

#1 new enhancement

DNS integration

Reported by: Kris Deugau Owned by:
Priority: major Milestone: 3.0
Version: Keywords:
Cc:

Description (last modified by Kris Deugau)

Use RPC interface defined in DNSAdmin trunk/v1.2

  • set default rDNS on blocks, or custom entries on per-IP allocations
  • retrieve current rDNS for a block or IP

Change History (21)

comment:1 Changed 11 years ago by Kris Deugau

comment:2 Changed 9 years ago by Kris Deugau

Description: modified (diff)
Milestone: 3.0

comment:3 Changed 9 years ago by Kris Deugau

(In [582]) /trunk

Begin adding DNS integration via RPC. See #1.
IPDB.pm

  • Add a global in IPDB.pm to identify the URL for RPC DNS changes. A blank URL means this capability is disabled. (also MyIPDB.pm)
  • Accept extra parameters in addMaster() for DNS changes (default rDNS pattern, DNS location/scope/view) and while we're at it, add space to handle VRF as an informational field
  • Drop maskbits from INSERTs in addMaster()
  • Make the RPC call to add a reverse zone when adding a new master block. To assist with export caching, we split the zone into /16 or /24 chunks and add each one separately.

main.cgi

  • Retrieve DNS locations for adding a master block
  • Pass the HTTP user in to addMaster() for logging in the DNS backend

Modify templates for add master
Remove long-obsolete function in widgets.js, add function for:
Add rDNS pattern reference page

Note the RPC calls require at least dnsadmin:trunk@r447 to work properly.

comment:4 Changed 9 years ago by Kris Deugau

(In [585]) /trunk

Reverse DNS RPCing should now be complete for all add operations.
See #1.

Some fine-tuning may still be needed, eg for static IPs, convert
template placeholders before doing the RPC call; this could also
be done entirely on the DNS side at export instead.

comment:5 Changed 9 years ago by Kris Deugau

(In [586]) /trunk

Add rDNS to edit allocation part 1 - retrieve information for
the edit page. See #1.

comment:6 Changed 9 years ago by Kris Deugau

(In [587]) /trunk

Minor cleanup of current RPC calls for consistency. See #1.

  • $rpc_url is checked in _rpc(), don't (usually) need to check before calling
  • remove a debugging print
  • remove a dangling local Frontier::Client object

comment:7 Changed 9 years ago by Kris Deugau

(In [588]) /trunk

Allocation update should be complete for DNS changes. See #1.

comment:8 Changed 9 years ago by Kris Deugau

(In [589]) /trunk

Tweak and fiddle allocation delete stage 1 for rDNS. See #1.
Note the autosetting of the "Remove forward entry?" checkbox
needs to be reviewed and tweaked further, probably.

comment:9 Changed 9 years ago by Kris Deugau

(In [590]) /trunk

RPC integration for allocation-delete should be complete. See #1.
Requires dnsadmin:/trunk@r459 or newer.

  • Pass a couple more bits into deleteBlock()
  • Use the new values when making the RPC call
  • Rearrange the delete-confirm page a little to allow the new "delete forward DNS too?" checkbox to actually contribute
  • Tweak new-allocation RPC call a little; don't bother if no rDNS was passed in.

comment:10 Changed 9 years ago by Kris Deugau

(In [591]) /trunk

File off rough edges doing DNS updates for deleting allocations. See #1.

  • pass back and handle more subtle variations on WARN
  • add a watch comment noting some bizarre behaviour that could not be duplicated later.
  • more fully handle large allocations spanning multiple reverse zones (eg, /23 dynamic DSL spans 2 /24 reverse zones)
  • retrieve the DNS pattern from the parent in case of zone-spanning block deletes; the records in the zone can't be relied on to rebuild an "unused"-ish record in this case.

comment:11 Changed 9 years ago by Kris Deugau

(In [591]) /trunk

File off rough edges doing DNS updates for deleting allocations. See #1.

  • pass back and handle more subtle variations on WARN
  • add a watch comment noting some bizarre behaviour that could not be duplicated later.
  • more fully handle large allocations spanning multiple reverse zones (eg, /23 dynamic DSL spans 2 /24 reverse zones)
  • retrieve the DNS pattern from the parent in case of zone-spanning block deletes; the records in the zone can't be relied on to rebuild an "unused"-ish record in this case.

Should use dnsadmin:trunk/@r460 or higher for proper behaviour.

comment:12 Changed 7 years ago by Kris Deugau

(In [674]) /trunk

Start extending rDNS support to allow entering per-IP reverse names. See #1.

  • configuration for maximum IP list length
  • CSS to support hideable space so longer lists don't distort and confuse the page too much
  • Hideable space on the assignment confirmation page for per-IP fields
  • Generate IP list for assignment confirmation - note we can't do it on the previous page without heavy AJAX (or heavier Javascript) because we don't know what block we're even assigning at that stage.

comment:13 Changed 7 years ago by Kris Deugau

(In [675]) /trunk

Extend per-IP rDNS through the "confirm add" page and the "edit" page. See #1.

  • Add flag in getBlockRDNS return to indicate if the results are from local caching instead of RPC results. There isn't really a clear way to globally flag "RPC server is up".
  • Add a sub to retrieve per-IP reverse DNS information for a passed CIDR range. Not limited in IPDB.pm, but dnsadmin will refuse to return anything for a block larger than /24 (v4) or /120 (v6) - an 8 bit inverse mask.
  • Use the new sub on editing a small(ish) non-pool block. CSS magic notwithstanding, handling more than 32 IPs in a list like this is awkward.

comment:14 Changed 7 years ago by Kris Deugau

(In [677]) /trunk

Collect and pass through per-IP rDNS. Still need to cache these locally.
See #1.

comment:15 Changed 7 years ago by Kris Deugau

(In [690]) /trunk

Head off a potential point of confusion by blocking expandable template
patterns in reverse DNS for IPv6. At best they'll never work the same
way as for IPv4 simply due to the scale of the address space. Could be
considered for /120 and smaller allocations for network infrastructure
someday, maybe. See #1.

comment:16 Changed 7 years ago by Kris Deugau

(In [690]) /trunk

Head off a potential point of confusion by blocking expandable template
patterns in reverse DNS for IPv6. At best they'll never work the same
way as for IPv4 simply due to the scale of the address space. Could be
considered for /120 and smaller allocations for network infrastructure
someday, maybe. See #1 and #22.

comment:17 Changed 6 years ago by Kris Deugau

(In [744]) /trunk

Fill in first major block of rDNS for mergeBlocks(); new allocation is
a container. See #1 and #8.

comment:18 Changed 6 years ago by Kris Deugau

(In [750]) /trunk

Update "edit block" page to use per-block rDNS-is-available flag to
decide whether to show rDNS segment or not. See #1.

comment:19 Changed 6 years ago by Kris Deugau

(In [754]) /trunk

rDNS call management wrapup. See #41, #1.

Wrap almost all existing RPC calls in suitable barriers so we don't try
to make changes for IP blocks not in dnsadmin:

  • Add new allocation (any type - note, may not handle edge case of a multizone block well or at all)
  • Allocation update
  • Split block
  • Shrink block
  • Delete allocation (arguably this could be done unconditionally)

Note an exception to skipping rDNS changes when deleting a master block.

Fix a minor logic bug in getBlockRDNS; return the cached value and leave
the cached flag set if nothing was retrieved. This seems marginally less
wrong than retrieving nothing and unsetting the flag.

comment:20 Changed 6 years ago by Kris Deugau

(In [758]) /trunk

Refine calls to getBlockData() in allocateBlock() and updateBlock() for
proper sourcing and handling of rDNS-is-available flags. See #1, #41.

comment:21 Changed 6 years ago by Kris Deugau

(In [873]) /trunk

Clean up dnsavail entries on deallocation of a master block. See #1.

Note: See TracTickets for help on using tickets.