Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#99 closed defect (fixed)

bindctl will allow options for modules that aren't running

Reported by: jreed Owned by: zhanglikun
Priority: medium Milestone: 05. 3rd Incremental Release: Serious Secondary
Component: ~bind-ctl (obsolete) Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: 0.0 Add Hours to Ticket:
Total Hours: Internal?: no

Description

I used bindctl and it had:

> Auth help
Module  Auth    same here 
Available commands:
         help   (Get help for module)
         print_message  (Print the given message to stdout)
         shutdown       (Shut down BIND 10)
> Auth print_message foo
send the message to cmd-ctrld
b10-cmdctl send command 'print_message' to Auth
[Errno 32] Broken pipe :b10-cmdctl fail send command 'print_message' to Auth
b10-cmdctl finish send message 'print_message' to module Auth
received reply: {"error": "[Errno 32] Broken pipe"}

b10-auth was not running. But it had its options listed and accepted.

Subtickets

Change History (11)

comment:1 Changed 10 years ago by zhanglikun

  • Owner set to zhanglikun
  • Status changed from new to assigned

comment:2 Changed 9 years ago by shane

  • Component changed from Unclassified to bind-ctl
  • Milestone set to feature backlog item

comment:3 Changed 9 years ago by shane

  • Milestone changed from feature backlog item to 05. 3rd Incremental Release: Serious Secondary

comment:4 Changed 9 years ago by zhanglikun

This bug replies on ticket #123, now cmdctl will hold all modules' spec even some module has been shutdowned since cmdctl can't get the 'shutdown' message from config manager, so open this ticket until ticket 123 has been fixed.

comment:5 Changed 9 years ago by jelte

  • billable set to 0
  • Estimated Difficulty set to 0.0
  • Internal? unset

Hmm. If the module has been shut down configmanager also doesn't know that (again, until #123 has been done). But a bigger question is; do we want to be able to change config options of modules that aren't running (i think we might). In that case this will depend more on the 'static' configration api (is there a ticket for that yet?)

But shall I for now simply let it return an error? ("Module not known or not running")

(i'm guessing that would also fix #202)

comment:6 follow-up: Changed 9 years ago by zhanglikun

How you plan to let it return an error? since configmanager or cmdctl doesn't know it now.

BTW, I have some comments about the operation for configuration.

  1. For the low-level configuration item, maybe it's not easy to config it by bindctl, like I want to change one port of the master, the commmand will like "config set xfrin/masters[2]/port 53", I don't know whether we will provide lower level config items.


{

module_name: 'xfrin':
[

{

masters: [

{ 'ip':1.1.1.1, 'port':53 }
{ 'ip':2.2.2.2, 'port':12345 }
{ 'ip':3.3.3.3, 'port':12345 }

]

}

]

}

  1. I am not sure whether the 'static' configuration APIs can handle the "big" configuration operation, like I want to set several 'masters' for more than one zone, I had thought it can be down through bindctl, but it really frustrating, because I have to 'config set master 1.1.1.1, then config commit" again and again. It's better let user to write the configuration in one file, then load it to config manager. (We talked it in beijing f2f meeting.)

comment:7 in reply to: ↑ 6 Changed 9 years ago by jelte

Replying to zhanglikun:

How you plan to let it return an error? since configmanager or cmdctl doesn't know it now.

If we limit configuration options to running modules (for now!) cfgmgr could simply send back an error message when it gets an config-update command. But I was thinking of letting bindctl not send it in the first place (i.e. do a key check when 'config set' is entered)

BTW, I have some comments about the operation for configuration.

  1. For the low-level configuration item, maybe it's not easy to config it by bindctl, like I want to change one port of the master, the commmand will like "config set xfrin/masters[2]/port 53", I don't know whether we will provide lower level config items.

Yes we definitely need that, but i think we need something a little bit more advanced than simply an index (i was thinking of something like "config set xfrin/masters[zone_name='example.com']/port 53"

Ideas are very welcome :)


{

module_name: 'xfrin':
[

{

masters: [

{ 'ip':1.1.1.1, 'port':53 }
{ 'ip':2.2.2.2, 'port':12345 }
{ 'ip':3.3.3.3, 'port':12345 }

]

}

]

}

  1. I am not sure whether the 'static' configuration APIs can handle the "big" configuration operation, like I want to set several 'masters' for more than one zone, I had thought it can be down through bindctl, but it really frustrating, because I have to 'config set master 1.1.1.1, then config commit" again and again. It's better let user to write the configuration in one file, then load it to config manager. (We talked it in beijing f2f meeting.)

bindctl should be able to handle entire subtrees of configuration directly, and you should not need to commit after every addition (if either of these things is not true we have a bug)

having batch-operations taken from a file would be another feature we should definitely implement

The reason i am talking about a 'static' configuration API is that we might also want to change configuration when BIND10 is not running at all. In that case we'll need a way to find out what modules and configuration options exist, and that is what we'll need for 'live' changes to non-running modules here too.

comment:8 Changed 9 years ago by jelte

So here's what i had in mind (branches/trac99 r2643), just let bindctl print an error and not perform any action if the module is unknown.

comment:9 Changed 9 years ago by zhanglikun

I have reviewed and tested the code, it works well,please go ahead.

comment:10 Changed 9 years ago by jelte

  • Resolution set to fixed
  • Status changed from assigned to closed

Merged in r2567, closing ticket.

comment:11 Changed 9 years ago by jelte

err, sorry, r2657 that is

Note: See TracTickets for help on using tickets.