JINMEI Tatuya [Tue, 9 Oct 2012 20:17:59 +0000 (13:17 -0700)]
[2339] changed the search order of python executable: seek python3.x first.
this works around a bit awkward installation setup where there's a link
from "python3" to "python3.x" but not from "python3-config" to the
corresponding "python3.x-config". That happens for recent versions of
Homebrew.
JINMEI Tatuya [Fri, 5 Oct 2012 05:19:27 +0000 (22:19 -0700)]
[2244] rename Componet.running() is_running() for consistency.
this branch introduced is_failed() (and failed() was already defined for
a different a purpose), so for consistency it would be better to name
the running version is_xxx too.
JINMEI Tatuya [Fri, 5 Oct 2012 00:27:15 +0000 (17:27 -0700)]
[2244] added a test case that reproduces one aspect of the problem.
the configurator should be able to delete a component to be removed
even if the it's failing (unexpectedly). The current implementation
doesn't handle that condition correctly.
JINMEI Tatuya [Sat, 6 Oct 2012 00:04:28 +0000 (17:04 -0700)]
[2204] cleanup: removed unused func, and renamed "ClientList" with "DataSrc".
getClientListClasses() was removed. It's not used anymore.
a few methods named with "ClientList" were renamed with adding "DataSrc".
The resulting names are a bit long, but since there's no namespace
qualification, simply saying "client" can be confusing (it could be
interpreted to mean DNS clients, for example).
JINMEI Tatuya [Fri, 5 Oct 2012 23:02:01 +0000 (16:02 -0700)]
[2204] completely replaced setClientList with swapDataSrcClientLists.
the test cases using setClientList were updated so they use
swapDataSrcClientLists (some of them work as a test for the "swap" itself).
now we don't need setClientList, so it was removed.
JINMEI Tatuya [Fri, 5 Oct 2012 22:15:18 +0000 (15:15 -0700)]
[2204] simplify configureDataSource by always creating a new lists and swap.
so we don't have to worry about what are in the current lists or rollback
operations.
swapDataSrcClientLists() is newly introduced for AuthSrv. No direc tests
yet (technically bad in terms TDD but the definition is very simple), which
will be provided in the next step.
the lock is now moved inside swapDataSrcClientLists().
note: even though this version builds everything, the amount of work
should be mostly the same because the only save is to create the empty
ClientList when the new and old have the same class of client. The expensive
part is ClientList::configure(). This version doesn't need any more call
to configure() than the old version.
Instead of releasing it directly. While the internal release was more
convenient, it didn't allow for swapping things fast under a mutex and
then spending the time releasing it unlocked.
It was needed when extracting data from a domain tree chain. The chain
now can hold mutable pointers too, so we use that (and some amount of
template bureaucracy) to avoid the cast.
While the interface changed (on the core find function, it is not
possible to pass const node chain and have a mutable node get out), it
doesn't seem to influence the current code. Also, it is a private
interface anyway, so it should be safe.
JINMEI Tatuya [Thu, 4 Oct 2012 00:28:41 +0000 (17:28 -0700)]
[2203] a piggy back fix: prevent redundant initial data configuration.
this addresses the issue described in #2291. Still not really clean,
but thanks to boost::bind we can centralize all the code logic in the
callback, so I think it's now less likely that we forget cleaning it up
when the hack is not necessary.
JINMEI Tatuya [Thu, 4 Oct 2012 00:17:36 +0000 (17:17 -0700)]
[2203] changed configurator class to a simple function.
as it's now completely stateless and can work independently.
the common specialization for the main implementation is defined in a
new created .cc file.
JINMEI Tatuya [Wed, 3 Oct 2012 22:24:22 +0000 (15:24 -0700)]
[2203] refactoring 2nd step: configurator can now be a separate object.
i.e., it's not a singleton any more.
testReconfigure() method isn't needed any more because it doesn't hold
CC session internally.
DatasrcConfiguratorTest.initialization test currently fails and is
disabled for now. The plan is to make the class completely stateless,
at which point we don't even have to think about initialization or cleanup,
and then the test will be able to be removed.
JINMEI Tatuya [Wed, 3 Oct 2012 03:38:31 +0000 (20:38 -0700)]
[2203] changed the callback type of addRemoteConfig to boost::function.
this will make it more convenient, e.g., by allowing the caller to pass
boost::bind encapsulating a class object and a class method.
boost::function is upper compatible to function pointer, so it doesn't
ensure source-level compatibility.
the functor overhead shouldn't matter in this context, and since this module
already uses boost::function this change doesn't introduce additional
dependency.
[1899] Allow other RRtypes in nsec3 table (for RRSIGs)
* The unique constraint on NSEC3 owner per zone is now removed
* NSEC3 RRSIGs are now returned next to their RR set
* Test was adjusted to check for RRSIGs too