Opened 7 years ago

Closed 5 years ago

#2485 closed defect (wontfix)

bindctl crash on show of removed item

Reported by: jreed Owned by:
Priority: high Milestone: Remaining BIND10 tickets
Component: ~bind-ctl (obsolete) Version: bind10-old
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Medium
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 5 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

> config show data_sources/classes/IN[1]
data_sources/classes/IN[1]/type "MasterFiles"   string  
data_sources/classes/IN[1]/params       {"test2.example.org": "/home/reed/opt/bind-HEAD/etc/test2.zone"}        any     
data_sources/classes/IN[1]/cache-enable true    boolean 
data_sources/classes/IN[1]/cache-zones/ list 
> config remove data_sources/classes/IN[1]
> config commit
> config show data_sources/classes/IN[1]
Traceback (most recent call last):
  File "/usr/pkg/lib/python3.1/cmd.py", line 213, in onecmd
    func = getattr(self, 'do_' + cmd)
AttributeError: 'BindCmdInterpreter' object has no attribute 'do_config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/reed/opt/bind10/bin/bindctl", line 162, in <module>
    result = tool.run()
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 152, in run
    self.cmdloop()
  File "/usr/pkg/lib/python3.1/cmd.py", line 139, in cmdloop
    stop = self.onecmd(line)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 476, in onecmd
    Cmd.onecmd(self, line)
  File "/usr/pkg/lib/python3.1/cmd.py", line 215, in onecmd
    return self.default(line)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 442, in default
    self._parse_cmd(line)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 639, in _parse_cmd
    self._handle_cmd(cmd)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 426, in _handle_cmd
    self.apply_config_cmd(cmd)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 719, in apply_config_cmd
    values = self.config_data.get_value_maps(identifier, show_all)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/isc/config/config_data.py", line 723, in get_value_maps
    self._append_value_item(result, spec_part, identifier, all, True)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/isc/config/config_data.py", line 630, in _append_value_item
    list_value, status = self.get_value(identifier)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/isc/config/config_data.py", line 603, in get_value
    value = self.get_default_value(identifier)
  File "/home/reed/opt/bind10/lib/python3.1/site-packages/isc/config/config_data.py", line 522, in get_default_value
    result = result[list_indices.pop(0)]
IndexError: list index out of range

Subtickets

Attachments (1)

bindctl.confusion_bug.txt (2.4 KB) - added by tmark 7 years ago.
Another example of how to cause this bug

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago by jinmei

that looks bad, but we really leave it to the fundamental refactoring/redesigning
of config stuff. This should be just a tip of iceberg.

comment:2 Changed 7 years ago by jwright

  • Defect Severity changed from N/A to Medium
  • Milestone New Tasks deleted

comment:3 Changed 7 years ago by naokikambe

My company's operator seemed to hit the same issue while testing. He just tried to show an undefined value in a list item as following.

> config show data_sources/classes/IN
data_sources/classes/IN[0]/type "sqlite3"       string  (default)
data_sources/classes/IN[0]/params       {"database_file": "/home/kambe/bind10/var/bind10/zone.sqlite3"} any     (defaul\
t)
data_sources/classes/IN[0]/cache-enable false   boolean (default)
data_sources/classes/IN[0]/cache-zones/ list
> config show data_sources/classes/IN[1]
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/cmd.py", line 212, in onecmd
    func = getattr(self, 'do_' + cmd)
AttributeError: 'BindCmdInterpreter' object has no attribute 'do_config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kambe/bind10/bin/bindctl", line 162, in <module>
    result = tool.run()
  File "/home/kambe/bind10/lib/python3.2/site-packages/bindctl/bindcmd.py", line 152, in run
    self.cmdloop()
  File "/usr/local/lib/python3.2/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/home/kambe/bind10/lib/python3.2/site-packages/bindctl/bindcmd.py", line 476, in onecmd
    Cmd.onecmd(self, line)
  File "/usr/local/lib/python3.2/cmd.py", line 214, in onecmd
    return self.default(line)
  File "/home/kambe/bind10/lib/python3.2/site-packages/bindctl/bindcmd.py", line 442, in default
    self._parse_cmd(line)
  File "/home/kambe/bind10/lib/python3.2/site-packages/bindctl/bindcmd.py", line 639, in _parse_cmd
    self._handle_cmd(cmd)
  File "/home/kambe/bind10/lib/python3.2/site-packages/bindctl/bindcmd.py", line 426, in _handle_cmd
    self.apply_config_cmd(cmd)
  File "/home/kambe/bind10/lib/python3.2/site-packages/bindctl/bindcmd.py", line 719, in apply_config_cmd
    values = self.config_data.get_value_maps(identifier, show_all)
  File "/home/kambe/bind10/lib/python3.2/site-packages/isc/config/config_data.py", line 723, in get_value_maps
    self._append_value_item(result, spec_part, identifier, all, True)
  File "/home/kambe/bind10/lib/python3.2/site-packages/isc/config/config_data.py", line 630, in _append_value_item
    list_value, status = self.get_value(identifier)
  File "/home/kambe/bind10/lib/python3.2/site-packages/isc/config/config_data.py", line 603, in get_value
    value = self.get_default_value(identifier)
  File "/home/kambe/bind10/lib/python3.2/site-packages/isc/config/config_data.py", line 522, in get_default_value
    result = result[list_indices.pop(0)]
IndexError: list index out of range
Last edited 7 years ago by naokikambe (previous) (diff)

Changed 7 years ago by tmark

Another example of how to cause this bug

comment:4 Changed 7 years ago by jreed

  • Milestone set to Next-Sprint-Proposed
  • Priority changed from medium to high

comment:5 Changed 7 years ago by jreed

  • Milestone changed from Previous-Sprint-Proposed to Next-Sprint-Proposed

Also see #2816.

comment:6 Changed 7 years ago by shane

  • Milestone changed from Previous-Sprint-Proposed to Next-Sprint-Proposed

comment:7 Changed 6 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:8 Changed 5 years ago by tomek

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version set to old-bind10

This issue is related to bind10 code that is no longer part of Kea.

If you are interested in BIND10/Bundy framework or its DNS components,
please check http://bundy-dns.de.

Closing ticket.

Note: See TracTickets for help on using tickets.