BIND 10 #1843: Profiles of configuration

BIND 10 Development do-not-reply at isc.org
Fri Apr 20 17:03:59 UTC 2012


#1843: Profiles of configuration
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  jelte
  vorner                             |                Status:  reviewing
                       Type:         |             Milestone:
  enhancement                        |  Sprint-20120501
                   Priority:         |            Resolution:
  medium                             |             Sensitive:  0
                  Component:  bind-  |           Sub-Project:  Core
  ctl                                |  Estimated Difficulty:  6
                   Keywords:         |           Total Hours:  0
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by vorner):

 * owner:  vorner => jelte


Comment:

 Hello

 First, I'm not sure if the reverting is something we want to do, because
 it may lead to quite some confusion. Imagine:
  * The list of commands sets something, commits, then sets something else
 and fails. It reverts to the pre-commit state.
  * The list of commands contains some commands to the running components.
 They are executed up to the failure point, but the configuration is
 reverted.

 Considering it is possible to call `config revert` manually, I think it is
 better to just output a nice fat warning.

 Also, there are few nits in the code.

 This can be simplified:
 {{{#!python
             try:
                 command_file = open(command.params['filename'])
                 # copy them into a list for consistency with the built-in
                 # sets of commands
                 commands = []
                 for line in command_file:
                     commands.append(line)
                 command_file.close()
 }}}
 to:
 {{{#!python
 try:
         commands = open(command.params['filename']).readlines()
 }}}

 (note that if there are no other references to the file, it should get
 destroyed right away by dropping the refcount to 0 and therefore get
 closed automatically)

 This is whitespace intolerant ‒ if you place two spaces or tab before the
 on/off, it fails. The reason is hard to see then:
 {{{#!python
                     elif line.startswith('!verbose on'):
                         verbose = True
                     elif line.startswith('!verbose off'):
                         verbose = False
 }}}

 This comment seems to end prematurely:
 {{{
 # This file provides a built-in set of 'execute' commands, for common
 # functions, such as adding an initial auth server
 # These sets must have an associated CommandInfo defined in
 # bindctl_main.py.in, in prepare_execute_commands, and
 # a handler in
 }}}

 Missing `n` in:
 {{{
 # This would fail if the entire list was passed, or the configuratio
 }}}

 And there's an extra newline at the end of the lettuce test file.

 Besides, this reminds me of intercal:
 {{{
 last bindctl output should contain Please
 }}}
 Should we change the line to „The output should be polite“? ;-P

-- 
Ticket URL: <http://bind10.isc.org/ticket/1843#comment:7>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list