[1/4] mesos git commit: Created staging dir only when needed.
Repository: mesos Updated Branches: refs/heads/1.4.x 6241f7722 -> 92feb52d9 Created staging dir only when needed. Created staging dir only when needed. Review: https://reviews.apache.org/r/61546/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d2e4f02d Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d2e4f02d Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d2e4f02d Branch: refs/heads/1.4.x Commit: d2e4f02dee21511661c1d273a66e32f211794fda Parents: 6241f77 Author: Qian ZhangAuthored: Fri Aug 11 15:53:55 2017 -0700 Committer: Gilbert Song Committed: Fri Aug 11 16:20:24 2017 -0700 -- .../mesos/provisioner/docker/store.cpp | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/d2e4f02d/src/slave/containerizer/mesos/provisioner/docker/store.cpp -- diff --git a/src/slave/containerizer/mesos/provisioner/docker/store.cpp b/src/slave/containerizer/mesos/provisioner/docker/store.cpp index 8058dcb..f357710 100644 --- a/src/slave/containerizer/mesos/provisioner/docker/store.cpp +++ b/src/slave/containerizer/mesos/provisioner/docker/store.cpp @@ -274,18 +274,19 @@ Future StoreProcess::_get( } } - Try staging = -os::mkdtemp(paths::getStagingTempDir(flags.docker_store_dir)); - - if (staging.isError()) { -return Failure("Failed to create a staging directory: " + staging.error()); - } - - // If there is already an pulling going on for the given 'name', we + // If there is already a pulling going on for the given 'name', we // will skip the additional pulling. const string name = stringify(reference); if (!pulling.contains(name)) { +Try staging = + os::mkdtemp(paths::getStagingTempDir(flags.docker_store_dir)); + +if (staging.isError()) { + return Failure( + "Failed to create a staging directory: " + staging.error()); +} + Owned promise(new Promise()); Future future = puller->pull(
[1/4] mesos git commit: Created staging dir only when needed.
Repository: mesos Updated Branches: refs/heads/master 6241f7722 -> 92feb52d9 Created staging dir only when needed. Created staging dir only when needed. Review: https://reviews.apache.org/r/61546/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d2e4f02d Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d2e4f02d Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d2e4f02d Branch: refs/heads/master Commit: d2e4f02dee21511661c1d273a66e32f211794fda Parents: 6241f77 Author: Qian ZhangAuthored: Fri Aug 11 15:53:55 2017 -0700 Committer: Gilbert Song Committed: Fri Aug 11 16:20:24 2017 -0700 -- .../mesos/provisioner/docker/store.cpp | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/mesos/blob/d2e4f02d/src/slave/containerizer/mesos/provisioner/docker/store.cpp -- diff --git a/src/slave/containerizer/mesos/provisioner/docker/store.cpp b/src/slave/containerizer/mesos/provisioner/docker/store.cpp index 8058dcb..f357710 100644 --- a/src/slave/containerizer/mesos/provisioner/docker/store.cpp +++ b/src/slave/containerizer/mesos/provisioner/docker/store.cpp @@ -274,18 +274,19 @@ Future StoreProcess::_get( } } - Try staging = -os::mkdtemp(paths::getStagingTempDir(flags.docker_store_dir)); - - if (staging.isError()) { -return Failure("Failed to create a staging directory: " + staging.error()); - } - - // If there is already an pulling going on for the given 'name', we + // If there is already a pulling going on for the given 'name', we // will skip the additional pulling. const string name = stringify(reference); if (!pulling.contains(name)) { +Try staging = + os::mkdtemp(paths::getStagingTempDir(flags.docker_store_dir)); + +if (staging.isError()) { + return Failure( + "Failed to create a staging directory: " + staging.error()); +} + Owned promise(new Promise()); Future future = puller->pull(