Opened 9 years ago

Closed 8 years ago

#1195 closed defect (duplicate)

bindctl crash on multiple add

Reported by: jreed Owned by:
Priority: low Milestone: Year 3 Task Backlog
Component: ~bind-ctl (obsolete) Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Medium
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

I already had 0 and 1. I wanted to add back the lookpack IPs. The first one added looked good. So I added next so I can change to 127.0.0.1 but I never got that chance.

> config add Resolver/listen_on 
> config show Resolver/listen_on
Resolver/listen_on[0]/address   "2001:4f8:3:d::95"      string  (modified)
Resolver/listen_on[0]/port      53      integer (modified)
Resolver/listen_on[1]/address   "149.20.48.80"  string  (modified)
Resolver/listen_on[1]/port      53      integer (modified)
Resolver/listen_on[2]/address   "::1"   string  (default)
Resolver/listen_on[2]/port      53      integer (default)
> config add Resolver/listen_on
Traceback (most recent call last):
  File "/usr/local/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/jreed/opt/bind10/bin/bindctl", line 149, in <module>
    tool.run()
  File "/home/jreed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 128, in run
    self.cmdloop()
  File "/usr/local/lib/python3.1/cmd.py", line 139, in cmdloop
    stop = self.onecmd(line)
  File "/home/jreed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 452, in onecmd
    Cmd.onecmd(self, line)
  File "/usr/local/lib/python3.1/cmd.py", line 215, in onecmd
    return self.default(line)
  File "/home/jreed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 418, in default
    self._parse_cmd(line)
  File "/home/jreed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 556, in _parse_cmd
    self._handle_cmd(cmd)
  File "/home/jreed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 396, in _handle_cmd
    self.apply_config_cmd(cmd)
  File "/home/jreed/opt/bind10/lib/python3.1/site-packages/bindctl/bindcmd.py", line 664, in apply_config_cmd
    cmd.params.get('value_for_set'))
  File "/home/jreed/opt/bind10/lib/python3.1/site-packages/isc/config/ccsession.py", line 495, in add_value
    self._add_value_to_list(identifier, value, module_spec)
  File "/home/jreed/opt/bind10/lib/python3.1/site-packages/isc/config/ccsession.py", line 448, in _add_value_to_list
    + identifier)
TypeError: unsupported operand type(s) for +: 'dict' and 'str'
(wd now: ~)

Also wrong above, it shows "(modified)" for settings that I configured previously (and are in use).

> config diff
{'Resolver': {'listen_on': [{'port': 53, 'address': '2001:4f8:3:d::95'}, {'port': 53, 'address': '149.20.48.80'}, {}]}}

That is certainly wrong. This is not a difference! These are already used. Maybe this should be a new ticket, but I thought it may be related.

While here let me complain:

> config commit
Error: Address must contain both the IPaddress and port
Configuration not committed

As you see above it already has address and port (:: and 53) that I want.

> config set Resolver/listen_on[2]/address ::1
> config set Resolver/listen_on[2]/port 53 
> config commit
> config add Resolver/listen_on
> config set Resolver/listen_on[3]/address 127.0.0.1
> config set Resolver/listen_on[3]/port 53
> config diff
{'Resolver': {'listen_on': [{'port': 53, 'address': '2001:4f8:3:d::95'}, {'port': 53, 'address': '149.20.48.80'}, {'port': 53, 'address': '::1'}, {'port': 53, 'address': '127.0.0.1'}]}}
> config commit

sockstat shows me:

root     b10-resolv 13870 7  tcp6   2001:4f8:3:d::95:53   *:*
root     b10-resolv 13870 8  udp6   2001:4f8:3:d::95:53   *:*
root     b10-resolv 13870 9  tcp4   149.20.48.80:53       *:*
root     b10-resolv 13870 10 udp4   149.20.48.80:53       *:*
root     b10-resolv 13870 11 tcp6   ::1:53                *:*
root     b10-resolv 13870 12 udp6   ::1:53                *:*
root     b10-resolv 13870 13 tcp4   127.0.0.1:53          *:*
root     b10-resolv 13870 14 udp4   127.0.0.1:53          *:*

so now good.

As for the bindctl crash, also see #1076 and #986

Subtickets

Change History (2)

comment:1 Changed 9 years ago by shane

  • Milestone changed from New Tasks to Year 3 Task Backlog

comment:2 Changed 8 years ago by vorner

  • Resolution set to duplicate
  • Status changed from new to closed

This was already solved in #1515.

Note: See TracTickets for help on using tickets.