This is an automated email from the ASF dual-hosted git repository.

qianzhang 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 e6ba06c  Avoided error in Mesos logs upon docker image fetch
e6ba06c is described below

commit e6ba06cdf449c7c23904c63df728b78d2fbb9678
Author: =?UTF-8?q?Gr=C3=A9goire=20Seux?= <g.s...@criteo.com>
AuthorDate: Wed Mar 25 07:34:34 2020 +0000

    Avoided error in Mesos logs upon docker image fetch
    
    When fetching docker image, fetcher tests curl support for
    `--http1.1` flag. This patch makes sure we properly capture
    stderr to avoid displaying warnings in Mesos logs.
    
    This closes #354
---
 src/uri/fetchers/docker.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/uri/fetchers/docker.cpp b/src/uri/fetchers/docker.cpp
index e47d9d9..1256294 100644
--- a/src/uri/fetchers/docker.cpp
+++ b/src/uri/fetchers/docker.cpp
@@ -114,7 +114,7 @@ static Future<http::Response> curl(
     // infrastructures. The '--http1.1' flag got added to curl with
     // with version 7.33.0. Some supported distributions do still come
     // with curl version 7.19.0. See MESOS-8907.
-    http11 = os::system("curl --http1.1 -V  2>&1 >/dev/null") == 0;
+    http11 = os::system("curl --http1.1 -V > /dev/null 2>&1") == 0;
     VLOG(1) << "Curl accepts --http1.1 flag: " << stringify(http11);
     initialized->done();
   }

Reply via email to