|
@@ -422,20 +422,26 @@ class Configurator:
|
|
|
* start
|
|
|
* stop
|
|
|
"""
|
|
|
- logger.debug(DBG_TRACE_DATA, BIND10_CONFIGURATOR_RUN, len(plan))
|
|
|
- for task in plan:
|
|
|
- component = task['component']
|
|
|
- command = task['command']
|
|
|
- logger.debug(DBG_TRACE_DETAILED, BIND10_CONFIGURATOR_TASK, command,
|
|
|
- component.name())
|
|
|
- if command == 'start':
|
|
|
- component.start()
|
|
|
- self._components[task['name']] = component
|
|
|
- elif command == 'stop':
|
|
|
- if component.running():
|
|
|
- component.stop()
|
|
|
- del self._components[task['name']]
|
|
|
- else:
|
|
|
- # Can Not Happen (as the plans are generated by ourself).
|
|
|
- # Therefore not tested.
|
|
|
- raise NotImplementedError("Command unknown: " + command)
|
|
|
+ done = 0
|
|
|
+ try:
|
|
|
+ logger.debug(DBG_TRACE_DATA, BIND10_CONFIGURATOR_RUN, len(plan))
|
|
|
+ for task in plan:
|
|
|
+ component = task['component']
|
|
|
+ command = task['command']
|
|
|
+ logger.debug(DBG_TRACE_DETAILED, BIND10_CONFIGURATOR_TASK, command,
|
|
|
+ component.name())
|
|
|
+ if command == 'start':
|
|
|
+ component.start()
|
|
|
+ self._components[task['name']] = component
|
|
|
+ elif command == 'stop':
|
|
|
+ if component.running():
|
|
|
+ component.stop()
|
|
|
+ del self._components[task['name']]
|
|
|
+ else:
|
|
|
+ # Can Not Happen (as the plans are generated by ourself).
|
|
|
+ # Therefore not tested.
|
|
|
+ raise NotImplementedError("Command unknown: " + command)
|
|
|
+ done += 1
|
|
|
+ except:
|
|
|
+ logger.error(BIND10_CONFIGURATOR_PLAN_INTERRUPTED, done, len(plan))
|
|
|
+ raise
|