BIND 10 #2290: bindctl crash after malformed command
BIND 10 Development
do-not-reply at isc.org
Mon Sep 24 12:39:50 UTC 2012
#2290: bindctl crash after malformed command
---------------------------------+-----------------------------------------
Reporter: tomek | Owner:
Type: defect | Status: new
Priority: low | Milestone: New Tasks
Component: bind-ctl | Keywords:
Sensitive: 0 | Defect Severity: N/A
Sub-Project: Core | Feature Depending on Ticket:
Estimated Difficulty: 0 | Add Hours to Ticket: 0
Total Hours: 0 | Internal?: 0
---------------------------------+-----------------------------------------
bindctl crashes, when trying to add to non-existing list entry. While I
was learning how to write bindctl, commands I've crashed it couple times.
Error handling should be improved. It is frustrating, when user types long
configuration and then due to one syntax error bindctl crashes and all
changes are lost.
This works:
config set Dhcp6/subnet6[0]/valid-lifetime 1000
However, this:
config add Dhcp6/subnet6[0] valid-lifetime 1000
will crash bindctl:
{{{
thomson at billabong:~/devel/bind10/src/bin/dhcp6$ bindctl
["login success "] login as root
> config add Dhcp6/subnet6[0] valid-lifetime 1000
Traceback (most recent call last):
File "/usr/lib/python3.2/cmd.py", line 214, 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 "/usr/local/bin/bindctl", line 151, in <module>
result = tool.run()
File "/usr/local/lib/python3/dist-packages/bindctl/bindcmd.py", line
140, in run
self.cmdloop()
File "/usr/lib/python3.2/cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File "/usr/local/lib/python3/dist-packages/bindctl/bindcmd.py", line
464, in onecmd
Cmd.onecmd(self, line)
File "/usr/lib/python3.2/cmd.py", line 216, in onecmd
return self.default(line)
File "/usr/local/lib/python3/dist-packages/bindctl/bindcmd.py", line
430, in default
self._parse_cmd(line)
File "/usr/local/lib/python3/dist-packages/bindctl/bindcmd.py", line
567, in _parse_cmd
self._handle_cmd(cmd)
File "/usr/local/lib/python3/dist-packages/bindctl/bindcmd.py", line
414, in _handle_cmd
self.apply_config_cmd(cmd)
File "/usr/local/lib/python3/dist-packages/bindctl/bindcmd.py", line
683, in apply_config_cmd
cmd.params.get('value_for_set'))
File "/usr/local/lib/python3/dist-packages/isc/config/ccsession.py",
line 591, in add_value
self._add_value_to_list(identifier, value, module_spec)
File "/usr/local/lib/python3/dist-packages/isc/config/ccsession.py",
line 533, in _add_value_to_list
cur_list.append(value)
AttributeError: 'dict' object has no attribute 'append'
}}}
I've used code from branch #2269, but I think that is a generic issue.
--
Ticket URL: <http://bind10.isc.org/ticket/2290>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list