1 Star 0 Fork 58

gnaygnil/docker

forked from src-openEuler/docker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0058-cleanup-cleanup-incompleted-device-while-dock.patch 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
gnaygnil 提交于 2020-02-13 15:36 . docker: Fixed build error and URL
From ee64a0b5fd645d1765b0c50cbaab76c17bab9b28 Mon Sep 17 00:00:00 2001
From: zhangyu235 <zhangyu235@huawei.com>
Date: Fri, 18 Jan 2019 14:46:21 +0800
Subject: [PATCH 058/111] cleanup: cleanup incompleted device while
docker startup
cleanup incompleted device while docker startup
Change-Id: I9a9a96c655b61ac132fa7ed101dc9953c1bb613d
Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com>
Signed-off-by: zhangyu235 <zhangyu235@huawei.com>
---
components/engine/daemon/graphdriver/devmapper/deviceset.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/components/engine/daemon/graphdriver/devmapper/deviceset.go b/components/engine/daemon/graphdriver/devmapper/deviceset.go
index b3e142e2ba..f4dc589c6e 100644
--- a/components/engine/daemon/graphdriver/devmapper/deviceset.go
+++ b/components/engine/daemon/graphdriver/devmapper/deviceset.go
@@ -1753,6 +1753,12 @@ func (devices *DeviceSet) initDevmapper(doInit bool) (retErr error) {
}
logrus.Debugf("devmapper: remove broken device: %s", name)
}
+ if _, err := os.Stat(filepath.Join("/dev/mapper/", name)); err != nil {
+ if err := devicemapper.RemoveDevice(name); err != nil {
+ logrus.Warnf("devmapper: remove incompelete device(%s): %v", name, err)
+ }
+ logrus.Debugf("devmapper: remove incompelete device: %s", name)
+ }
}
// Check for the existence of the thin-pool device
--
2.17.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gnaygnil/docker.git
git@gitee.com:gnaygnil/docker.git
gnaygnil
docker
docker
master

搜索帮助