| 3641 | |
| 3642 | |
| 3643 | Future<Response> Http::killNestedContainer( |
| 3644 | const mesos::agent::Call& call, |
| 3645 | ContentType acceptType, |
| 3646 | const Option<Principal>& principal) const |
| 3647 | { |
| 3648 | CHECK_EQ(mesos::agent::Call::KILL_NESTED_CONTAINER, call.type()); |
| 3649 | CHECK(call.has_kill_nested_container()); |
| 3650 | |
| 3651 | LOG(INFO) << "Processing KILL_NESTED_CONTAINER call for container '" |
| 3652 | << call.kill_nested_container().container_id() << "'"; |
| 3653 | |
| 3654 | // SIGKILL is used by default if a signal is not specified. |
| 3655 | int signal = SIGKILL; |
| 3656 | if (call.kill_nested_container().has_signal()) { |
| 3657 | signal = call.kill_nested_container().signal(); |
| 3658 | } |
| 3659 | |
| 3660 | return ObjectApprovers::create( |
| 3661 | slave->authorizer, |
| 3662 | principal, |
| 3663 | {KILL_NESTED_CONTAINER}) |
| 3664 | .then(defer( |
| 3665 | slave->self(), |
| 3666 | [=](const Owned<ObjectApprovers>& approvers) { |
| 3667 | return _killContainer<KILL_NESTED_CONTAINER>( |
| 3668 | call.kill_nested_container().container_id(), |
| 3669 | signal, |
| 3670 | acceptType, |
| 3671 | approvers); |
| 3672 | })); |
| 3673 | } |
| 3674 | |
| 3675 | |
| 3676 | Future<Response> Http::killContainer( |