D2CfgMgr::buildParams now validates all of the
top level params prior to calling the D2Params
constructor. This allows element position info
to be included in error logging.
[3436] Added position info to top level parser creation in D2
Added element position argument to DCfgMgrBase::createConfigParser(),
so derivations have access to print position info unsupported top level
element errors.
Removed two log messages DCT_ORDER_ERROR and DCT_ORDER_NO_ELEMENT. These
conditions are well explained in exceptions thrown and these logs just
cluttered the log output.
Removed extra text from DCTL_CONFIG_LOAD_FAIL and DCTL_PARSER_FAIL log
messages. The log ID is self-explanatory and the underlying exceptions
provide ample explanation of the error. Makes the log output much easier
to understand.
Revised items-not-in-parse-order detection in DCfgMgrBase::parseConfig().
Rather than complicated counting logic, objects are removed from the list
as they are parsed. Any left over were not in the parsing-order.
Removed try-catch-throw from DCfgMgrBase::buildAndCommit. This method
already throws its own exception. Catching, logging, and re-throwing
exceptions from underneath it really just server to clutter the log.
distcheck was failing to tests/dhcp(4/6)_process_tests.sh.
Since these files are now constructed from a .in file,
they must be pathed in abs_builddir.
dhcp(4/6)/tests/Makefile.am updated.
Tomek Mrugalski [Wed, 25 Jun 2014 12:15:49 +0000 (14:15 +0200)]
[3413] Changes after review:
- dhcp6_test.py removed
- src/lib/testuitls/testdata/*.wire files are now in repo,
no longer need python3 script to generate
- src/lib/cc/proto_defs.h added to repo, no longer autogenerated
- Added comment to get-rdatacode.py
- removed LIBRARY_PATH_PLACEHOLDER hacks from several Makefiles.
- ChangeLog entry added.
Marcin Siodelski [Wed, 25 Jun 2014 08:25:46 +0000 (10:25 +0200)]
[3422] Address review comments.
- Renamed kea4 and kea6 parameters to dhcp4 and dhcp6
- Location of the kea binaries is specified in the keactrl.conf
- Swap pools and subnets in kea.conf.
- Renamed keactrl commit command to reload
- Added -s and -c command line options.
Marcin Siodelski [Mon, 23 Jun 2014 17:02:46 +0000 (19:02 +0200)]
[3437] Filter out packets sent to global unicast address.
On BSD the multicast packets are received on the socket bound to any
address. So, the packets sent to global unicast address must be filtered
out by the DHCP server.
[3407] Added more thorough work around for #3470 issue
Move signal hanlding initialization til after the
initial configuration but before calling runProcess().
Added additional call to clear the SignalSet inside
catch() block for runProcess.
[3407] Added workaround for SignalSet bug, see Trac #3470
Added workaround to DControllerBase to explicitly clear
its SignalSet before exiting launch().
SignalSets can outlive their static lists which can cause
destructing them as part of process exit segfault.
Once this is fixed under #3470 the workaround can be removed.
[3407] Fixed cppcheck complaint, and a failed unit test on Centos
IOSignal.construction unit test fails on Centos when other tests are
run. IOSignal::sequence_id_ which is static doesn't reliably get zero'd out
under gtest.
DController was extended to instantiate an IOSignalQueue and register for
signals with a SignalSet. The default implementation for signal processing
supports SIGHUP as config file reload, and SIGINT/SIGTERM for graceful
shutdown. D2Controller inherits this support without change.
A good deal of work went into the unit test classes as well, particularly
DControllerTest.
[3407] Added one-shot behavior to set asiolink::IntervalTimer
asiolink::IntervalTimer::setup() has been extended to accept a mode
parameter which determines if the timer will reschedule itself after
each expiration (default behavior), or if it should only run for a
single interval and stop (one-shot).
[3407] Added on-receipt signal handling to util::SignalSet
util::SignalSet now supports registering a signal handler
from within it's internal handler. This allows a custom
handler to process signals as soon as they occur, rather
than through deferred processing.
[master] Bundy version of D2Controller missing handlers
Added static handlers for ModuleSession configuration and command
handling to BUNDY version of D2Controller that were removed from
DControllerBase as per 3401 review.
Static handlers were removed from DControllerBase.
Developer's guide has been updated to with --with-kea-config
discussion and updated diagrams.
Other minor corrections.
(Note ingore diffs in the diagram .svg files, they aren't particularly
meaningful to the human eye).
[3405] Properly initialize sigaction data for SignalSet object.
Had to use memset to reset sa_action structure. Without that the signal
handled wasn't installed correctly because of the random data in the
sigaction structure and caused unit tests to fail.
The configuration switch --with-kea-config, now selects between
two versions of D2Controller:
1. One which must run as a BUNDY module and is implemented in
bundy_d2_controller.(h/cc)
All of the BIND10 support was extracted from DControllerBase and moved
into this version of D2Controller.
This controller is tested in tests/bundy_d2_controller_unittests.cc
2. One that runs as a stand alone executable which must be supplied
with a configuration file via the command line and is implemented in
d2_controller.(h/cc).
This version of D2Controller is nearly identical the the original.
DControllerBase supports configuration from file.
This controller is tested in tests/d2_controller_unittests.cc
DControllerBase now inherits from Daemon which keeps it in step with
K4 and K6.
The stand-alone mode flag has been removed from all controllers.
[3405] LeaseMgr is not started until server is configured.
Starting lease manager in the server constructor implied the use of the
default memfile for a short period until the server is configured. The
default memfile configuration used the persistence (writing leases to disk)
which in many cases required root privileges. This caused some unit tests
to fail.