BIND 10 master, updated. fb4a0a36ba0d90409684e8042916341ce35c5f21 [trac775] fix change log confilct for
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Apr 20 12:29:12 UTC 2011
The branch, master has been updated
via fb4a0a36ba0d90409684e8042916341ce35c5f21 (commit)
via fafa0c06f358f9cc32860535bef1c56d25f20775 (commit)
via bf1cf162e37ff391874569c82c6bef7e8b7e4f18 (commit)
via 572ac2cf62e18f7eb69d670b890e2a3443bfd6e7 (commit)
via 44f4b82933783502be198c0ab0a81020fb3fe510 (commit)
via 660d7d782c81bc55b8cc009836c35d9ca3948063 (commit)
from fe8babb0a2953fbe1755b79db136c0cae25682e2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fb4a0a36ba0d90409684e8042916341ce35c5f21
Merge: fafa0c06f358f9cc32860535bef1c56d25f20775 fe8babb0a2953fbe1755b79db136c0cae25682e2
Author: hanfeng <ben.han.cn at gmail.com>
Date: Wed Apr 20 20:28:04 2011 +0800
[trac775] fix change log confilct for
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
src/bin/auth/main.cc | 10 ++++++++--
src/lib/server_common/portconfig.cc | 19 +++++++++++++------
src/lib/server_common/tests/portconfig_unittest.cc | 2 +-
4 files changed, 27 insertions(+), 9 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 4975002..7059673 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+223. [bug] feng
+ If ip address or port isn't usable for name server, name server process
+ won't exist and give end user chance to reconfigure them.
+ (Trac #775, git 572ac2cf62e18f7eb69d670b890e2a3443bfd6e7)
+
222. [bug] jerry
src/lib/zonemgr: Fix a bug that xfrin not checking for new copy of
zone on startup. Imposes some random jitters to avoid many zones
diff --git a/src/bin/auth/main.cc b/src/bin/auth/main.cc
index a6db762..480c2f7 100644
--- a/src/bin/auth/main.cc
+++ b/src/bin/auth/main.cc
@@ -176,9 +176,15 @@ main(int argc, char* argv[]) {
// all initial configurations, but as a short term workaround we
// handle the traditional "database_file" setup by directly calling
// updateConfig().
+ // if server load configure failed, we won't exit, give user second chance
+ // to correct the configure.
auth_server->setConfigSession(config_session);
- configureAuthServer(*auth_server, config_session->getFullConfig());
- auth_server->updateConfig(ElementPtr());
+ try {
+ configureAuthServer(*auth_server, config_session->getFullConfig());
+ auth_server->updateConfig(ElementPtr());
+ } catch (const AuthConfigError& ex) {
+ cout << "[bin10-auth] Server load config failed:" << ex.what() << endl;
+ }
if (uid != NULL) {
changeUser(uid);
diff --git a/src/lib/server_common/portconfig.cc b/src/lib/server_common/portconfig.cc
index 941644e..7b2b3dd 100644
--- a/src/lib/server_common/portconfig.cc
+++ b/src/lib/server_common/portconfig.cc
@@ -96,11 +96,17 @@ installListenAddresses(const AddressList& newAddresses,
}
catch (const exception& e) {
/*
- * We couldn't set it. So return it back. If that fails as well,
- * we have a problem.
+ * If one of the addresses isn't set successfully, we will restore
+ * the old addresses, the behavior is that either all address are
+ * set successuflly or none of them will be used. whether this
+ * behavior is user desired, maybe we need revisited it later. And
+ * if address setting is more smarter, it should check whether some
+ * part of the new address already in used to avoid interuption the
+ * service.
*
- * If that fails, bad luck, but we are useless anyway, so just die
- * and let boss start us again.
+ * If the address setting still failed, we can live with it, since
+ * user will get error info, command control can be used to set new
+ * address. So we just catch the exception without propagating outside
*/
dlog(string("Unable to set new address: ") + e.what(), true);
try {
@@ -109,9 +115,10 @@ installListenAddresses(const AddressList& newAddresses,
catch (const exception& e2) {
dlog("Unable to recover from error;", true);
dlog(string("Rollback failed with: ") + e2.what(), true);
- abort();
}
- throw; // Let it fly a little bit further
+ //Anyway the new configure has problem, we need to notify configure
+ //manager the new configure doesn't work
+ throw;
}
}
diff --git a/src/lib/server_common/tests/portconfig_unittest.cc b/src/lib/server_common/tests/portconfig_unittest.cc
index 5262565..65963eb 100644
--- a/src/lib/server_common/tests/portconfig_unittest.cc
+++ b/src/lib/server_common/tests/portconfig_unittest.cc
@@ -177,7 +177,7 @@ TEST_F(InstallListenAddresses, rollback) {
EXPECT_NO_THROW(installListenAddresses(valid_, store_, dnss_));
checkAddresses(valid_, "Before rollback");
// This should not bind them, but should leave the original addresses
- EXPECT_THROW(installListenAddresses(invalid_, store_, dnss_), IOError);
+ EXPECT_THROW(installListenAddresses(invalid_, store_, dnss_), exception);
checkAddresses(valid_, "After rollback");
}
More information about the bind10-changes
mailing list