BIND 10 master, updated. a475ef271d4606f791e5ed88d9b8eb8ed8c90ce6 Merge branch 'trac1852' of ssh://git.bind10.isc.org/var/bind10/git/bind10
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue May 1 09:16:32 UTC 2012
The branch, master has been updated
via a475ef271d4606f791e5ed88d9b8eb8ed8c90ce6 (commit)
via 92cc4a7b436ebad4536979bddbcea21ffa0b118b (commit)
via ed1f3349ee00294fbeb42760a53a2694f9dc02eb (commit)
from 3055e37cd7bdb8ada5cdf54e611343665ff93675 (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 a475ef271d4606f791e5ed88d9b8eb8ed8c90ce6
Merge: 3055e37cd7bdb8ada5cdf54e611343665ff93675 92cc4a7b436ebad4536979bddbcea21ffa0b118b
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue May 1 17:39:17 2012 +0900
Merge branch 'trac1852' of ssh://git.bind10.isc.org/var/bind10/git/bind10
-----------------------------------------------------------------------
Summary of changes:
src/bin/stats/stats_httpd.py.in | 7 ++++++-
src/bin/stats/tests/b10-stats-httpd_test.py | 18 ++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/stats/stats_httpd.py.in b/src/bin/stats/stats_httpd.py.in
index c9bd0f5..7e4da96 100644
--- a/src/bin/stats/stats_httpd.py.in
+++ b/src/bin/stats/stats_httpd.py.in
@@ -189,7 +189,12 @@ class StatsHttpd:
self.load_config()
self.http_addrs = []
self.mccs.start()
- self.open_httpd()
+ try:
+ self.open_httpd()
+ except HttpServerError:
+ # if some exception, e.g. address in use, is raised, then it closes mccs and httpd
+ self.close_mccs()
+ raise
def open_mccs(self):
"""Opens a ModuleCCSession object"""
diff --git a/src/bin/stats/tests/b10-stats-httpd_test.py b/src/bin/stats/tests/b10-stats-httpd_test.py
index e74405a..57abed9 100644
--- a/src/bin/stats/tests/b10-stats-httpd_test.py
+++ b/src/bin/stats/tests/b10-stats-httpd_test.py
@@ -676,6 +676,24 @@ class TestStatsHttpd(unittest.TestCase):
self.assertTrue('address' in self.stats_httpd.config['listen_on'][0])
self.assertTrue('port' in self.stats_httpd.config['listen_on'][0])
self.assertTrue(server_address in set(self.stats_httpd.http_addrs))
+ ans = send_command(
+ isc.config.ccsession.COMMAND_GET_MODULE_SPEC,
+ "ConfigManager", {"module_name":"StatsHttpd"})
+ # assert StatsHttpd is added to ConfigManager
+ self.assertNotEqual(ans, (0,{}))
+ self.assertTrue(ans[1]['module_name'], 'StatsHttpd')
+
+ def test_init_hterr(self):
+ orig_open_httpd = stats_httpd.StatsHttpd.open_httpd
+ def err_open_httpd(arg): raise stats_httpd.HttpServerError
+ stats_httpd.StatsHttpd.open_httpd = err_open_httpd
+ self.assertRaises(stats_httpd.HttpServerError, stats_httpd.StatsHttpd)
+ ans = send_command(
+ isc.config.ccsession.COMMAND_GET_MODULE_SPEC,
+ "ConfigManager", {"module_name":"StatsHttpd"})
+ # assert StatsHttpd is removed from ConfigManager
+ self.assertEqual(ans, (0,{}))
+ stats_httpd.StatsHttpd.open_httpd = orig_open_httpd
def test_openclose_mccs(self):
self.stats_httpd = MyStatsHttpd(get_availaddr())
More information about the bind10-changes
mailing list