You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by cf...@apache.org on 2021/08/30 16:54:52 UTC
[mesos] branch master updated: Fixed cpplint errors.
This is an automated email from the ASF dual-hosted git repository.
cfnatali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new da3e748 Fixed cpplint errors.
da3e748 is described below
commit da3e748433ecf157e270fe0c94b6229eeb51c156
Author: Charles-Francois Natali <cf...@gmail.com>
AuthorDate: Mon Aug 9 18:38:46 2021 +0100
Fixed cpplint errors.
---
src/slave/containerizer/docker.cpp | 6 ++++--
src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp | 1 -
src/slave/containerizer/mesos/isolators/volume/csi/state.hpp | 3 ++-
src/slave/flags.cpp | 2 +-
src/slave/slave.cpp | 4 ++--
src/tests/containerizer/docker_volume_isolator_tests.cpp | 3 ++-
src/tests/containerizer/volume_csi_isolator_tests.cpp | 3 ++-
7 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 431f7c6..4e4354f 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -1395,7 +1395,8 @@ Future<Docker::Container> DockerContainerizerProcess::launchExecutorContainer(
#endif
container->environment,
None(), // No extra devices.
- flags.docker_mesos_image.isNone() ? flags.default_container_dns : None(),
+ flags.docker_mesos_image.isNone() ?
+ flags.default_container_dns : None(),
container->resourceLimits);
if (runOptions.isError()) {
@@ -1917,7 +1918,8 @@ Future<Nothing> DockerContainerizerProcess::__update(
// Set CFS quota to CPU limit (if any) or to CPU request (if the
// flag `--cgroups_enable_cfs` is true).
- if (cpuLimit.isSome() || (flags.cgroups_enable_cfs && cpuRequest.isSome())) {
+ if (cpuLimit.isSome() ||
+ (flags.cgroups_enable_cfs && cpuRequest.isSome())) {
Try<Nothing> write = cgroups::cpu::cfs_period_us(
cpuHierarchy.get(),
cpuCgroup.get(),
diff --git a/src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp b/src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp
index 8180b19..a279902 100644
--- a/src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp
+++ b/src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp
@@ -404,7 +404,6 @@ Future<Option<ContainerLaunchInfo>> VolumeCSIIsolatorProcess::_prepare(
const Option<string>& user,
const vector<Future<string>>& futures)
{
-
ContainerLaunchInfo launchInfo;
launchInfo.add_clone_namespaces(CLONE_NEWNS);
diff --git a/src/slave/containerizer/mesos/isolators/volume/csi/state.hpp b/src/slave/containerizer/mesos/isolators/volume/csi/state.hpp
index 6a547d0..020b82c 100644
--- a/src/slave/containerizer/mesos/isolators/volume/csi/state.hpp
+++ b/src/slave/containerizer/mesos/isolators/volume/csi/state.hpp
@@ -30,7 +30,8 @@ namespace slave {
inline bool operator==(const CSIVolume& left, const CSIVolume& right)
{
- return (left.plugin_name() == right.plugin_name()) && (left.id() == right.id());
+ return (left.plugin_name() == right.plugin_name()) &&
+ (left.id() == right.id());
}
} // namespace slave {
diff --git a/src/slave/flags.cpp b/src/slave/flags.cpp
index e66b464..d167e54 100644
--- a/src/slave/flags.cpp
+++ b/src/slave/flags.cpp
@@ -132,7 +132,7 @@ mesos::internal::slave::Flags::Flags()
" \"NODE_SERVICE\"\n"
" ],\n"
" \"command\": {\n"
- " \"value\": \"<path-to-managed-plugin> --endpoint=$CSI_ENDPOINT\"\n"
+ " \"value\": \"<path-to-managed-plugin> --endpoint=$CSI_ENDPOINT\"\n" // NOLINT(whitespace/line_length)
" },\n"
" \"resources\": [\n"
" {\"name\": \"cpus\", \"type\": \"SCALAR\", \"scalar\": {\"value\": 0.1}},\n" // NOLINT(whitespace/line_length)
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index c715951..a2d6eb7 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -188,8 +188,8 @@ static CommandInfo defaultExecutorCommandInfo(
const Option<std::string>& user);
-// Sets the executor resource limit (the `limit` parameter) based on the resource
-// passed in (the `value` parameter).
+// Sets the executor resource limit (the `limit` parameter) based on the
+// resource passed in (the `value` parameter).
static void setLimit(Option<Value::Scalar>& limit, const Value::Scalar& value);
diff --git a/src/tests/containerizer/docker_volume_isolator_tests.cpp b/src/tests/containerizer/docker_volume_isolator_tests.cpp
index ef58f7d..8d71ba6 100644
--- a/src/tests/containerizer/docker_volume_isolator_tests.cpp
+++ b/src/tests/containerizer/docker_volume_isolator_tests.cpp
@@ -1681,7 +1681,8 @@ TEST_F(DockerVolumeIsolatorTest,
// This test verifies that unmount operation can be still invoked for
// a docker volume even the previous unmount operation for the same
// docker volume failed. This is a regression test for MESOS-10126.
-TEST_F(DockerVolumeIsolatorTest, ROOT_CommandTaskNoRootfsWithUnmountVolumeFailure)
+TEST_F(DockerVolumeIsolatorTest,
+ ROOT_CommandTaskNoRootfsWithUnmountVolumeFailure)
{
Clock::pause();
diff --git a/src/tests/containerizer/volume_csi_isolator_tests.cpp b/src/tests/containerizer/volume_csi_isolator_tests.cpp
index 688af4d..7cd03be 100644
--- a/src/tests/containerizer/volume_csi_isolator_tests.cpp
+++ b/src/tests/containerizer/volume_csi_isolator_tests.cpp
@@ -597,7 +597,8 @@ TEST_P(VolumeCSIIsolatorTest, ROOT_INTERNET_CURL_TaskGroupWithVolume)
TEST_CONTAINER_PATH + TEST_OUTPUT_FILE);
Try<string> taskCommand2 = strings::format(
- "while [ \"`cat %s 2>/dev/null`\" != \"%s\" ]; do : sleep 0.1 ; done; exit 0",
+ "while [ \"`cat %s 2>/dev/null`\" != \"%s\" ]; do : "
+ "sleep 0.1 ; done; exit 0",
TEST_CONTAINER_PATH + TEST_OUTPUT_FILE,
TEST_OUTPUT_STRING);