1 Star 0 Fork 58

gnaygnil/docker

forked from src-openEuler/docker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0038-devmapper-devicemapper-ignore-error-when-remo.patch 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
gnaygnil 提交于 2020-02-13 15:36 . docker: Fixed build error and URL
From 42da0fd120db6f5b34c523212b54b88e8837efa6 Mon Sep 17 00:00:00 2001
From: jingrui <jingrui@huawei.com>
Date: Thu, 3 Jan 2019 14:09:59 +0800
Subject: [PATCH 038/111] devmapper: devicemapper: ignore error when
remove a device which does not exist
reason: cherry-pick commits to docker-18.09
cherry-pick from
e91268fda7 | * devicemapper: ignore error when remove a device which
does not exist
Conflicts:
daemon/graphdriver/devmapper/deviceset.go
pkg/devicemapper/devmapper.go
Change-Id: Ia1d33d78e4d7000c6e4bd54ec203800a0234cae5
Signed-off-by: Liu Hua <sdu.liu@huawei.com>
Signed-off-by: jingrui <jingrui@huawei.com>
---
.../engine/daemon/graphdriver/devmapper/deviceset.go | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/components/engine/daemon/graphdriver/devmapper/deviceset.go b/components/engine/daemon/graphdriver/devmapper/deviceset.go
index 0675b2eacd..be48d92e8d 100644
--- a/components/engine/daemon/graphdriver/devmapper/deviceset.go
+++ b/components/engine/daemon/graphdriver/devmapper/deviceset.go
@@ -2137,6 +2137,13 @@ func (devices *DeviceSet) deactivateDeviceMode(info *devInfo, deferredRemove boo
if deferredRemove {
err = devicemapper.RemoveDeviceDeferred(info.Name())
+ if err != nil {
+ if err == devicemapper.ErrEnxio {
+ logrus.Warnf("devmapper: device %s has gone", info.Name())
+ return nil
+ }
+ return err
+ }
} else {
err = devices.removeDevice(info.Name())
}
--
2.17.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gnaygnil/docker.git
git@gitee.com:gnaygnil/docker.git
gnaygnil
docker
docker
master

搜索帮助