[svn] commit: r2730 - in /branches/trac289: ./ doc/ doc/guide/ ext/asio/ src/bin/auth/ src/bin/auth/tests/ src/bin/bind10/ src/bin/bindctl/ src/bin/bindctl/tests/ src/bin/cfgmgr/ src/bin/msgq/ src/bin/usermgr/ src/bin/xfrin/ src/bin/zonemgr/ src/lib/ src/lib/bench/ src/lib/cc/ src/lib/config/ src/lib/config/testdata/ src/lib/datasrc/ src/lib/datasrc/tests/ src/lib/dns/ src/lib/dns/rdata/generic/ src/lib/dns/tests/ src/lib/python/isc/config/ src/lib/python/isc/config/tests/ src/lib/xfr/
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Aug 16 04:02:28 UTC 2010
Author: chenzhengzhang
Date: Mon Aug 16 04:02:27 2010
New Revision: 2730
Log:
Add zonemgr TODO list and revert to r2688 for merge
Added:
branches/trac289/src/bin/zonemgr/TODO
Removed:
branches/trac289/ext/asio/README
branches/trac289/src/bin/auth/change_user.cc
branches/trac289/src/bin/auth/change_user.h
branches/trac289/src/bin/auth/tests/change_user_unittest.cc
branches/trac289/src/lib/bench/
branches/trac289/src/lib/config/testdata/b10-config-bad4.db
Modified:
branches/trac289/ (props changed)
branches/trac289/ChangeLog
branches/trac289/Makefile.am
branches/trac289/configure.ac
branches/trac289/doc/Doxyfile
branches/trac289/doc/guide/bind10-guide.html
branches/trac289/doc/guide/bind10-guide.xml
branches/trac289/src/bin/auth/Makefile.am
branches/trac289/src/bin/auth/asio_link.cc
branches/trac289/src/bin/auth/auth_srv.cc
branches/trac289/src/bin/auth/b10-auth.8
branches/trac289/src/bin/auth/b10-auth.xml
branches/trac289/src/bin/auth/main.cc
branches/trac289/src/bin/auth/tests/Makefile.am
branches/trac289/src/bin/auth/tests/asio_link_unittest.cc
branches/trac289/src/bin/auth/tests/auth_srv_unittest.cc
branches/trac289/src/bin/bind10/bind10.8
branches/trac289/src/bin/bind10/bind10.py.in
branches/trac289/src/bin/bind10/bind10.xml
branches/trac289/src/bin/bindctl/bindcmd.py
branches/trac289/src/bin/bindctl/tests/bindctl_test.py
branches/trac289/src/bin/cfgmgr/b10-cfgmgr.py.in
branches/trac289/src/bin/msgq/b10-msgq.8
branches/trac289/src/bin/msgq/msgq.xml
branches/trac289/src/bin/usermgr/b10-cmdctl-usermgr.py.in
branches/trac289/src/bin/xfrin/ (props changed)
branches/trac289/src/bin/zonemgr/zonemgr.py.in
branches/trac289/src/lib/Makefile.am
branches/trac289/src/lib/cc/ (props changed)
branches/trac289/src/lib/config/Makefile.am
branches/trac289/src/lib/config/testdata/b10-config-bad1.db
branches/trac289/src/lib/config/testdata/b10-config.db
branches/trac289/src/lib/datasrc/ (props changed)
branches/trac289/src/lib/datasrc/static_datasrc.cc
branches/trac289/src/lib/datasrc/tests/static_unittest.cc
branches/trac289/src/lib/dns/ (props changed)
branches/trac289/src/lib/dns/message.h
branches/trac289/src/lib/dns/rdata/generic/rrsig_46.cc (props changed)
branches/trac289/src/lib/dns/rdata/generic/txt_16.cc
branches/trac289/src/lib/dns/tests/ (props changed)
branches/trac289/src/lib/python/isc/config/ccsession.py
branches/trac289/src/lib/python/isc/config/cfgmgr.py
branches/trac289/src/lib/python/isc/config/config_data.py
branches/trac289/src/lib/python/isc/config/tests/ccsession_test.py
branches/trac289/src/lib/python/isc/config/tests/cfgmgr_test.py
branches/trac289/src/lib/python/isc/config/tests/config_data_test.py
branches/trac289/src/lib/xfr/xfrout_client.cc
Modified: branches/trac289/ChangeLog
==============================================================================
--- branches/trac289/ChangeLog (original)
+++ branches/trac289/ChangeLog Mon Aug 16 04:02:27 2010
@@ -1,32 +1,3 @@
-bind10-devel-20100812 released on August 12, 2010
-
- 84. [bug] jinmei, jerry
- This is a quick fix patch for the issue: AXFR fails half the
- time because of connection problems. xfrout client will make
- a new connection every time. (Trac #299, svn r2697)
-
- 83. [build]*
- The configure --with-boost-lib option is removed. It was not
- used since the build included ASIO. (svn r2684)
-
- 82. [func] jinmei
- bin/auth: Added -u option to allow the effective process user
- of the authoritative server after invocation. The same option to
- the boss process will be propagated to b10-auth, too.
- (Trac #268, svn r2675)
-
- 81. [func] jinmei
- Added a C++ framework for micro benchmark tests. A supplemental
- library functions to build query data for the tests were also
- provided. (Trac #241, svn r2664)
-
- 80. [bug] jelte
- bindctl no longer accepts configuration changes for unknown or
- non-running modules (for the latter, this is until we have a
- way to verify those options, at which point it'll be allowed
- again).
- (Trac #99, r2657)
-
79. [func] feng, jinmei
Refactored the ASIO link interfaces to move incoming XFR and
NOTIFY processing to the auth server class. Wrapper classes for
@@ -225,11 +196,7 @@
a remote server. (Trac #218, svn r2038)
49. [func]* jelte
- Use unix domain sockets for msgq. For b10-msgq, the command
- line options --msgq-port and -m were removed. For bind10,
- the -msgq-port option was removed, and the -m command line
- option was changed to be a filename (instead of port number).
- (Trac #183, svn r2009)
+ Use unix domain sockets for msgq. (Trac #183, svn r2009)
48. [func] jelte
bin/auth: Use asio's io_service for the msgq handling.
Modified: branches/trac289/Makefile.am
==============================================================================
--- branches/trac289/Makefile.am (original)
+++ branches/trac289/Makefile.am Mon Aug 16 04:02:27 2010
@@ -41,8 +41,8 @@
coverage: clean-coverage perform-coverage report-coverage
#### include external sources in the distributed tarball:
-EXTRA_DIST = ext/asio/README
-EXTRA_DIST += ext/asio/asio/local/stream_protocol.hpp
+# EXTRA_DIST = ext/asio/README
+EXTRA_DIST = ext/asio/asio/local/stream_protocol.hpp
EXTRA_DIST += ext/asio/asio/local/basic_endpoint.hpp
EXTRA_DIST += ext/asio/asio/local/datagram_protocol.hpp
EXTRA_DIST += ext/asio/asio/local/connect_pair.hpp
Modified: branches/trac289/configure.ac
==============================================================================
--- branches/trac289/configure.ac (original)
+++ branches/trac289/configure.ac Mon Aug 16 04:02:27 2010
@@ -255,6 +255,14 @@
CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
fi
AC_SUBST(BOOST_INCLUDES)
+
+AC_ARG_WITH([boost-lib],
+AC_HELP_STRING([--with-boost-lib=PATH],
+ [specify exact directory for Boost libraries]),
+ [if test "$withval" != "yes" -a "$withval" != "no"; then
+ BOOST_LDFLAGS="-L$withval"
+ fi])
+AC_SUBST(BOOST_LDFLAGS)
#
# Check availability of gtest, which will be used for unit tests.
@@ -407,9 +415,6 @@
src/bin/zonemgr/tests/Makefile
src/bin/usermgr/Makefile
src/lib/Makefile
- src/lib/bench/Makefile
- src/lib/bench/example/Makefile
- src/lib/bench/tests/Makefile
src/lib/cc/Makefile
src/lib/python/Makefile
src/lib/python/isc/Makefile
Modified: branches/trac289/doc/Doxyfile
==============================================================================
--- branches/trac289/doc/Doxyfile (original)
+++ branches/trac289/doc/Doxyfile Mon Aug 16 04:02:27 2010
@@ -568,7 +568,7 @@
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = ../src/lib/cc ../src/lib/config ../src/lib/dns ../src/lib/exceptions ../src/lib/datasrc ../src/bin/auth ../src/lib/bench
+INPUT = ../src/lib/cc ../src/lib/config ../src/lib/dns ../src/lib/exceptions ../src/lib/datasrc ../src/bin/auth
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Modified: branches/trac289/doc/guide/bind10-guide.html
==============================================================================
--- branches/trac289/doc/guide/bind10-guide.html (original)
+++ branches/trac289/doc/guide/bind10-guide.html Mon Aug 16 04:02:27 2010
@@ -2,7 +2,7 @@
The most up-to-date version of this document, along with other documents
for BIND 10, can be found at
<a class="ulink" href="http://bind10.isc.org/docs" target="_top">http://bind10.isc.org/docs</a>.
- </p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230342718">Supported Platforms</a></span></dt><dt><span class="section"><a href="#id1168230342746">Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">Managing BIND 10</a></span></dt></dl></dd><dt><span class="chapter"><a href="#installation">2. Installation</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328220">Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">Quick start</a></span></dt><dt><span class="section"><a href="#install">Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328406">Download Tar File</a></span></dt><dt><s
pan class="section"><a href="#id1168230328426">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230328486">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328584">Build</a></span></dt><dt><span class="section"><a href="#id1168230328599">Install</a></span></dt><dt><span class="section"><a href="#id1168230328622">Install Hierarchy</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#bind10">3. Starting BIND10 with <span class="command"><strong>bind10</strong></span></a></span></dt><dd><dl><dt><span class="section"><a href="#start">Starting BIND 10</a></span></dt></dl></dd><dt><span class="chapter"><a href="#msgq">4. Command channel</a></span></dt><dt><span class="chapter"><a href="#cfgmgr">5. Configuration manager</a></span></dt><dt><span class="chapter"><a href="#cmdctl">6. Remote control daemon</a></span></dt><dd><dl><dt><span class="section"><a href="#cmdctl.spec">Configuration specifi
cation for b10-cmdctl</a></span></dt></dl></dd><dt><span class="chapter"><a href="#bindctl">7. Control and configure user interface</a></span></dt><dt><span class="chapter"><a href="#authserver">8. Authoritative Server</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230329190">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329255">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329285">Loading Master Zones Files</a></span></dt></dl></dd><dt><span class="chapter"><a href="#xfrin">9. Incoming Zone Transfers</a></span></dt><dt><span class="chapter"><a href="#xfrout">10. Outbound Zone Transfers</a></span></dt></dl></div><div class="chapter" title="Chapter 1. Introduction"><div class="titlepage"><div><div><h2 class="title"><a name="intro"></a>Chapter 1. Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230342718">S
upported Platforms</a></span></dt><dt><span class="section"><a href="#id1168230342746">Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">Managing BIND 10</a></span></dt></dl></div><p>
+ </p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230342718">Supported Platforms</a></span></dt><dt><span class="section"><a href="#id1168230342746">Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">Managing BIND 10</a></span></dt></dl></dd><dt><span class="chapter"><a href="#installation">2. Installation</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328220">Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">Quick start</a></span></dt><dt><span class="section"><a href="#install">Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328405">Download Tar File</a></span></dt><dt><s
pan class="section"><a href="#id1168230328425">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230328485">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328596">Build</a></span></dt><dt><span class="section"><a href="#id1168230328611">Install</a></span></dt><dt><span class="section"><a href="#id1168230328642">Install Hierarchy</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#bind10">3. Starting BIND10 with <span class="command"><strong>bind10</strong></span></a></span></dt><dd><dl><dt><span class="section"><a href="#start">Starting BIND 10</a></span></dt></dl></dd><dt><span class="chapter"><a href="#msgq">4. Command channel</a></span></dt><dt><span class="chapter"><a href="#cfgmgr">5. Configuration manager</a></span></dt><dt><span class="chapter"><a href="#cmdctl">6. Remote control daemon</a></span></dt><dd><dl><dt><span class="section"><a href="#cmdctl.spec">Configuration specifi
cation for b10-cmdctl</a></span></dt></dl></dd><dt><span class="chapter"><a href="#bindctl">7. Control and configure user interface</a></span></dt><dt><span class="chapter"><a href="#authserver">8. Authoritative Server</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230329208">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329273">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329303">Loading Master Zones Files</a></span></dt></dl></dd><dt><span class="chapter"><a href="#xfrin">9. Incoming Zone Transfers</a></span></dt><dt><span class="chapter"><a href="#xfrout">10. Outbound Zone Transfers</a></span></dt></dl></div><div class="chapter" title="Chapter 1. Introduction"><div class="titlepage"><div><div><h2 class="title"><a name="intro"></a>Chapter 1. Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230342718">S
upported Platforms</a></span></dt><dt><span class="section"><a href="#id1168230342746">Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">Managing BIND 10</a></span></dt></dl></div><p>
BIND is the popular implementation of a DNS server, developer
interfaces, and DNS tools.
BIND 10 is a rewrite of BIND 9. BIND 10 is written in C++ and Python
@@ -32,8 +32,9 @@
data source backend is SQLite3. The authoritative server
requires SQLite 3.3.9 or newer.
The <span class="command"><strong>b10-xfrin</strong></span> and <span class="command"><strong>b10-xfrout</strong></span>
- modules require the libpython3 library and the Python
- _sqlite3.so module.
+ modules require the libboost library,
+ libpython3 library,
+ and the Python _sqlite3.so module.
</p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Some operating systems do not provide these dependencies
in their default installation nor standard packages
@@ -116,7 +117,7 @@
and, of course, DNS. These include detailed developer
documentation and code examples.
- </p></div><div class="chapter" title="Chapter 2. Installation"><div class="titlepage"><div><div><h2 class="title"><a name="installation"></a>Chapter 2. Installation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230328220">Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">Quick start</a></span></dt><dt><span class="section"><a href="#install">Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328406">Download Tar File</a></span></dt><dt><span class="section"><a href="#id1168230328426">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230328486">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328584">Build</a></span></dt><dt><span class="section"><a href="#id1168230328599">Install</a></span></dt><dt><span class="section"><a href="#id1168230328622">Install
Hierarchy</a></span></dt></dl></dd></dl></div><div class="section" title="Building Requirements"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230328220"></a>Building Requirements</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
+ </p></div><div class="chapter" title="Chapter 2. Installation"><div class="titlepage"><div><div><h2 class="title"><a name="installation"></a>Chapter 2. Installation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230328220">Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">Quick start</a></span></dt><dt><span class="section"><a href="#install">Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328405">Download Tar File</a></span></dt><dt><span class="section"><a href="#id1168230328425">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230328485">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328596">Build</a></span></dt><dt><span class="section"><a href="#id1168230328611">Install</a></span></dt><dt><span class="section"><a href="#id1168230328642">Install
Hierarchy</a></span></dt></dl></dd></dl></div><div class="section" title="Building Requirements"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230328220"></a>Building Requirements</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Some operating systems have split their distribution packages into
a run-time and a development package. You will need to install
the development package versions, which include header files and
@@ -127,8 +128,9 @@
</p><p>
- The Python Library and Python _sqlite3 module are required to
- enable the Xfrout and Xfrin support.
+ The Boost Library, Python Library,
+ and Python _sqlite3 module are required to enable the
+ Xfrout and Xfrin support.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
The Python related libraries and modules need to be built
for Python 3.1.
@@ -176,14 +178,14 @@
the Subversion code revision control system or as a downloadable
tar file. It may also be available in pre-compiled ready-to-use
packages from operating system vendors.
- </p><div class="section" title="Download Tar File"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328406"></a>Download Tar File</h3></div></div></div><p>
+ </p><div class="section" title="Download Tar File"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328405"></a>Download Tar File</h3></div></div></div><p>
Downloading a release tar file is the recommended method to
obtain the source code.
</p><p>
The BIND 10 releases are available as tar file downloads from
<a class="ulink" href="ftp://ftp.isc.org/isc/bind10/" target="_top">ftp://ftp.isc.org/isc/bind10/</a>.
Periodic development snapshots may also be available.
- </p></div><div class="section" title="Retrieve from Subversion"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328426"></a>Retrieve from Subversion</h3></div></div></div><p>
+ </p></div><div class="section" title="Retrieve from Subversion"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328425"></a>Retrieve from Subversion</h3></div></div></div><p>
Downloading this "bleeding edge" code is recommended only for
developers or advanced users. Using development code in a production
environment is not recommended.
@@ -215,7 +217,7 @@
<span class="command"><strong>autoheader</strong></span>,
<span class="command"><strong>automake</strong></span>,
and related commands.
- </p></div><div class="section" title="Configure before the build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328486"></a>Configure before the build</h3></div></div></div><p>
+ </p></div><div class="section" title="Configure before the build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328485"></a>Configure before the build</h3></div></div></div><p>
BIND 10 uses the GNU Build System to discover build environment
details.
To generate the makefiles using the defaults, simply run:
@@ -227,6 +229,7 @@
</p><div class="variablelist"><dl><dt><span class="term">--prefix</span></dt><dd>Define the the installation location (the
default is <code class="filename">/usr/local/</code>).
</dd><dt><span class="term">--with-boost-include</span></dt><dd>Define the path to find the Boost headers.
+ </dd><dt><span class="term">--with-boost-lib</span></dt><dd>Define the path to find the Boost library.
</dd><dt><span class="term">--with-pythonpath</span></dt><dd>Define the path to Python 3.1 if it is not in the
standard execution path.
</dd><dt><span class="term">--with-gtest</span></dt><dd>Enable building the C++ Unit Tests using the
@@ -236,26 +239,31 @@
</p><p>
For example, the following configures it to
- find the Boost headers, find the
+ find the Boost headers and library, find the
Python interpreter, and sets the installation location:
- </p><pre class="screen">$ <strong class="userinput"><code>./configure \
+ </p><pre class="screen">$ <strong class="userinput"><code>./configure --with-boost-lib=/usr/pkg/lib \
--with-boost-include=/usr/pkg/include \
--with-pythonpath=/usr/pkg/bin/python3.1 \
--prefix=/opt/bind10</code></strong></pre><p>
</p><p>
If the configure fails, it may be due to missing or old
dependencies.
- </p></div><div class="section" title="Build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328584"></a>Build</h3></div></div></div><p>
+ </p></div><div class="section" title="Build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328596"></a>Build</h3></div></div></div><p>
After the configure step is complete, to build the executables
from the C++ code and prepare the Python scripts, run:
</p><pre class="screen">$ <strong class="userinput"><code>make</code></strong></pre><p>
- </p></div><div class="section" title="Install"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328599"></a>Install</h3></div></div></div><p>
+ </p></div><div class="section" title="Install"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328611"></a>Install</h3></div></div></div><p>
To install the BIND 10 executables, support files,
and documentation, run:
</p><pre class="screen">$ <strong class="userinput"><code>make install</code></strong></pre><p>
- </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The install step may require superuser privileges.</p></div></div><div class="section" title="Install Hierarchy"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328622"></a>Install Hierarchy</h3></div></div></div><p>
+ </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The install step may require superuser privileges.</p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
+ Depending on your system and the location of your Boost
+ Python and Python shared libraries, you may need to
+ configure your run-time linker to find them (such as
+ setting LD_LIBRARY_PATH).
+ </p></div></div><div class="section" title="Install Hierarchy"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328642"></a>Install Hierarchy</h3></div></div></div><p>
The following is the layout of the complete BIND 10 installation:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<code class="filename">bin/</code> —
@@ -467,7 +475,7 @@
the details and relays (over a <span class="command"><strong>b10-msgq</strong></span> command
channel) the configuration on to the specified module.
</p><p>
- </p></div><div class="chapter" title="Chapter 8. Authoritative Server"><div class="titlepage"><div><div><h2 class="title"><a name="authserver"></a>Chapter 8. Authoritative Server</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230329190">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329255">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329285">Loading Master Zones Files</a></span></dt></dl></div><p>
+ </p></div><div class="chapter" title="Chapter 8. Authoritative Server"><div class="titlepage"><div><div><h2 class="title"><a name="authserver"></a>Chapter 8. Authoritative Server</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230329208">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329273">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329303">Loading Master Zones Files</a></span></dt></dl></div><p>
The <span class="command"><strong>b10-auth</strong></span> is the authoritative DNS server.
It supports EDNS0 and DNSSEC. It supports IPv6.
Normally it is started by the <span class="command"><strong>bind10</strong></span> master
@@ -475,7 +483,7 @@
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
This development prototype release listens on all interfaces
and the non-standard port 5300.
- </p></div><div class="section" title="Server Configurations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329190"></a>Server Configurations</h2></div></div></div><p>
+ </p></div><div class="section" title="Server Configurations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329208"></a>Server Configurations</h2></div></div></div><p>
<span class="command"><strong>b10-auth</strong></span> is configured via the
<span class="command"><strong>b10-cfgmgr</strong></span> configuration manager.
The module name is <span class="quote">“<span class="quote">Auth</span>”</span>.
@@ -495,7 +503,7 @@
</p><div class="variablelist"><dl><dt><span class="term">shutdown</span></dt><dd>Stop the authoritative DNS server.
</dd></dl></div><p>
- </p></div><div class="section" title="Data Source Backends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329255"></a>Data Source Backends</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
+ </p></div><div class="section" title="Data Source Backends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329273"></a>Data Source Backends</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
For the development prototype release, <span class="command"><strong>b10-auth</strong></span>
only supports the SQLite3 data source backend.
Upcoming versions will be able to use multiple different
@@ -508,7 +516,7 @@
The default is <code class="filename">/usr/local/var/</code>.)
This data file location may be changed by defining the
<span class="quote">“<span class="quote">database_file</span>”</span> configuration.
- </p></div><div class="section" title="Loading Master Zones Files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329285"></a>Loading Master Zones Files</h2></div></div></div><p>
+ </p></div><div class="section" title="Loading Master Zones Files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329303"></a>Loading Master Zones Files</h2></div></div></div><p>
RFC 1035 style DNS master zone files may imported
into a BIND 10 data source by using the
<span class="command"><strong>b10-loadzone</strong></span> utility.
Modified: branches/trac289/doc/guide/bind10-guide.xml
==============================================================================
--- branches/trac289/doc/guide/bind10-guide.xml (original)
+++ branches/trac289/doc/guide/bind10-guide.xml Mon Aug 16 04:02:27 2010
@@ -75,8 +75,9 @@
data source backend is SQLite3. The authoritative server
requires SQLite 3.3.9 or newer.
The <command>b10-xfrin</command> and <command>b10-xfrout</command>
- modules require the libpython3 library and the Python
- _sqlite3.so module.
+ modules require the libboost library,
+ libpython3 library,
+ and the Python _sqlite3.so module.
</para></note>
<!-- TODO: this will change ... -->
@@ -271,8 +272,9 @@
</para>
<para>
- The Python Library and Python _sqlite3 module are required to
- enable the Xfrout and Xfrin support.
+ The Boost Library, Python Library,
+ and Python _sqlite3 module are required to enable the
+ Xfrout and Xfrin support.
</para>
<note><simpara>
@@ -485,6 +487,14 @@
</varlistentry>
<varlistentry>
+ <term>--with-boost-lib</term>
+ <listitem>
+ <simpara>Define the path to find the Boost library.
+ </simpara>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>--with-pythonpath</term>
<listitem>
<simpara>Define the path to Python 3.1 if it is not in the
@@ -510,10 +520,10 @@
<para>
For example, the following configures it to
- find the Boost headers, find the
+ find the Boost headers and library, find the
Python interpreter, and sets the installation location:
- <screen>$ <userinput>./configure \
+ <screen>$ <userinput>./configure --with-boost-lib=/usr/pkg/lib \
--with-boost-include=/usr/pkg/include \
--with-pythonpath=/usr/pkg/bin/python3.1 \
--prefix=/opt/bind10</userinput></screen>
@@ -546,6 +556,14 @@
<note>
<para>The install step may require superuser privileges.</para>
</note>
+
+<!-- Trac #148 -->
+ <note><simpara>
+ Depending on your system and the location of your Boost
+ Python and Python shared libraries, you may need to
+ configure your run-time linker to find them (such as
+ setting LD_LIBRARY_PATH).
+ </simpara></note>
</section>
Modified: branches/trac289/src/bin/auth/Makefile.am
==============================================================================
--- branches/trac289/src/bin/auth/Makefile.am (original)
+++ branches/trac289/src/bin/auth/Makefile.am Mon Aug 16 04:02:27 2010
@@ -47,7 +47,6 @@
BUILT_SOURCES = spec_config.h
pkglibexec_PROGRAMS = b10-auth
b10_auth_SOURCES = auth_srv.cc auth_srv.h
-b10_auth_SOURCES += change_user.cc change_user.h
b10_auth_SOURCES += common.h
b10_auth_SOURCES += main.cc
b10_auth_LDADD = $(top_builddir)/src/lib/datasrc/.libs/libdatasrc.a
Modified: branches/trac289/src/bin/auth/asio_link.cc
==============================================================================
--- branches/trac289/src/bin/auth/asio_link.cc (original)
+++ branches/trac289/src/bin/auth/asio_link.cc Mon Aug 16 04:02:27 2010
@@ -368,7 +368,6 @@
dns_message_(Message::PARSE),
custom_callback_(NULL)
{
- socket_.set_option(socket_base::reuse_address(true));
// Set v6-only (we use a different instantiation for v4,
// otherwise asio will bind to both v4 and v6
if (addr.is_v6()) {
Modified: branches/trac289/src/bin/auth/auth_srv.cc
==============================================================================
--- branches/trac289/src/bin/auth/auth_srv.cc (original)
+++ branches/trac289/src/bin/auth/auth_srv.cc Mon Aug 16 04:02:27 2010
@@ -342,8 +342,10 @@
}
try {
- xfrout_client_.connect();
- xfrout_connected_ = true;
+ if (!xfrout_connected_) {
+ xfrout_client_.connect();
+ xfrout_connected_ = true;
+ }
xfrout_client_.sendXfroutRequestInfo(
io_message.getSocket().getNative(),
io_message.getData(),
@@ -366,10 +368,6 @@
verbose_mode_);
return (true);
}
-
- xfrout_client_.disconnect();
- xfrout_connected_ = false;
-
return (false);
}
Modified: branches/trac289/src/bin/auth/b10-auth.8
==============================================================================
--- branches/trac289/src/bin/auth/b10-auth.8 (original)
+++ branches/trac289/src/bin/auth/b10-auth.8 Mon Aug 16 04:02:27 2010
@@ -2,12 +2,12 @@
.\" Title: b10-auth
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: July 29, 2010
+.\" Date: March 16, 2010
.\" Manual: BIND10
.\" Source: BIND10
.\" Language: English
.\"
-.TH "B10\-AUTH" "8" "July 29, 2010" "BIND10" "BIND10"
+.TH "B10\-AUTH" "8" "March 16, 2010" "BIND10" "BIND10"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -22,7 +22,7 @@
b10-auth \- Authoritative DNS server
.SH "SYNOPSIS"
.HP \w'\fBb10\-auth\fR\ 'u
-\fBb10\-auth\fR [\fB\-4\fR] [\fB\-6\fR] [\fB\-a\ \fR\fB\fIaddress\fR\fR] [\fB\-n\fR] [\fB\-p\ \fR\fB\fInumber\fR\fR] [\fB\-u\ \fR\fB\fIusername\fR\fR] [\fB\-v\fR]
+\fBb10\-auth\fR [\fB\-4\fR] [\fB\-6\fR] [\fB\-p\ \fR\fB\fInumber\fR\fR] [\fB\-v\fR]
.SH "DESCRIPTION"
.PP
The
@@ -64,30 +64,13 @@
\fB\-4\fR
.RS 4
Enables IPv4 only mode\&. This switch may not be used with
-\fB\-6\fR
-nor
-\fB\-a\fR\&. By default, it listens on both IPv4 and IPv6 (if capable)\&.
+\fB\-6\fR\&. By default, it listens on both IPv4 and IPv6 (if capable)\&.
.RE
.PP
\fB\-6\fR
.RS 4
Enables IPv6 only mode\&. This switch may not be used with
-\fB\-4\fR
-nor
-\fB\-a\fR\&. By default, it listens on both IPv4 and IPv6 (if capable)\&.
-.RE
-.PP
-\fB\-a \fR\fB\fIaddress\fR\fR
-.RS 4
-The IPv4 or IPv6 address to listen on\&. This switch may not be used with
-\fB\-4\fR
-nor
-\fB\-6\fR\&. The default is to listen on all addresses\&. (This is a short term workaround\&. This argument may change\&.)
-.RE
-.PP
-\fB\-n\fR
-.RS 4
-Do not cache answers in memory\&. The default is to use the cache for faster responses\&. The cache keeps the most recent 30,000 answers (positive and negative) in memory for 30 seconds (instead of querying the data source, such as SQLite3 database, each time)\&.
+\fB\-4\fR\&. By default, it listens on both IPv4 and IPv6 (if capable)\&.
.RE
.PP
\fB\-p \fR\fB\fInumber\fR\fR
@@ -108,15 +91,6 @@
The Y1 prototype runs on all interfaces and on this nonstandard port\&.
.sp .5v
.RE
-.RE
-.PP
-\fB\-u \fR\fB\fIusername\fR\fR
-.RS 4
-The user name of the
-\fBb10\-auth\fR
-daemon\&. If specified, the daemon changes the process owner to the specified user\&. The
-\fIusername\fR
-must be either a valid numeric user ID or a valid user name\&. By default the daemon runs as the user who invokes it\&.
.RE
.PP
\fB\-v\fR
Modified: branches/trac289/src/bin/auth/b10-auth.xml
==============================================================================
--- branches/trac289/src/bin/auth/b10-auth.xml (original)
+++ branches/trac289/src/bin/auth/b10-auth.xml Mon Aug 16 04:02:27 2010
@@ -21,7 +21,7 @@
<refentry>
<refentryinfo>
- <date>July 29, 2010</date>
+ <date>March 16, 2010</date>
</refentryinfo>
<refmeta>
@@ -47,10 +47,7 @@
<command>b10-auth</command>
<arg><option>-4</option></arg>
<arg><option>-6</option></arg>
- <arg><option>-a <replaceable>address</replaceable></option></arg>
- <arg><option>-n</option></arg>
<arg><option>-p <replaceable>number</replaceable></option></arg>
- <arg><option>-u <replaceable>username</replaceable></option></arg>
<arg><option>-v</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -98,8 +95,7 @@
<term><option>-4</option></term>
<listitem><para>
Enables IPv4 only mode.
- This switch may not be used with <option>-6</option> nor
- <option>-a</option>.
+ This switch may not be used with <option>-6</option>.
By default, it listens on both IPv4 and IPv6 (if capable).
</para></listitem>
</varlistentry>
@@ -108,33 +104,8 @@
<term><option>-6</option></term>
<listitem><para>
Enables IPv6 only mode.
- This switch may not be used with <option>-4</option> nor
- <option>-a</option>.
+ This switch may not be used with <option>-4</option>.
By default, it listens on both IPv4 and IPv6 (if capable).
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-a <replaceable>address</replaceable></option></term>
-
- <listitem>
- <para>The IPv4 or IPv6 address to listen on.
- This switch may not be used with <option>-4</option> nor
- <option>-6</option>.
- The default is to listen on all addresses.
- (This is a short term workaround. This argument may change.)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-n</option></term>
- <listitem><para>
- Do not cache answers in memory.
- The default is to use the cache for faster responses.
- The cache keeps the most recent 30,000 answers (positive
- and negative) in memory for 30 seconds (instead of querying
- the data source, such as SQLite3 database, each time).
</para></listitem>
</varlistentry>
@@ -145,20 +116,6 @@
The default is 5300.</para>
<note><simpara>The Y1 prototype runs on all interfaces
and on this nonstandard port.</simpara></note>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-u <replaceable>username</replaceable></option></term>
- <listitem>
- <para>
- The user name of the <command>b10-auth</command> daemon.
- If specified, the daemon changes the process owner to the
- specified user.
- The <replaceable>username</replaceable> must be either a
- valid numeric user ID or a valid user name.
- By default the daemon runs as the user who invokes it.
- </para>
</listitem>
</varlistentry>
Modified: branches/trac289/src/bin/auth/main.cc
==============================================================================
--- branches/trac289/src/bin/auth/main.cc (original)
+++ branches/trac289/src/bin/auth/main.cc Mon Aug 16 04:02:27 2010
@@ -41,7 +41,6 @@
#include <auth/spec_config.h>
#include <auth/common.h>
-#include <auth/change_user.h>
#include <auth/auth_srv.h>
#include <auth/asio_link.h>
@@ -98,10 +97,9 @@
int ch;
const char* port = DNSPORT;
const char* address = NULL;
- const char* uid = NULL;
bool use_ipv4 = true, use_ipv6 = true, cache = true;
- while ((ch = getopt(argc, argv, "46a:np:u:v")) != -1) {
+ while ((ch = getopt(argc, argv, "46a:np:v")) != -1) {
switch (ch) {
case '4':
// Note that -4 means "ipv4 only", we need to set "use_ipv6" here,
@@ -123,9 +121,6 @@
case 'p':
port = optarg;
break;
- case 'u':
- uid = optarg;
- break;
case 'v':
verbose_mode = true;
break;
@@ -156,13 +151,7 @@
Session* xfrin_session = NULL;
bool xfrin_session_established = false; // XXX (see Trac #287)
ModuleCCSession* config_session = NULL;
- string xfrout_socket_path;
- if (getenv("B10_FROM_BUILD") != NULL) {
- xfrout_socket_path = string(getenv("B10_FROM_BUILD")) + "/auth_xfrout_conn";
- } else {
- xfrout_socket_path = UNIX_SOCKET_FILE;
- }
- XfroutClient xfrout_client(xfrout_socket_path);
+ XfroutClient xfrout_client(UNIX_SOCKET_FILE);
try {
string specfile;
if (getenv("B10_FROM_BUILD")) {
@@ -199,10 +188,6 @@
my_command_handler);
cout << "[b10-auth] Configuration channel established." << endl;
- if (uid != NULL) {
- changeUser(uid);
- }
-
xfrin_session = new Session(io_service->get_io_service());
cout << "[b10-auth] Xfrin session channel created." << endl;
xfrin_session->establish(NULL);
Modified: branches/trac289/src/bin/auth/tests/Makefile.am
==============================================================================
--- branches/trac289/src/bin/auth/tests/Makefile.am (original)
+++ branches/trac289/src/bin/auth/tests/Makefile.am Mon Aug 16 04:02:27 2010
@@ -13,9 +13,7 @@
run_unittests_SOURCES = $(top_srcdir)/src/lib/dns/tests/unittest_util.h
run_unittests_SOURCES += $(top_srcdir)/src/lib/dns/tests/unittest_util.cc
run_unittests_SOURCES += ../auth_srv.h ../auth_srv.cc
-run_unittests_SOURCES += ../change_user.h ../change_user.cc
run_unittests_SOURCES += auth_srv_unittest.cc
-run_unittests_SOURCES += change_user_unittest.cc
run_unittests_SOURCES += asio_link_unittest.cc
run_unittests_SOURCES += run_unittests.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
Modified: branches/trac289/src/bin/auth/tests/asio_link_unittest.cc
==============================================================================
--- branches/trac289/src/bin/auth/tests/asio_link_unittest.cc (original)
+++ branches/trac289/src/bin/auth/tests/asio_link_unittest.cc Mon Aug 16 04:02:27 2010
@@ -108,14 +108,8 @@
TEST(IOServiceTest, unavailableAddress) {
// These addresses should generally be unavailable as a valid local
// address, although there's no guarantee in theory.
+ EXPECT_THROW(IOService(NULL, *TEST_PORT, *"ffff:ffff::"), IOError);
EXPECT_THROW(IOService(NULL, *TEST_PORT, *"255.255.0.0"), IOError);
-
- // Some OSes would simply reject binding attempt for an AF_INET6 socket
- // to an IPv4-mapped IPv6 address. Even if those that allow it, since
- // the corresponding IPv4 address is the same as the one used in the
- // AF_INET socket case above, it should at least show the same result
- // as the previous one.
- EXPECT_THROW(IOService(NULL, *TEST_PORT, *"::ffff:255.255.0.0"), IOError);
}
TEST(IOServiceTest, duplicateBind) {
Modified: branches/trac289/src/bin/auth/tests/auth_srv_unittest.cc
==============================================================================
--- branches/trac289/src/bin/auth/tests/auth_srv_unittest.cc (original)
+++ branches/trac289/src/bin/auth/tests/auth_srv_unittest.cc Mon Aug 16 04:02:27 2010
@@ -469,7 +469,7 @@
// so we shouldn't have to respond.
EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
response_renderer));
- EXPECT_FALSE(xfrout.isConnected());
+ EXPECT_TRUE(xfrout.isConnected());
}
TEST_F(AuthSrvTest, AXFRConnectFail) {
@@ -481,8 +481,6 @@
response_renderer));
headerCheck(parse_message, default_qid, Rcode::SERVFAIL(),
opcode.getCode(), QR_FLAG, 1, 0, 0, 0);
- // For a shot term workaround with xfrout we currently close the connection
- // for each AXFR attempt
EXPECT_FALSE(xfrout.isConnected());
}
@@ -492,7 +490,7 @@
createRequestPacket(opcode, Name("example.com"), RRClass::IN(),
RRType::AXFR(), IPPROTO_TCP);
server.processMessage(*io_message, parse_message, response_renderer);
- EXPECT_FALSE(xfrout.isConnected()); // see above
+ EXPECT_TRUE(xfrout.isConnected());
xfrout.disableSend();
parse_message.clear(Message::PARSE);
Modified: branches/trac289/src/bin/bind10/bind10.8
==============================================================================
--- branches/trac289/src/bin/bind10/bind10.8 (original)
+++ branches/trac289/src/bin/bind10/bind10.8 Mon Aug 16 04:02:27 2010
@@ -2,12 +2,12 @@
.\" Title: bind10
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: July 29, 2010
+.\" Date: April 19, 2010
.\" Manual: BIND10
.\" Source: BIND10
.\" Language: English
.\"
-.TH "BIND10" "8" "July 29, 2010" "BIND10" "BIND10"
+.TH "BIND10" "8" "April 19, 2010" "BIND10" "BIND10"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -22,7 +22,7 @@
bind10 \- BIND 10 boss process
.SH "SYNOPSIS"
.HP \w'\fBbind10\fR\ 'u
-\fBbind10\fR [\fB\-a\ \fR\fB\fIaddress\fR\fR] [\fB\-m\ \fR\fB\fIfile\fR\fR] [\fB\-n\fR] [\fB\-p\ \fR\fB\fInumber\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR] [\fB\-v\fR] [\fB\-\-address\ \fR\fB\fIaddress\fR\fR] [\fB\-\-msgq\-socket\-file\ \fR\fB\fIfile\fR\fR] [\fB\-\-no\-cache\fR] [\fB\-\-port\ \fR\fB\fInumber\fR\fR] [\fB\-\-user\ \fR\fB\fIuser\fR\fR] [\fB\-\-verbose\fR]
+\fBbind10\fR [\fB\-m\ \fR\fB\fInumber\fR\fR] [\fB\-p\ \fR\fB\fInumber\fR\fR] [\fB\-v\fR] [\fB\-msgq\-port\ \fR\fB\fInumber\fR\fR] [\fB\-port\ \fR\fB\fInumber\fR\fR] [\fB\-verbose\fR]
.SH "DESCRIPTION"
.PP
The
@@ -32,26 +32,11 @@
.PP
The arguments are as follows:
.PP
-\fB\-a\fR \fIaddress\fR, \fB\-\-address\fR \fIaddress\fR
+\fB\-m\fR \fInumber\fR, \fB\-\-msgq\-port\fR \fInumber\fR
.RS 4
-The IPv4 or IPv6 address for the
-\fBb10-auth\fR(8)
-daemon to listen on\&. The default is to listen on all addresses\&. (This is a short term workaround\&. This argument may change\&.)
-.RE
-.PP
-\fB\-m\fR \fIfile\fR, \fB\-\-msgq\-socket\-file\fR \fIfile\fR
-.RS 4
-The UNIX domain socket file for the
+The port number for the
\fBb10-msgq\fR(8)
-daemon to use\&. The default is
-/usr/local/var/bind10\-devel/msg_socket\&.
-.RE
-.PP
-\fB\-n\fR, \fB\-\-no\-cache\fR
-.RS 4
-Disables the hot\-spot caching used by the
-\fBb10-auth\fR(8)
-daemon\&.
+daemon to listen on\&. The default is 9912\&.
.RE
.PP
\fB\-p\fR \fInumber\fR, \fB\-\-port\fR \fInumber\fR
@@ -74,16 +59,6 @@
The Y1 prototype release uses a non\-default port for domain service\&.
.sp .5v
.RE
-.RE
-.PP
-\fB\-u\fR \fIuser\fR, \fB\-\-user\fR \fIname\fR
-.RS 4
-The username for
-\fBbind10\fR
-to run as\&.
-
-\fBbind10\fR
-must be initially ran as the root user to use this option\&. The default is to run as the current user\&.
.RE
.PP
\fB\-v\fR, \fB\-\-verbose\fR
Modified: branches/trac289/src/bin/bind10/bind10.py.in
==============================================================================
--- branches/trac289/src/bin/bind10/bind10.py.in (original)
+++ branches/trac289/src/bin/bind10/bind10.py.in Mon Aug 16 04:02:27 2010
@@ -336,8 +336,6 @@
authargs += ['-a', str(self.address)]
if self.nocache:
authargs += ['-n']
- if self.uid:
- authargs += ['-u', str(self.uid)]
if self.verbose:
authargs += ['-v']
sys.stdout.write("Starting b10-auth using port %d" %
Modified: branches/trac289/src/bin/bind10/bind10.xml
==============================================================================
--- branches/trac289/src/bin/bind10/bind10.xml (original)
+++ branches/trac289/src/bin/bind10/bind10.xml Mon Aug 16 04:02:27 2010
@@ -21,7 +21,7 @@
<refentry>
<refentryinfo>
- <date>July 29, 2010</date>
+ <date>April 19, 2010</date>
</refentryinfo>
<refmeta>
@@ -45,18 +45,12 @@
<refsynopsisdiv>
<cmdsynopsis>
<command>bind10</command>
- <arg><option>-a <replaceable>address</replaceable></option></arg>
- <arg><option>-m <replaceable>file</replaceable></option></arg>
- <arg><option>-n</option></arg>
+ <arg><option>-m <replaceable>number</replaceable></option></arg>
<arg><option>-p <replaceable>number</replaceable></option></arg>
- <arg><option>-u <replaceable>user</replaceable></option></arg>
<arg><option>-v</option></arg>
- <arg><option>--address <replaceable>address</replaceable></option></arg>
- <arg><option>--msgq-socket-file <replaceable>file</replaceable></option></arg>
- <arg><option>--no-cache</option></arg>
- <arg><option>--port <replaceable>number</replaceable></option></arg>
- <arg><option>--user <replaceable>user</replaceable></option></arg>
- <arg><option>--verbose</option></arg>
+ <arg><option>-msgq-port <replaceable>number</replaceable></option></arg>
+ <arg><option>-port <replaceable>number</replaceable></option></arg>
+ <arg><option>-verbose</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -86,40 +80,14 @@
<variablelist>
<varlistentry>
- <term><option>-a</option> <replaceable>address</replaceable>, <option>--address</option> <replaceable>address</replaceable></term>
+ <term><option>-m</option> <replaceable>number</replaceable>, <option>--msgq-port</option> <replaceable>number</replaceable></term>
<listitem>
- <para>The IPv4 or IPv6 address for the
- <citerefentry><refentrytitle>b10-auth</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ <para>The port number for the
+ <citerefentry><refentrytitle>b10-msgq</refentrytitle><manvolnum>8</manvolnum></citerefentry>
daemon to listen on.
- The default is to listen on all addresses.
- (This is a short term workaround. This argument may change.)
- </para>
+ The default is 9912.</para>
</listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-m</option> <replaceable>file</replaceable>,
- <option>--msgq-socket-file</option> <replaceable>file</replaceable></term>
-
- <listitem>
- <para>The UNIX domain socket file for the
- <citerefentry><refentrytitle>b10-msgq</refentrytitle><manvolnum>8</manvolnum></citerefentry>
- daemon to use.
- The default is
- <filename>/usr/local/var/bind10-devel/msg_socket</filename>.
-<!-- @localstatedir@/@PACKAGE_NAME@/msg_socket -->
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-n</option>, <option>--no-cache</option></term>
- <listitem>
- <para>Disables the hot-spot caching used by the
- <citerefentry><refentrytitle>b10-auth</refentrytitle><manvolnum>8</manvolnum></citerefentry>
- daemon.</para>
- </listitem>
</varlistentry>
<varlistentry>
@@ -137,18 +105,6 @@
</varlistentry>
<varlistentry>
- <term><option>-u</option> <replaceable>user</replaceable>, <option>--user</option> <replaceable>name</replaceable></term>
-
- <listitem>
- <para>The username for <command>bind10</command> to run as.
-<!-- TODO: example more detail. -->
- <command>bind10</command> must be initially ran as the
- root user to use this option.
- The default is to run as the current user.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>-v</option>, <option>--verbose</option></term>
<listitem>
<para>Display more about what is going on for
@@ -156,7 +112,6 @@
<!-- TODO: not true about all children yet -->
</listitem>
</varlistentry>
-
</variablelist>
</refsect1>
Modified: branches/trac289/src/bin/bindctl/bindcmd.py
==============================================================================
--- branches/trac289/src/bin/bindctl/bindcmd.py (original)
+++ branches/trac289/src/bin/bindctl/bindcmd.py Mon Aug 16 04:02:27 2010
@@ -38,6 +38,7 @@
import json
import pwd
import getpass
+import traceback
try:
from collections import OrderedDict
@@ -122,6 +123,7 @@
except FailToLogin as err:
print(err)
print(FAIL_TO_CONNECT_WITH_CMDCTL)
+ traceback.print_exc()
except KeyboardInterrupt:
print('\nExit from bindctl')
@@ -140,8 +142,8 @@
users_info = csv.reader(csvfile)
for row in users_info:
users.append([row[0], row[1]])
- except (IOError, IndexError) as err:
- print("Error reading saved username and password from %s%s: %s" % (dir, file_name, err))
+ except (IOError, IndexError) as e:
+ pass
finally:
if csvfile:
csvfile.close()
@@ -160,9 +162,8 @@
writer = csv.writer(csvfile)
writer.writerow([username, passwd])
csvfile.close()
- except IOError as err:
- print("Error saving user information:", err)
- print("user info file name: %s%s" % (dir, file_name))
+ except Exception as e:
+ print(e, "\nCannot write %s%s; default user is not stored" % (dir, file_name))
return False
return True
@@ -182,8 +183,8 @@
try:
response = self.send_POST('/login', param)
data = response.read().decode()
- except socket.error as err:
- print("Socket error while sending login information:", err)
+ except socket.error:
+ traceback.print_exc()
raise FailToLogin()
if response.status == http.client.OK:
@@ -205,8 +206,8 @@
response = self.send_POST('/login', param)
data = response.read().decode()
print(data)
- except socket.error as err:
- print("Socket error while sending login information:", err)
+ except socket.error as e:
+ traceback.print_exc()
raise FailToLogin()
if response.status == http.client.OK:
@@ -542,16 +543,6 @@
identifier = cmd.params['identifier']
else:
identifier += cmd.params['identifier']
-
- # Check if the module is known; for unknown modules
- # we currently deny setting preferences, as we have
- # no way yet to determine if they are ok.
- module_name = identifier.split('/')[1]
- if self.config_data is None or \
- not self.config_data.have_specification(module_name):
- print("Error: Module '" + module_name + "' unknown or not running")
- return
-
if cmd.command == "show":
values = self.config_data.get_value_maps(identifier)
for value_map in values:
Modified: branches/trac289/src/bin/bindctl/tests/bindctl_test.py
==============================================================================
--- branches/trac289/src/bin/bindctl/tests/bindctl_test.py (original)
+++ branches/trac289/src/bin/bindctl/tests/bindctl_test.py Mon Aug 16 04:02:27 2010
@@ -237,11 +237,6 @@
assert self.random_names[i] == cmd_names[i+1]
assert self.random_names[i] == module_names[i+1]
i = i + 1
-
- def test_apply_cfg_command(self):
- self.tool.location = '/'
- cmd = cmdparse.BindCmdParse("config set identifier=\"foo/bar\" value=\"5\"")
- self.tool.apply_config_cmd(cmd)
class FakeBindCmdInterpreter(bindcmd.BindCmdInterpreter):
def __init__(self):
Modified: branches/trac289/src/bin/cfgmgr/b10-cfgmgr.py.in
==============================================================================
--- branches/trac289/src/bin/cfgmgr/b10-cfgmgr.py.in (original)
+++ branches/trac289/src/bin/cfgmgr/b10-cfgmgr.py.in Mon Aug 16 04:02:27 2010
@@ -19,7 +19,7 @@
import sys; sys.path.append ('@@PYTHONPATH@@')
-from isc.config.cfgmgr import ConfigManager, ConfigManagerDataReadError
+from isc.config.cfgmgr import ConfigManager
from isc.cc import SessionError
import signal
import os
@@ -52,15 +52,10 @@
except SessionError as se:
print("[b10-cfgmgr] Error creating config manager, "
"is the command channel daemon running?")
- return 1
except KeyboardInterrupt as kie:
print("[b10-cfgmgr] Interrupted, exiting")
- except ConfigManagerDataReadError as cmdre:
- print("[b10-cfgmgr] " + str(cmdre))
- return 2
if cm:
- return cm.write_config()
- return 0
+ cm.write_config()
if __name__ == "__main__":
- sys.exit(main())
+ main()
Modified: branches/trac289/src/bin/msgq/b10-msgq.8
==============================================================================
--- branches/trac289/src/bin/msgq/b10-msgq.8 (original)
+++ branches/trac289/src/bin/msgq/b10-msgq.8 Mon Aug 16 04:02:27 2010
@@ -2,12 +2,12 @@
.\" Title: b10-msgq
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: August 4, 2010
+.\" Date: April 19, 2010
.\" Manual: BIND10
.\" Source: BIND10
.\" Language: English
.\"
-.TH "B10\-MSGQ" "8" "August 4, 2010" "BIND10" "BIND10"
+.TH "B10\-MSGQ" "8" "April 19, 2010" "BIND10" "BIND10"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -22,7 +22,7 @@
b10-msgq \- message routing daemon for the Command Channel
.SH "SYNOPSIS"
.HP \w'\fBb10\-msgq\fR\ 'u
-\fBb10\-msgq\fR [\fB\-s\ \fR\fB\fIfile\fR\fR] [\fB\-v\fR] [\fB\-\-socket\-file\ \fR\fB\fIfile\fR\fR] [\fB\-\-verbose\fR]
+\fBb10\-msgq\fR [\fB\-m\ \fR\fB\fInumber\fR\fR] [\fB\-v\fR] [\fB\-\-msgq\-port\ \fR\fB\fInumber\fR\fR] [\fB\-\-verbose\fR]
.SH "DESCRIPTION"
.PP
The
@@ -96,10 +96,11 @@
.PP
The arguments are as follows:
.PP
-\fB\-s \fR\fB\fIfile\fR\fR, \fB\-\-socket\-file \fR\fB\fIfile\fR\fR
+\fB\-m \fR\fB\fInumber\fR\fR, \fB\-\-msgq\-port \fR\fB\fInumber\fR\fR
.RS 4
-The UNIX domain socket file this daemon will use\&. The default is
-/usr/local/var/bind10\-devel/msg_socket\&.
+The port number that
+\fBb10\-msgq\fR
+will listen on\&. The default is 9912\&.
.RE
.PP
\fB\-v\fR, \fB\-\-verbose\fR
Modified: branches/trac289/src/bin/msgq/msgq.xml
==============================================================================
--- branches/trac289/src/bin/msgq/msgq.xml (original)
+++ branches/trac289/src/bin/msgq/msgq.xml Mon Aug 16 04:02:27 2010
@@ -21,7 +21,7 @@
<refentry>
<refentryinfo>
- <date>August 4, 2010</date>
+ <date>April 19, 2010</date>
</refentryinfo>
<refmeta>
@@ -45,9 +45,9 @@
<refsynopsisdiv>
<cmdsynopsis>
<command>b10-msgq</command>
- <arg><option>-s <replaceable>file</replaceable></option></arg>
+ <arg><option>-m <replaceable>number</replaceable></option></arg>
<arg><option>-v</option></arg>
- <arg><option>--socket-file <replaceable>file</replaceable></option></arg>
+ <arg><option>--msgq-port <replaceable>number</replaceable></option></arg>
<arg><option>--verbose</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -111,14 +111,12 @@
<variablelist>
<varlistentry>
- <term><option>-s <replaceable>file</replaceable></option>,
- <option>--socket-file <replaceable>file</replaceable></option></term>
+ <term><option>-m <replaceable>number</replaceable></option>,
+ <option>--msgq-port <replaceable>number</replaceable></option></term>
<listitem><para>
- The UNIX domain socket file this daemon will use.
- The default is
- <filename>/usr/local/var/bind10-devel/msg_socket</filename>.
-<!-- @localstatedir@/@PACKAGE_NAME@/msg_socket -->
- </para></listitem>
+ The port number that <command>b10-msgq</command> will listen on.
+ The default is 9912.</para>
+ </listitem>
</varlistentry>
<varlistentry>
Modified: branches/trac289/src/bin/usermgr/b10-cmdctl-usermgr.py.in
==============================================================================
--- branches/trac289/src/bin/usermgr/b10-cmdctl-usermgr.py.in (original)
+++ branches/trac289/src/bin/usermgr/b10-cmdctl-usermgr.py.in Mon Aug 16 04:02:27 2010
@@ -69,8 +69,8 @@
def main():
filename = DEFAULT_FILE
try:
- opts, args = getopt.getopt(sys.argv[1:], 'f:hv',
- ['file=', 'help', 'version'])
+ opts, args = getopt.getopt(sys.argv[1:], 'hvf:',
+ ['help', 'file=', 'version='])
except getopt.GetoptError as err:
print(err)
usage()
Modified: branches/trac289/src/bin/zonemgr/zonemgr.py.in
==============================================================================
--- branches/trac289/src/bin/zonemgr/zonemgr.py.in (original)
+++ branches/trac289/src/bin/zonemgr/zonemgr.py.in Mon Aug 16 04:02:27 2010
@@ -334,8 +334,6 @@
time.sleep(LOWERBOUND_RETRY) # A better time?
continue
- print (self._zonemgr_refresh_info)
-
zone_need_refresh = self._find_need_do_refresh_zone()
# If don't get zone with minimum next refresh time, set timer timeout = LOWERBOUND_REFRESH
if not zone_need_refresh:
Modified: branches/trac289/src/lib/Makefile.am
==============================================================================
--- branches/trac289/src/lib/Makefile.am (original)
+++ branches/trac289/src/lib/Makefile.am Mon Aug 16 04:02:27 2010
@@ -1,1 +1,1 @@
-SUBDIRS = exceptions dns cc config datasrc python xfr bench
+SUBDIRS = exceptions dns cc config datasrc python xfr
Modified: branches/trac289/src/lib/config/Makefile.am
==============================================================================
--- branches/trac289/src/lib/config/Makefile.am (original)
+++ branches/trac289/src/lib/config/Makefile.am Mon Aug 16 04:02:27 2010
@@ -15,7 +15,6 @@
EXTRA_DIST = testdata/b10-config-bad1.db
EXTRA_DIST += testdata/b10-config-bad2.db
EXTRA_DIST += testdata/b10-config-bad3.db
-EXTRA_DIST += testdata/b10-config-bad4.db
EXTRA_DIST += testdata/b10-config.db
EXTRA_DIST += testdata/data22_1.data
EXTRA_DIST += testdata/data22_2.data
Modified: branches/trac289/src/lib/config/testdata/b10-config-bad1.db
==============================================================================
--- branches/trac289/src/lib/config/testdata/b10-config-bad1.db (original)
+++ branches/trac289/src/lib/config/testdata/b10-config-bad1.db Mon Aug 16 04:02:27 2010
@@ -1,1 +1,1 @@
-{"version": 0}
+{'version': 0}
Modified: branches/trac289/src/lib/config/testdata/b10-config.db
==============================================================================
--- branches/trac289/src/lib/config/testdata/b10-config.db (original)
+++ branches/trac289/src/lib/config/testdata/b10-config.db Mon Aug 16 04:02:27 2010
@@ -1,1 +1,1 @@
-{"version": 2, "TestModule": {"test": 125}}
+{"version": 1, "TestModule": {"test": 125}}
Modified: branches/trac289/src/lib/datasrc/static_datasrc.cc
==============================================================================
--- branches/trac289/src/lib/datasrc/static_datasrc.cc (original)
+++ branches/trac289/src/lib/datasrc/static_datasrc.cc Mon Aug 16 04:02:27 2010
@@ -70,7 +70,6 @@
{
authors = RRsetPtr(new RRset(authors_name, RRClass::CH(),
RRType::TXT(), RRTTL(0)));
- authors->addRdata(generic::TXT("Chen Zhengzhang")); // Jerry
authors->addRdata(generic::TXT("Evan Hunt"));
authors->addRdata(generic::TXT("Han Feng"));
authors->addRdata(generic::TXT("Jelte Jansen"));
@@ -81,8 +80,6 @@
authors->addRdata(generic::TXT("Michael Graff"));
authors->addRdata(generic::TXT("Naoki Kambe"));
authors->addRdata(generic::TXT("Shane Kerr"));
- authors->addRdata(generic::TXT("Shen Tingting"));
- authors->addRdata(generic::TXT("Stephen Morris"));
authors->addRdata(generic::TXT("Zhang Likun"));
authors_ns = RRsetPtr(new RRset(authors_name, RRClass::CH(),
Modified: branches/trac289/src/lib/datasrc/tests/static_unittest.cc
==============================================================================
--- branches/trac289/src/lib/datasrc/tests/static_unittest.cc (original)
+++ branches/trac289/src/lib/datasrc/tests/static_unittest.cc Mon Aug 16 04:02:27 2010
@@ -54,7 +54,6 @@
version_data.push_back(PACKAGE_STRING);
// XXX: in addition, the order the following items matter.
- authors_data.push_back("Chen Zhengzhang");
authors_data.push_back("Evan Hunt");
authors_data.push_back("Han Feng");
authors_data.push_back("Jelte Jansen");
@@ -65,8 +64,6 @@
authors_data.push_back("Michael Graff");
authors_data.push_back("Naoki Kambe");
authors_data.push_back("Shane Kerr");
- authors_data.push_back("Shen Tingting");
- authors_data.push_back("Stephen Morris");
authors_data.push_back("Zhang Likun");
version_ns_data.push_back("version.bind.");
Modified: branches/trac289/src/lib/dns/message.h
==============================================================================
--- branches/trac289/src/lib/dns/message.h (original)
+++ branches/trac289/src/lib/dns/message.h Mon Aug 16 04:02:27 2010
@@ -80,7 +80,7 @@
class InputBuffer;
class MessageRenderer;
class Message;
-class MessageImpl;
+struct MessageImpl;
template <typename T>
struct SectionIteratorImpl;
Modified: branches/trac289/src/lib/dns/rdata/generic/txt_16.cc
==============================================================================
--- branches/trac289/src/lib/dns/rdata/generic/txt_16.cc (original)
+++ branches/trac289/src/lib/dns/rdata/generic/txt_16.cc Mon Aug 16 04:02:27 2010
@@ -21,7 +21,6 @@
#include <vector>
#include <dns/buffer.h>
-#include <dns/exceptions.h>
#include <dns/messagerenderer.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
Modified: branches/trac289/src/lib/python/isc/config/ccsession.py
==============================================================================
--- branches/trac289/src/lib/python/isc/config/ccsession.py (original)
+++ branches/trac289/src/lib/python/isc/config/ccsession.py Mon Aug 16 04:02:27 2010
@@ -37,7 +37,7 @@
"""
from isc.cc import Session
-from isc.config.config_data import ConfigData, MultiConfigData, BIND10_CONFIG_DATA_VERSION
+from isc.config.config_data import ConfigData, MultiConfigData
import isc
class ModuleCCSessionError(Exception): pass
@@ -333,7 +333,7 @@
"""Requests the current configuration from the configuration
manager through b10-cmdctl, and stores those as CURRENT"""
config = self._conn.send_GET('/config_data')
- if 'version' not in config or config['version'] != BIND10_CONFIG_DATA_VERSION:
+ if 'version' not in config or config['version'] != 1:
raise ModuleCCSessionError("Bad config version")
self._set_current_config(config)
Modified: branches/trac289/src/lib/python/isc/config/cfgmgr.py
==============================================================================
--- branches/trac289/src/lib/python/isc/config/cfgmgr.py (original)
+++ branches/trac289/src/lib/python/isc/config/cfgmgr.py Mon Aug 16 04:02:27 2010
@@ -27,7 +27,7 @@
import tempfile
import json
from isc.cc import data
-from isc.config import ccsession, config_data
+from isc.config import ccsession
class ConfigManagerDataReadError(Exception):
"""This exception is thrown when there is an error while reading
@@ -42,6 +42,8 @@
class ConfigManagerData:
"""This class hold the actual configuration information, and
reads it from and writes it to persistent storage"""
+
+ CONFIG_VERSION = 1
def __init__(self, data_path, file_name = "b10-config.db"):
"""Initialize the data for the configuration manager, and
@@ -49,7 +51,7 @@
this does not yet read the database, a call to
read_from_file is needed for that."""
self.data = {}
- self.data['version'] = config_data.BIND10_CONFIG_DATA_VERSION
+ self.data['version'] = ConfigManagerData.CONFIG_VERSION
self.data_path = data_path
self.db_filename = data_path + os.sep + file_name
@@ -63,36 +65,21 @@
the second exception, the best way is probably to report the
error and stop loading the system."""
config = ConfigManagerData(data_path, file_name)
- file = None
try:
file = open(config.db_filename, 'r')
file_config = json.loads(file.read())
- # handle different versions here
- # If possible, we automatically convert to the new
- # scheme and update the configuration
- # If not, we raise an exception
- if 'version' in file_config:
- if file_config['version'] == config_data.BIND10_CONFIG_DATA_VERSION:
- config.data = file_config
- elif file_config['version'] == 1:
- # only format change, no other changes necessary
- file_config['version'] = 2
- print("[b10-cfgmgr] Updating configuration database version from 1 to 2")
- config.data = file_config
- else:
- if config_data.BIND10_CONFIG_DATA_VERSION > file_config['version']:
- raise ConfigManagerDataReadError("Cannot load configuration file: version %d no longer supported" % file_config['version'])
- else:
- raise ConfigManagerDataReadError("Cannot load configuration file: version %d not yet supported" % file_config['version'])
- else:
- raise ConfigManagerDataReadError("No version information in configuration file " + config.db_filename)
+ if 'version' in file_config and \
+ file_config['version'] == ConfigManagerData.CONFIG_VERSION:
+ config.data = file_config
+ else:
+ # We can put in a migration path here for old data
+ raise ConfigManagerDataReadError("[b10-cfgmgr] Old version of data found")
+ file.close()
except IOError as ioe:
- raise ConfigManagerDataEmpty("No configuration file found")
- except ValueError:
- raise ConfigManagerDataReadError("Configuration file out of date or corrupt, please update or remove " + config.db_filename)
- finally:
- if file:
- file.close();
+ raise ConfigManagerDataEmpty("No config file found")
+ except:
+ raise ConfigManagerDataReadError("Config file unreadable")
+
return config
def write_to_file(self, output_file_name = None):
@@ -115,11 +102,11 @@
os.rename(filename, self.db_filename)
except IOError as ioe:
# TODO: log this (level critical)
- print("[b10-cfgmgr] Unable to write configuration file; configuration not stored: " + str(ioe))
+ print("[b10-cfgmgr] Unable to write config file; configuration not stored: " + str(ioe))
# TODO: debug option to keep file?
except OSError as ose:
# TODO: log this (level critical)
- print("[b10-cfgmgr] Unable to write configuration file; configuration not stored: " + str(ose))
+ print("[b10-cfgmgr] Unable to write config file; configuration not stored: " + str(ose))
try:
if filename and os.path.exists(filename):
os.remove(filename)
@@ -256,7 +243,7 @@
except data.DataNotFoundError as dnfe:
# no data is ok, that means we have nothing that
# deviates from default values
- return ccsession.create_answer(0, { 'version': config_data.BIND10_CONFIG_DATA_VERSION })
+ return ccsession.create_answer(0, { 'version': self.config.CONFIG_VERSION })
else:
return ccsession.create_answer(1, "Bad module_name in get_config command")
Modified: branches/trac289/src/lib/python/isc/config/config_data.py
==============================================================================
--- branches/trac289/src/lib/python/isc/config/config_data.py (original)
+++ branches/trac289/src/lib/python/isc/config/config_data.py Mon Aug 16 04:02:27 2010
@@ -24,8 +24,6 @@
import isc.config.module_spec
class ConfigDataError(Exception): pass
-
-BIND10_CONFIG_DATA_VERSION = 2
def check_type(spec_part, value):
"""Does nothing if the value is of the correct type given the
@@ -252,11 +250,6 @@
"""Removes the specification with the given module name. Does nothing if it wasn't there."""
if module_name in self._specifications:
del self._specifications[module_name]
-
- def have_specification(self, module_name):
- """Returns True if we have a specification for the module with the given name.
- Returns False if we do not."""
- return module_name in self._specifications
def get_module_spec(self, module):
"""Returns the ModuleSpec for the module with the given name.
Modified: branches/trac289/src/lib/python/isc/config/tests/ccsession_test.py
==============================================================================
--- branches/trac289/src/lib/python/isc/config/tests/ccsession_test.py (original)
+++ branches/trac289/src/lib/python/isc/config/tests/ccsession_test.py Mon Aug 16 04:02:27 2010
@@ -22,7 +22,6 @@
import unittest
import os
from isc.config.ccsession import *
-from isc.config.config_data import BIND10_CONFIG_DATA_VERSION
from unittest_fakesession import FakeModuleCCSession
class TestHelperFunctions(unittest.TestCase):
@@ -443,20 +442,20 @@
def create_uccs2(self, fake_conn):
module_spec = isc.config.module_spec_from_file(self.spec_file("spec2.spec"))
fake_conn.set_get_answer('/module_spec', { module_spec.get_module_name(): module_spec.get_full_spec()})
- fake_conn.set_get_answer('/config_data', { 'version': BIND10_CONFIG_DATA_VERSION })
+ fake_conn.set_get_answer('/config_data', { 'version': 1 })
return UIModuleCCSession(fake_conn)
def test_init(self):
fake_conn = fakeUIConn()
fake_conn.set_get_answer('/module_spec', {})
- fake_conn.set_get_answer('/config_data', { 'version': BIND10_CONFIG_DATA_VERSION })
+ fake_conn.set_get_answer('/config_data', { 'version': 1 })
uccs = UIModuleCCSession(fake_conn)
self.assertEqual({}, uccs._specifications)
- self.assertEqual({ 'version': BIND10_CONFIG_DATA_VERSION}, uccs._current_config)
+ self.assertEqual({ 'version': 1}, uccs._current_config)
module_spec = isc.config.module_spec_from_file(self.spec_file("spec2.spec"))
fake_conn.set_get_answer('/module_spec', { module_spec.get_module_name(): module_spec.get_full_spec()})
- fake_conn.set_get_answer('/config_data', { 'version': BIND10_CONFIG_DATA_VERSION })
+ fake_conn.set_get_answer('/config_data', { 'version': 1 })
uccs = UIModuleCCSession(fake_conn)
self.assertEqual(module_spec._module_spec, uccs._specifications['Spec2']._module_spec)
Modified: branches/trac289/src/lib/python/isc/config/tests/cfgmgr_test.py
==============================================================================
--- branches/trac289/src/lib/python/isc/config/tests/cfgmgr_test.py (original)
+++ branches/trac289/src/lib/python/isc/config/tests/cfgmgr_test.py Mon Aug 16 04:02:27 2010
@@ -22,7 +22,6 @@
import unittest
import os
from isc.config.cfgmgr import *
-from isc.config import config_data
from unittest_fakesession import FakeModuleCCSession
class TestConfigManagerData(unittest.TestCase):
@@ -33,7 +32,7 @@
def test_init(self):
self.assertEqual(self.config_manager_data.data['version'],
- config_data.BIND10_CONFIG_DATA_VERSION)
+ ConfigManagerData.CONFIG_VERSION)
self.assertEqual(self.config_manager_data.data_path,
self.data_path)
self.assertEqual(self.config_manager_data.db_filename,
@@ -53,9 +52,6 @@
self.assertRaises(ConfigManagerDataReadError,
ConfigManagerData.read_from_file,
self.data_path, "b10-config-bad3.db")
- self.assertRaises(ConfigManagerDataReadError,
- ConfigManagerData.read_from_file,
- self.data_path, "b10-config-bad4.db")
def test_write_to_file(self):
output_file_name = "b10-config-write-test";
@@ -165,13 +161,13 @@
self.assertEqual(commands_spec['Spec2'], module_spec.get_commands_spec())
def test_read_config(self):
- self.assertEqual(self.cm.config.data, {'version': config_data.BIND10_CONFIG_DATA_VERSION})
+ self.assertEqual(self.cm.config.data, {'version': 1})
self.cm.read_config()
# due to what get written, the value here is what the last set_config command in test_handle_msg does
- self.assertEqual(self.cm.config.data, {'TestModule': {'test': 125}, 'version': config_data.BIND10_CONFIG_DATA_VERSION})
+ self.assertEqual(self.cm.config.data, {'TestModule': {'test': 125}, 'version': 1})
self.cm.data_path = "/no_such_path"
self.cm.read_config()
- self.assertEqual(self.cm.config.data, {'version': config_data.BIND10_CONFIG_DATA_VERSION})
+ self.assertEqual(self.cm.config.data, {'version': 1})
def test_write_config(self):
# tested in ConfigManagerData tests
@@ -194,9 +190,9 @@
{'result': [1, 'Bad get_module_spec command, argument not a dict']})
self._handle_msg_helper({ "command": [ "get_module_spec", { } ] },
{'result': [1, 'Bad module_name in get_module_spec command']})
- self._handle_msg_helper({ "command": [ "get_config" ] }, { 'result': [ 0, { 'version': config_data.BIND10_CONFIG_DATA_VERSION } ]})
+ self._handle_msg_helper({ "command": [ "get_config" ] }, { 'result': [ 0, { 'version': 1} ]})
self._handle_msg_helper({ "command": [ "get_config", { "module_name": "nosuchmodule" } ] },
- {'result': [0, { 'version': config_data.BIND10_CONFIG_DATA_VERSION }]})
+ {'result': [0, { 'version': 1 }]})
self._handle_msg_helper({ "command": [ "get_config", 1 ] },
{'result': [1, 'Bad get_config command, argument not a dict']})
self._handle_msg_helper({ "command": [ "get_config", { } ] },
Modified: branches/trac289/src/lib/python/isc/config/tests/config_data_test.py
==============================================================================
--- branches/trac289/src/lib/python/isc/config/tests/config_data_test.py (original)
+++ branches/trac289/src/lib/python/isc/config/tests/config_data_test.py Mon Aug 16 04:02:27 2010
@@ -267,16 +267,12 @@
self.assertEqual({}, self.mcd._current_config)
self.assertEqual({}, self.mcd._local_changes)
- def test_set_remove_specification(self):
+ def test_set_specification(self):
module_spec = isc.config.module_spec_from_file(self.data_path + os.sep + "spec1.spec")
- self.assertFalse(self.mcd.have_specification(module_spec.get_module_name()))
- self.mcd.set_specification(module_spec)
- self.assertTrue(self.mcd.have_specification(module_spec.get_module_name()))
+ self.mcd.set_specification(module_spec)
self.assert_(module_spec.get_module_name() in self.mcd._specifications)
self.assertEquals(module_spec, self.mcd._specifications[module_spec.get_module_name()])
self.assertRaises(ConfigDataError, self.mcd.set_specification, "asdf")
- self.mcd.remove_specification(module_spec.get_module_name())
- self.assertFalse(self.mcd.have_specification(module_spec.get_module_name()))
def test_get_module_spec(self):
module_spec = isc.config.module_spec_from_file(self.data_path + os.sep + "spec1.spec")
Modified: branches/trac289/src/lib/xfr/xfrout_client.cc
==============================================================================
--- branches/trac289/src/lib/xfr/xfrout_client.cc (original)
+++ branches/trac289/src/lib/xfr/xfrout_client.cc Mon Aug 16 04:02:27 2010
@@ -77,8 +77,7 @@
{
if (-1 == send_fd(impl_->socket_.native(), tcp_sock)) {
isc_throw(XfroutError,
- "Failed to send the socket file descriptor "
- "to xfrout module");
+ "Fail to send the socket file descriptor to xfrout module");
}
// XXX: this shouldn't be blocking send, even though it's unlikely to
More information about the bind10-changes
mailing list