BIND 10 #1172: Stats show with multiple items crashes bindctl

BIND 10 Development do-not-reply at isc.org
Wed Mar 21 13:57:40 UTC 2012


#1172: Stats show with multiple items crashes bindctl
-------------------------------------+-------------------------------------
                   Reporter:  jreed  |                 Owner:  UnAssigned
                       Type:         |                Status:  reviewing
  defect                             |             Milestone:
                   Priority:         |  Sprint-20120403
  medium                             |            Resolution:
                  Component:  bind-  |             Sensitive:  0
  ctl                                |           Sub-Project:  Core
                   Keywords:         |  Estimated Difficulty:  4
            Defect Severity:         |           Total Hours:  0
  Medium                             |
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => UnAssigned
 * status:  assigned => reviewing


Comment:

 I couldn't reproduce this specific error; I did not get a crash, but an
 error message.

 I could find one way to crash it in the interpreter, and have fixed that
 (first commit).

 I also found that the error was quite incomprehensible, but that had more
 to do with the output of 'help'; which I have taken the liberty to change
 a little; it used to be split up into mandatory and optional arguments,
 without mentioning the order of the arguments (originally bindctl had only
 named command parameters :P)

 So i have changed the 'help' output in two ways; it prints command
 arguments in their correct order, and it appends 'optional' or 'mandatory'
 to their type (which now no longer prints <type:> but just their type.

 Renamed the getter method from get_name to the more useful get_basic_info.

 Oh and I noticed the 'description' from the specfile never got set for
 command parameters, fixed that.

 I know this could be considered out of scope usability stuff, but it was
 relatively easy output-only fixes that i think are very useful.

 Example:

 Where it used to say:

 {{{
 Command  set    (set the value of specified name in statistics data)
                 help (Get help for command)

 Mandatory parameters:
     owner <type: string>

     data <type: map>


 Optional parameters:
     pid <type: integer>
 }}}

 Note that 'data' is the *third* argument, and pid the (optional) second,
 which is unclear from the above. (on an unrelated note, I don't think
 Stats set should be a public command)

 It now shows:

 {{{
 Command  set    (set the value of specified name in statistics data)
                 help (Get help for command)
 Parameters:
     owner (string, mandatory)
         module name of the owner of the statistics data
     pid (integer, optional)
         process id of the owner module
     data (map, mandatory)
         statistics data set of the owner
 }}}

 Not sure if this needs a changelog; if so
 [bug] Fixed a parser bug in bindctl that could make bindctl crash. Also
 improved 'command help' output; argument order is now shown correctly, and
 parameter descriptions are shown as well.

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


More information about the bind10-tickets mailing list