BIND 10 #3089: Integrate NameTransaction management into D2UpdateMgr
BIND 10 Development
do-not-reply at isc.org
Tue Dec 17 20:07:13 UTC 2013
#3089: Integrate NameTransaction management into D2UpdateMgr
-------------------------------------+-------------------------------------
Reporter: tmark | Owner:
Type: enhancement | UnAssigned
Priority: medium | Status:
Component: dhcp-ddns | reviewing
Keywords: Task# 6.5 | Milestone: DHCP-
Sensitive: 0 | Kea1.0-alpha
Sub-Project: DHCP | Resolution:
Estimated Difficulty: 0 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by tmark):
* owner: tmark => UnAssigned
* status: assigned => reviewing
Comment:
Until now, D2UpdateMgr has created instances of !NameChangeTransaction
when building transactions. This allowed the D2UpdateMgr to be developed
and tested ahead of the lower order classes. Now that both
!NameAddTransaction and !NameRemoveTransaction have been implemented, this
ticket updates D2UpdateMgr to use them accordingly. This basic change is
in D2UpdateMgr::makeTransaction().
Since the transaction classes are fully functional, the unit tests added
to D2UpdateMgr with this ticket are relatively rich. In these tests the
transactions build real update requests which are actually sent via
!DNSClient to a !FauxServer which provides real responses back.
During this testing numerous small changes were identified and made:
* added toText method !DnsServerInfo for better logging.
* added debug level log messages for DNS request send and response
received
* altered D2UpdateMgr::checkFinishedTransactions() to use !isModelDone()
to rather than NameChangeRequest::status to identify transaction
completeness
* DNSClient was modified to store a reference to the caller's message
pointer (see DNSClient::response_). This circumvents an issue in lib/dns
whereby a Message can only be rendered "fromWire" once.
* NameChangeTransaction::startTransaction, sets the NCR status to
ST_PENDING. This had been overlooked.
* NameChangeTransaction::clearDnsUpdateRequest, now clears
update_attempts_. The value was not being reset prior to starting a new
request.
* NameChangeTransaction::DNS_UPDATE_DEFAULT_TIMEOUT has been temporarily
shortened until it is made configurable. This is to keep unit test times
to reasonable limits.
* several new convenience methods, accessors were added for testing
purposes
Several new tests were added to d2_update_mgr_unittests.cc:
* TEST_F(D2UpdateMgrTest, addTransaction)
* TEST_F(D2UpdateMgrTest, removeTransaction)
* TEST_F(D2UpdateMgrTest, errorTransaction)
* TEST_F(D2UpdateMgrTest, multiTransaction)
* TEST_F(D2UpdateMgrTest, multiTransactionTimeout)
A new class, !TimedIO was added to nc_test_utils, which provides the means
to conduct !IOService based tests backed with a "safety" timer.
!FauxServer was modified to be able to reschedule it's next receive. This
allows
it to endlessly receive and respond, once initially started.
Sadly there are no new classes or state diagrams. The following ChangeLog
is proposed:
{{{
7xx. [func] [tmark]
b10-dhcp-ddns D2UpdateMgr now uses the newly implemented
NameAddTransaction and NameRemoveTransaction classes. This allows
it conduction actual DNS update exchanges based upon queued
NameChangeRequests.
(Trac# 3089 git TBD)
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/3089#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list