Opened 8 years ago

Closed 8 years ago

#1819 closed task (fixed)

add boss nokill flag

Reported by: jelte Owned by: muks
Priority: medium Milestone: Sprint-20120403
Component: ~Boss of BIND (obsolete) Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 3 Add Hours to Ticket: 0
Total Hours: 0.39 Internal?: no

Description

Add a command-line option that tells Boss not to send term or kill signals (so that we can be very sure modules behave when they get a shutdown command)

Subtickets

Change History (17)

comment:1 Changed 8 years ago by shane

I propose we name the flag:

--no-kill-i

In honor of the Horta:

http://images.wikia.com/startrek/images/4/41/No_Kill_I.jpg
http://memory-beta.wikia.com/wiki/The_Devil_in_the_Dark

Well, it's just an idea. ;)

comment:2 Changed 8 years ago by muks

Picking bug

comment:3 Changed 8 years ago by muks

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

comment:4 Changed 8 years ago by muks

  • Owner changed from muks to UnAssigned
  • Status changed from assigned to reviewing

Up for review.

comment:5 Changed 8 years ago by muks

  • Owner changed from UnAssigned to muks

Taking bug back myself, as I think I have to add the option in more places.

comment:6 Changed 8 years ago by muks

  • Owner changed from muks to UnAssigned

This can be reviewed now.

comment:7 Changed 8 years ago by vorner

  • Owner changed from UnAssigned to vorner

comment:8 follow-up: Changed 8 years ago by vorner

  • Owner changed from vorner to muks

Hello

The code looks OK. However, I think two important things are missing:

  • Documentation (at least in the man page, I don't think needs to be in the guide, as it is more a testing tool).
  • Some kind of tests. I'm not sure if it's easy to test in the unit tests, but the lettuce tests could do something like that. Creating a script/component that does not shut down by the shutdown command should be easy (just a while true ; do sleep 1 ; done would be enough, it does not need to listen on the message queue) and see it is not killed.

Thanks

comment:9 follow-ups: Changed 8 years ago by jreed

Was this naming "-i/--no-kill-i" a joke?

comment:10 in reply to: ↑ 9 ; follow-up: Changed 8 years ago by jinmei

Replying to jreed:

Was this naming "-i/--no-kill-i" a joke?

My understanding is that it was Shane's suggestion based on a novel or movie
name or something. So, yes, I think it's a kind of joke. I'm not sure
if it's a good idea if that's not obvious to anyone (btw it wouldn't be
obvious to me either if I didn't know it beforehand).

comment:11 in reply to: ↑ 10 Changed 8 years ago by shane

Replying to jinmei:

Replying to jreed:

Was this naming "-i/--no-kill-i" a joke?

My understanding is that it was Shane's suggestion based on a novel or movie
name or something. So, yes, I think it's a kind of joke. I'm not sure
if it's a good idea if that's not obvious to anyone (btw it wouldn't be
obvious to me either if I didn't know it beforehand).

Sorry, my suggestion was meant to be a joke. I forgot to include the appropriate <humor> meta-tags. :(

And for the record, this was Star Trek, not "a novel or movie name or something". How are we ever supposed to build proper communicators without remembering the inspiration? ;)
</HUMOR>.

comment:12 in reply to: ↑ 9 ; follow-up: Changed 8 years ago by muks

Replying to jreed:

Was this naming "-i/--no-kill-i" a joke?

That's gone now. For a while I think I'll wear a brown paper bag over my head. :)

comment:13 in reply to: ↑ 8 Changed 8 years ago by muks

Replying to vorner:

Hello

The code looks OK. However, I think two important things are missing:

  • Documentation (at least in the man page, I don't think needs to be in the guide, as it is more a testing tool).

This is added now.

  • Some kind of tests. I'm not sure if it's easy to test in the unit tests, but the lettuce tests could do something like that. Creating a script/component that does not shut down by the shutdown command should be easy (just a while true ; do sleep 1 ; done would be enough, it does not need to listen on the message queue) and see it is not killed.

I've added testcases for both the options parsing and also check if kill() is invoked for the BoB.kill flag (building from existing work which checks that killing happens when no option is passed). Also added some comments to existing testcase so it can be followed quickly.

comment:14 in reply to: ↑ 12 Changed 8 years ago by muks

Replying to muks:

Replying to jreed:

Was this naming "-i/--no-kill-i" a joke?

That's gone now. For a while I think I'll wear a brown paper bag over my head. :)

Oh that really means that it's now -i/--no-kill btw. :)

comment:15 Changed 8 years ago by muks

  • Owner changed from muks to vorner

comment:16 Changed 8 years ago by vorner

  • Owner changed from vorner to muks
  • Total Hours changed from 0 to 0.39

Hello

I'd add just one other thing ‒ a note to the option in man page that it's for testing/development purposes mostly. Then merge, please.

Thank you

comment:17 Changed 8 years ago by muks

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

Added the note.

Merged to master:

* 8e75f29 bug #1819: Add manpage note that the --no-kill option was introduced for testing
* a77e76f bug #1819: Add some comments to testcases
* 6551207 bug #1819: Check that BoB doesn't kill during shutdown when asked not to
* 32cd7d8 bug #1819: Add testcase for --no-kill and -i options handling
* 13c15d1 bug #1819: Document --no-kill option in bind10 manpage
* 342191d bug #1819: Update help text for no-kill option
* 3bd3d50 bug #1819: Rename --no-kill-i option to --no-kill
* 98e5599 bug #1819: Pass nokill as an argument to BoB constructor
* e136b42 bug #1819: Add ChangeLog entry
* 6a62919 bug #1819: Change conjunction used in help message
* 0482063 bug #1819: Add boss nokill flag (-i/--no-kill-i)

Resolving as fixed.

Note: See TracTickets for help on using tickets.