[2/2] mesos git commit: Created staging dir only when needed.
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/84399975 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/84399975 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/84399975 Branch: refs/heads/1.1.x Commit: 84399975df5a482587598d8d9528c555c0945acd Parents: 8e79521 Author: Qian Zhang Authored: Fri Aug 11 15:53:55 2017 -0700 Committer: Gilbert Song Committed: Fri Aug 11 16:28:33 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/84399975/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 9dccd06..3a46c20 100644 --- a/src/slave/containerizer/mesos/provisioner/docker/store.cpp +++ b/src/slave/containerizer/mesos/provisioner/docker/store.cpp @@ -217,18 +217,19 @@ Future StoreProcess::_get( return image.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(reference, staging.get())
[2/2] mesos git commit: Created staging dir only when needed.
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/c6d21afc Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c6d21afc Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c6d21afc Branch: refs/heads/1.2.x Commit: c6d21afcf83277cd43fdeb88a87c29ec4c81964a Parents: 67598ba Author: Qian Zhang Authored: Fri Aug 11 15:53:55 2017 -0700 Committer: Gilbert Song Committed: Fri Aug 11 16:27:32 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/c6d21afc/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 68ce265..74e17ad 100644 --- a/src/slave/containerizer/mesos/provisioner/docker/store.cpp +++ b/src/slave/containerizer/mesos/provisioner/docker/store.cpp @@ -249,18 +249,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(reference, staging.get(), backend)
[2/2] mesos git commit: Created staging dir only when needed.
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/d6125979 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d6125979 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d6125979 Branch: refs/heads/1.3.x Commit: d6125979278451c1de5bc549ed24d069122ef270 Parents: f2deb04 Author: Qian Zhang Authored: Fri Aug 11 15:53:55 2017 -0700 Committer: Gilbert Song Committed: Fri Aug 11 16:26:49 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/d6125979/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 68ce265..74e17ad 100644 --- a/src/slave/containerizer/mesos/provisioner/docker/store.cpp +++ b/src/slave/containerizer/mesos/provisioner/docker/store.cpp @@ -249,18 +249,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(reference, staging.get(), backend)