代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/docker 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 024a67b1d7ccfa85bba14318cd4fbbe78ecc8b7e Mon Sep 17 00:00:00 2001
From: jingrui <jingrui@huawei.com>
Date: Thu, 10 Jan 2019 00:17:01 +0800
Subject: [PATCH 046/111] debug: add more error info when dial
docker.sock fail
reason: cherry-pick commits to docker-18.09
add more error info when dial docker.sock fail
cherry-pick from 1.11.2: 91c7491
Change-Id: I3c7219d44be752ecde92479f03c0e2cee3ccb4a0
Signed-off-by: lujingxiao <lujingxiao@huawei.com>
Signed-off-by: xiadanni <xiadanni@huawei.com>
---
components/engine/client/request.go | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/components/engine/client/request.go b/components/engine/client/request.go
index a19d62aa52..855b84d6ac 100644
--- a/components/engine/client/request.go
+++ b/components/engine/client/request.go
@@ -10,6 +10,7 @@ import (
"net"
"net/http"
"net/url"
+ "regexp"
"os"
"strings"
@@ -156,11 +157,19 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
if err, ok := err.(net.Error); ok {
if err.Timeout() {
- return serverResp, ErrorConnectionFailed(cli.host)
+ return serverResp, fmt.Errorf("Cannot connect to the Docker daemon failed for timeout.")
}
if !err.Temporary() {
- if strings.Contains(err.Error(), "connection refused") || strings.Contains(err.Error(), "dial unix") {
- return serverResp, ErrorConnectionFailed(cli.host)
+ if strings.Contains(err.Error(), "dial unix") {
+ var err2 error
+ r, rerr := regexp.Compile("dial unix.*")
+ if rerr != nil {
+ err2 = fmt.Errorf("Cannot connect to the Docker daemon failed for dial unix.")
+ } else {
+ rbytes := r.Find([]byte(err.Error()))
+ err2 = fmt.Errorf("Cannot connect to the Docker daemon failed for %s", string(rbytes))
+ }
+ return serverResp, err2
}
}
}
--
2.17.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。