diff --git a/ChangeLog b/ChangeLog
index f752fc2874..fb571458b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+ 150. [bug] jelte
+ b10-cfgmgr: No longer save the configuration on exit. Configuration
+ is already saved if it is changed succesfully, so writing it on
+ exit (and hence, when nothing has changed too) is unnecessary and
+ may even cause problems.
+ (Trac #435, git fd7baa38c08d54d5b5f84930c1684c436d2776dc)
+
+ 149. [bug] jelte
+ bindctl: Check if the user session has disappeared (either by a
+ timeout or by a server restart), and reauthenticate if so. This
+ fixes the 'cmdctl not running' problem.
+ (trac #431, git b929be82fec5f92e115d8985552f84b4fdd385b9)
+
+ 148. [func] jelte
+ bindctl: Command results are now pretty-printed (i.e. printed in
+ a more readable form). Empty results are no longer printed at all
+ (used to print '{}'), and the message
+ 'send the command to cmd-ctrl' has also been removed.
+ (git 3954c628c13ec90722a2d8816f52a380e0065bae)
+
147. [bug] jinmei
python/isc/config: Fixed a bug that importing custom configuration
(in b10-config.db) of a remote module didn't work.
diff --git a/src/bin/bind10/bind10.8 b/src/bin/bind10/bind10.8
index 09963a607b..a3ac653613 100644
--- a/src/bin/bind10/bind10.8
+++ b/src/bin/bind10/bind10.8
@@ -1,7 +1,7 @@
'\" t
.\" Title: bind10
.\" Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets v1.76.0
+.\" Generator: DocBook XSL Stylesheets v1.75.2
.\" Date: July 29, 2010
.\" Manual: BIND10
.\" Source: BIND10
@@ -9,15 +9,6 @@
.\"
.TH "BIND10" "8" "July 29, 2010" "BIND10" "BIND10"
.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
diff --git a/src/bin/cfgmgr/b10-cfgmgr.py.in b/src/bin/cfgmgr/b10-cfgmgr.py.in
index 98e33fff86..73906b7707 100644
--- a/src/bin/cfgmgr/b10-cfgmgr.py.in
+++ b/src/bin/cfgmgr/b10-cfgmgr.py.in
@@ -61,8 +61,6 @@ def main():
except ConfigManagerDataReadError as cmdre:
print("[b10-cfgmgr] " + str(cmdre))
return 2
- if cm:
- return cm.write_config()
return 0
if __name__ == "__main__":
diff --git a/src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in b/src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in
index 05339a15b3..c2687ff1ca 100644
--- a/src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in
+++ b/src/bin/cfgmgr/tests/b10-cfgmgr_test.py.in
@@ -58,7 +58,8 @@ class TestConfigManagerStartup(unittest.TestCase):
self.assertTrue(b.cm.read_config_called)
self.assertTrue(b.cm.notify_boss_called)
self.assertTrue(b.cm.run_called)
- self.assertTrue(b.cm.write_config_called)
+ # if there are no changes, config is not written
+ self.assertFalse(b.cm.write_config_called)
self.assertTrue(b.cm.running)
b.signal_handler(None, None)
diff --git a/src/bin/resolver/main.cc b/src/bin/resolver/main.cc
index e41d6b8169..29d91f5cdf 100644
--- a/src/bin/resolver/main.cc
+++ b/src/bin/resolver/main.cc
@@ -169,7 +169,7 @@ main(int argc, char* argv[]) {
dlog("Server started.");
io_service.run();
} catch (const std::exception& ex) {
- dlog(string("Server failed: ") + ex.what());
+ dlog(string("Server failed: ") + ex.what(),true);
ret = 1;
}
diff --git a/src/bin/resolver/resolver.cc b/src/bin/resolver/resolver.cc
index da162e85ef..bcbf5c50db 100644
--- a/src/bin/resolver/resolver.cc
+++ b/src/bin/resolver/resolver.cc
@@ -93,7 +93,7 @@ public:
if (dnss) {
if (upstream_.empty()) {
dlog("Asked to do full recursive, but not implemented yet. "
- "I'll do nothing.");
+ "I'll do nothing.",true);
} else {
dlog("Setting forward addresses:");
BOOST_FOREACH(const addr_t& address, upstream) {
@@ -322,7 +322,7 @@ Resolver::~Resolver() {
delete checkin_;
delete dns_lookup_;
delete dns_answer_;
- dlog("Deleting the Resolver");
+ dlog("Deleting the Resolver",true);
}
void
@@ -360,7 +360,7 @@ Resolver::processMessage(const IOMessage& io_message, MessagePtr message,
return;
}
} catch (const Exception& ex) {
- dlog(string("DNS packet exception: ") + ex.what());
+ dlog(string("DNS packet exception: ") + ex.what(),true);
server->resume(false);
return;
}
@@ -525,7 +525,7 @@ Resolver::updateConfig(ConstElementPtr config) {
}
return (isc::config::createAnswer());
} catch (const isc::Exception& error) {
- dlog(string("error in config: ") + error.what());
+ dlog(string("error in config: ") + error.what(),true);
return (isc::config::createAnswer(1, error.what()));
}
}
@@ -577,13 +577,13 @@ Resolver::setListenAddresses(const vector& addresses) {
* If that fails, bad luck, but we are useless anyway, so just die
* and let boss start us again.
*/
- dlog(string("Unable to set new address: ") + e.what());
+ dlog(string("Unable to set new address: ") + e.what(),true);
try {
setAddresses(dnss_, impl_->listen_);
}
catch (const exception& e2) {
- dlog(string("Unable to recover from error;"));
- dlog(string("Rollback failed with: ") + e2.what());
+ dlog(string("Unable to recover from error;"),true);
+ dlog(string("Rollback failed with: ") + e2.what(),true);
abort();
}
throw e; // Let it fly a little bit further
diff --git a/src/lib/log/dummylog.cc b/src/lib/log/dummylog.cc
index 8554178d59..dda05787f0 100644
--- a/src/lib/log/dummylog.cc
+++ b/src/lib/log/dummylog.cc
@@ -24,8 +24,8 @@ namespace log {
bool denabled = false;
string dprefix;
-void dlog(const string& message) {
- if (denabled) {
+void dlog(const string& message,bool error_flag) {
+ if (denabled || error_flag) {
if (!dprefix.empty()) {
cerr << "[" << dprefix << "] ";
}
diff --git a/src/lib/log/dummylog.h b/src/lib/log/dummylog.h
index 9462bb1b70..f20c0328bf 100644
--- a/src/lib/log/dummylog.h
+++ b/src/lib/log/dummylog.h
@@ -52,7 +52,7 @@ extern std::string dprefix;
* @param message The message to log. The real interface will probably have
* more parameters.
*/
-void dlog(const std::string& message);
+void dlog(const std::string& message, bool error_flag=false);
}
}
diff --git a/src/lib/python/isc/config/cfgmgr.py b/src/lib/python/isc/config/cfgmgr.py
index 212b67e1d1..74a6ba2e76 100644
--- a/src/lib/python/isc/config/cfgmgr.py
+++ b/src/lib/python/isc/config/cfgmgr.py
@@ -26,6 +26,7 @@ import os
import copy
import tempfile
import json
+import errno
from isc.cc import data
from isc.config import ccsession, config_data
@@ -87,7 +88,12 @@ class ConfigManagerData:
else:
raise ConfigManagerDataReadError("No version information in configuration file " + config.db_filename)
except IOError as ioe:
- raise ConfigManagerDataEmpty("No configuration file found")
+ # if IOError is 'no such file or directory', then continue
+ # (raise empty), otherwise fail (raise error)
+ if ioe.errno == errno.ENOENT:
+ raise ConfigManagerDataEmpty("No configuration file found")
+ else:
+ raise ConfigManagerDataReadError("Can't read configuration file: " + str(ioe))
except ValueError:
raise ConfigManagerDataReadError("Configuration file out of date or corrupt, please update or remove " + config.db_filename)
finally: