----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65395/#review197118 -----------------------------------------------------------
Thanks for this refactoring, the code looks much better and is way easier to understand this way. src/checks/checker_process.hpp Lines 53 (patched) <https://reviews.apache.org/r/65395/#comment277236> nit: s/this field/the `ipv6` parameter/ src/checks/checker_process.cpp Lines 188-200 (original), 223-230 (patched) <https://reviews.apache.org/r/65395/#comment277242> I'd remove the leading underscores in `_checkInfo`, `_launcherDir`, `_scheme`, since there is no shadowing to prevent. src/checks/checker_process.cpp Lines 240 (patched) <https://reviews.apache.org/r/65395/#comment277237> Nit: add a period at the end of the line. src/checks/checker_process.cpp Lines 297 (patched) <https://reviews.apache.org/r/65395/#comment277240> There's no "A" in the table. s/calling/executing/ src/checks/checker_process.cpp Lines 299 (patched) <https://reviews.apache.org/r/65395/#comment277243> s/isolated/entered/ src/checks/checker_process.cpp Lines 300 (patched) <https://reviews.apache.org/r/65395/#comment277244> s/DOCKER/Docker/ src/checks/checker_process.cpp Lines 301 (patched) <https://reviews.apache.org/r/65395/#comment277245> s/namespace/namespaces/ src/checks/checker_process.cpp Lines 303 (patched) <https://reviews.apache.org/r/65395/#comment277246> s/namespace/namespaces/ src/checks/checker_process.cpp Lines 304 (patched) <https://reviews.apache.org/r/65395/#comment277247> I'd write: `Use Agent API calls to run the command as a nested container.` src/checks/checker_process.cpp Lines 333-339 (patched) <https://reviews.apache.org/r/65395/#comment277241> In my opinion the following is easier to understand: ``` #ifdef __WINDOWS__ // Case E return dockerHttpCheck(http, d); #else // Case B* return httpCheck(http, runtime::Plain{d.namespaces, d.taskPid}); #endif // __WINDOWS__ ``` And I'd do the same elsewhere. I wonder what Andy and Alex think about this. src/checks/checker_process.cpp Lines 484-485 (patched) <https://reviews.apache.org/r/65395/#comment277248> What about removing this line and passing the result of `genCloneFun(plain)` directly to `process:subprocess`? i.e., ``` s = process::subprocess( command.value(), Subprocess::PATH(os::DEV_NULL), Subprocess::FD(STDERR_FILENO), Subprocess::FD(STDERR_FILENO), environment, genCloneFunc(plain)); ``` src/checks/checker_process.cpp Lines 978-979 (patched) <https://reviews.apache.org/r/65395/#comment277249> ditto removing this line. - Gaston Kleiman On Feb. 8, 2018, 9:49 a.m., Akash Gupta wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65395/ > ----------------------------------------------------------- > > (Updated Feb. 8, 2018, 9:49 a.m.) > > > Review request for mesos, Alexander Rukletsov, Andrew Schwartzmeyer, and > Gaston Kleiman. > > > Bugs: MESOS-8498 > https://issues.apache.org/jira/browse/MESOS-8498 > > > Repository: mesos > > > Description > ------- > > Refactored health check code to separate the logic for each check > type and runtime (Plain/Docker/Nested). Now the matrix of different > possiblilites is cleanly enumerated, making it easier to add > future health checks, such as the ones for Windows. > > > Diffs > ----- > > src/checks/checker.hpp 93502270f31e80c5f7c94b5b456625e9cdea1837 > src/checks/checker.cpp fff0aac504b4283a210f936e00c977fa60d88b3d > src/checks/checker_process.hpp 510f3b2e6e689faaf26595214ce377c2b5518f28 > src/checks/checker_process.cpp ddb197b8cc2c503fef5ae20af32f5881fff9833f > src/checks/health_checker.hpp 019fbd791f250ecc28ff59d779f90e7ccbf0c685 > src/checks/health_checker.cpp eaf9a18817eeeff7c29c7a4b9d1b183f398760a3 > src/docker/executor.cpp e4c53d558e414e50b1c429fba8e31e504c63744a > src/launcher/default_executor.cpp 4a619859095cc2d30f4806813f64a2e48c83b3ea > src/launcher/executor.cpp 050f5a057f360873e2b4738b126289bcd1bd0c7f > > > Diff: https://reviews.apache.org/r/65395/diff/3/ > > > Testing > ------- > > make check > > > Thanks, > > Akash Gupta > >
