This is different to the usage of the other commands.
The other commands matches on substrings of task name, but they are read-only in nature.
A kill command is quite different, it would be quite unfortunate that we accidentally kill a task we did not mean to.
The kill command should provide a summary about the task about to be killed and prompt the user for confirmation.
[-y] is optional, if set, then assume yes to the confirmation
The command should return an exit code 0 if something was killed.
It should also return an exit code 0 if no task was found to kill. Some external scripts may want to put the kill command on a timeout condition, and it should not error out just because there was nothing to kill at the timeout time (i.e. the task already completed).
Otherwise, return non zero if the user said no or the task could not be killed.
Seems like there is an API available to help facilitate a kill task command, https://issues.apache.org/jira/browse/MESOS-1390
I propose the following syntax:
This is different to the usage of the other commands. The other commands matches on substrings of task name, but they are read-only in nature. A kill command is quite different, it would be quite unfortunate that we accidentally kill a task we did not mean to. The kill command should provide a summary about the task about to be killed and prompt the user for confirmation.
The command should return an exit code 0 if something was killed. It should also return an exit code 0 if no task was found to kill. Some external scripts may want to put the kill command on a timeout condition, and it should not error out just because there was nothing to kill at the timeout time (i.e. the task already completed).
Otherwise, return non zero if the user said no or the task could not be killed.