Commit 18192605 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[1342] Remove the --brittle switch

parent 120946aa
......@@ -51,7 +51,6 @@
<arg><option>-u <replaceable>user</replaceable></option></arg>
<arg><option>-w <replaceable>wait_time</replaceable></option></arg>
<arg><option>--cmdctl-port</option> <replaceable>port</replaceable></arg>
<arg><option>--config-file</option> <replaceable>config-filename</replaceable></arg>
<arg><option>--data-path</option> <replaceable>directory</replaceable></arg>
......@@ -90,20 +89,6 @@
Shutdown if any of the child processes of
<command>bind10</command> exit. This is intended to
help developers debug the server, and should not be
used in production.
<option>-c</option> <replaceable>config-filename</replaceable>,
......@@ -219,7 +219,7 @@ class BoB:
def __init__(self, msgq_socket_file=None, data_path=None,
config_filename=None, nocache=False, verbose=False, setuid=None,
username=None, cmdctl_port=None, brittle=False, wait_time=10):
username=None, cmdctl_port=None, wait_time=10):
Initialize the Boss of BIND. This is a singleton (only one can run).
......@@ -233,9 +233,6 @@ class BoB:
The cmdctl_port is passed to cmdctl and specify on which port it
should listen.
brittle is a debug option that controls whether the Boss shuts down
after any process dies.
wait_time controls the amount of time (in seconds) that Boss waits
for selected processes to initialize before continuing with the
initialization. Currently this is only the configuration manager.
......@@ -264,7 +261,6 @@ class BoB:
self.data_path = data_path
self.config_filename = config_filename
self.cmdctl_port = cmdctl_port
self.brittle = brittle
self.wait_time = wait_time
self._component_configurator = isc.bind10.component.Configurator(self,
......@@ -940,8 +936,6 @@ def parse_args(args=sys.argv[1:], Parser=OptionParser):
parser.add_option("--pid-file", dest="pid_file", type="string",
help="file to dump the PID of the BIND 10 process")
parser.add_option("--brittle", dest="brittle", action="store_true",
help="debugging flag: exit if any component dies")
parser.add_option("-w", "--wait", dest="wait_time", type="int",
default=10, help="Time (in seconds) to wait for config manager to start up")
......@@ -1046,7 +1040,7 @@ def main():
# Go bob!
boss_of_bind = BoB(options.msgq_socket_file, options.data_path,
options.config_file, options.nocache, options.verbose,
setuid, username, options.cmdctl_port, options.brittle,
setuid, username, options.cmdctl_port,
startup_result = boss_of_bind.startup()
if startup_result:
......@@ -740,15 +740,6 @@ class TestParseArgs(unittest.TestCase):
options = parse_args(['--cmdctl-port=1234'], TestOptParser)
self.assertEqual(1234, options.cmdctl_port)
def test_brittle(self):
Test we can use the "brittle" flag.
options = parse_args([], TestOptParser)
options = parse_args(['--brittle'], TestOptParser)
class TestPIDFile(unittest.TestCase):
def setUp(self):
self.pid_file = '@builddir@' + os.sep + ''
......@@ -796,37 +787,6 @@ class TestPIDFile(unittest.TestCase):
self.assertRaises(IOError, dump_pid,
'nonexistent_dir' + os.sep + '')
# TODO: Do we want brittle mode? Probably yes. So we need to re-enable to after that.
@unittest.skip("Brittle mode temporarily broken")
class TestBrittle(unittest.TestCase):
def test_brittle_disabled(self):
bob = MockBob()
bob.runnable = True
def simulated_exit(self):
ret_val = self.exit_info
self.exit_info = (0, 0)
return ret_val
def test_brittle_enabled(self):
bob = MockBob()
bob.runnable = True
bob.brittle = True
self.exit_info = (5, 0)
bob._get_process_exit_status = self.simulated_exit
old_stdout = sys.stdout
sys.stdout = open("/dev/null", "w")
sys.stdout = old_stdout
class TestBossComponents(unittest.TestCase):
Test the boss propagates component configuration properly to the
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment