> On Июль 1, 2019, 8:28 д.п., Qian Zhang wrote: > > src/slave/http.cpp > > Lines 2431 (patched) > > <https://reviews.apache.org/r/70892/diff/1/?file=2151371#file2151371line2431> > > > > If this endpoint will only return pending operations, do we really need > > the `pending` here? I think we can just return a `JSON::ARRAY` instead of > > `JSON::OBJECT` and each element in the array is a pending operations. > > > > Or we may consider to add other info (other than pending operations) > > into this endpoint?
We may want to add more debug info related to containerizer. Also, the data is self-descriptive, which is better for operators. > On Июль 1, 2019, 8:28 д.п., Qian Zhang wrote: > > src/slave/slave.cpp > > Lines 837 (patched) > > <https://reviews.apache.org/r/70892/diff/1/?file=2151372#file2151372line837> > > > > Do we plan to return pending operations for other components rather > > than just containerizer in future? If yes, then I think we'd better give it > > a generic name (like `/debug`) and return component name (currently it is > > just `containerizer`) along with operation name and args in the response. Currently, we do not plan to introduce generic `/debug` endpoint. We don't know all the requirements for the generic `/debug` endpoint. In the case of `/containerizer/debug` endpoint, the only requirement is that it responses even if containerizer hangs. Also, `/containerizer/debug` endpoint is marked as expiremental and is supposed to be used only by operators (DevOps), not by automatic tools. - Andrei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70892/#review216264 ----------------------------------------------------------- On Июнь 19, 2019, 2:49 п.п., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70892/ > ----------------------------------------------------------- > > (Updated Июнь 19, 2019, 2:49 п.п.) > > > Review request for mesos, Gilbert Song, James Peach, and Qian Zhang. > > > Bugs: MESOS-9829 > https://issues.apache.org/jira/browse/MESOS-9829 > > > Repository: mesos > > > Description > ------- > > This patch introduces an agent's `/containerizer/debug` endpoint, > which exposes the debug info related to Mesos containerizer. > Currently, this endpoint returns a list of pending futures related to > isolators or containerizer launcher. This endpoint is experimental, > and the format of its output may change over time. > > > Diffs > ----- > > src/local/local.cpp 6ac6b027f66ef555440ca86803198bfe3227f8d7 > src/slave/http.hpp b8c83f1db95c2175bb94f6cd76cc2c58aa118c4e > src/slave/http.cpp 69e6d74e8b113cc6c937f47df8984ff9a63e5bb4 > src/slave/main.cpp ef5ea02f169427d9913b807664bf3073d72cd9b6 > src/slave/slave.hpp 6954f53ff1531b9fcb688ef76acddf6a3d849a41 > src/slave/slave.cpp 30039b0857a4d85b4b96fa95d7f8724d57cdec6e > src/tests/cluster.cpp b43f806eab096b7d4e86e2b5d4b81d6baecb0ee5 > src/tests/mock_slave.hpp c057b40d6db433f52d1dfe10ae02a3b0bc936564 > src/tests/mock_slave.cpp dd458e3d09e212d6cde514d86989878954f79fc1 > > > Diff: https://reviews.apache.org/r/70892/diff/2/ > > > Testing > ------- > > Manual testing. > 1. Add `::sleep(5)` to the beginning of the > `LinuxSeccompIsolatorProcess::prepare` method. > 2. Rebuild Mesos and then spin up a local Mesos cluster. > 3. Run simple task, e.g.: > ``` > ./src/mesos-execute --master="`hostname`:5050" --name="test" > --containerizer=mesos --command="sleep 1" > ``` > 4. In the parallel terminal session: > ``` > curl `hostname`:5051/containerizer/debug > # will return: > {"pending":[["linux/seccomp::prepare",{"containerId":"<container id>"}]]} > ``` > 5. After 5 seconds this endpoint returns an empty list of pending futures: > `{"pending":[]}` > > Unit tests: TBD in the following patches. > > > Thanks, > > Andrei Budnik > >