Repository: mesos Updated Branches: refs/heads/master 2e3f614bd -> c50f332eb
Some consistency style fixes in Docker puller. Review: https://reviews.apache.org/r/41236 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b32ccac3 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b32ccac3 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b32ccac3 Branch: refs/heads/master Commit: b32ccac3e5d3eea59a85f61a013fde80231a44a0 Parents: fb0c2db Author: Jie Yu <[email protected]> Authored: Thu Dec 10 17:57:37 2015 -0800 Committer: Jie Yu <[email protected]> Committed: Fri Dec 11 12:19:28 2015 -0800 ---------------------------------------------------------------------- .../mesos/provisioner/docker/puller.cpp | 30 +++++++++----------- 1 file changed, 14 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/b32ccac3/src/slave/containerizer/mesos/provisioner/docker/puller.cpp ---------------------------------------------------------------------- diff --git a/src/slave/containerizer/mesos/provisioner/docker/puller.cpp b/src/slave/containerizer/mesos/provisioner/docker/puller.cpp index 74498da..a8936e3 100644 --- a/src/slave/containerizer/mesos/provisioner/docker/puller.cpp +++ b/src/slave/containerizer/mesos/provisioner/docker/puller.cpp @@ -132,11 +132,9 @@ Future<pair<string, string>> untarLayer( const string& directory, const string& layerId) { - // We untar the layer from source into a directory, then move the - // layer into store. We do this instead of untarring directly to - // store to make sure we don't end up with partially untarred layer - // rootfs. - + // We untar the layer from source into a directory, then move the layer + // into store. We do this instead of untarring directly to store to make + // sure we don't end up with partially untarred layer rootfs. const string localRootfsPath = paths::getImageArchiveLayerRootfsPath(directory, layerId); @@ -149,29 +147,29 @@ Future<pair<string, string>> untarLayer( Try<Nothing> rmdir = os::rmdir(localRootfsPath); if (rmdir.isError()) { - return Failure("Failed to remove incomplete staged rootfs for layer '" + - layerId + "': " + rmdir.error()); + return Failure( + "Failed to remove incomplete staged rootfs for layer " + "'" + layerId + "': " + rmdir.error()); } } Try<Nothing> mkdir = os::mkdir(localRootfsPath); if (mkdir.isError()) { - return Failure("Failed to create rootfs path '" + localRootfsPath + - "': " + mkdir.error()); + return Failure( + "Failed to create rootfs path '" + localRootfsPath + "'" + ": " + mkdir.error()); } - // The tar file will be removed when the staging directory is - // removed. - return untar( - layerPath, - localRootfsPath) + // The tar file will be removed when the staging directory is removed. + return untar(layerPath, localRootfsPath) .then([directory, layerId]() -> Future<pair<string, string>> { const string rootfsPath = paths::getImageArchiveLayerRootfsPath(directory, layerId); if (!os::exists(rootfsPath)) { - return Failure("Failed to find the rootfs path after extracting layer" - " '" + layerId + "'"); + return Failure( + "Failed to find the rootfs path after extracting layer" + " '" + layerId + "'"); } return pair<string, string>(layerId, rootfsPath);
