From e40332c5b05b34adc78f64c095c97ee74f8d5d75 Mon Sep 17 00:00:00 2001 From: JiWei Date: Mon, 30 Jul 2018 16:34:42 +0800 Subject: [PATCH] When using multipath, detach volume failure Steps to reproduce: 1. use multipath service 2. Create a container with a volume, then delete it 3. Use the same volume to create a new container, it will fail Closes-Bug: #1784334 Change-Id: I97551b72f9532b86658e997052d9937e658dc415 --- zun/common/mount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zun/common/mount.py b/zun/common/mount.py index 11eaa6c18..e168765e9 100644 --- a/zun/common/mount.py +++ b/zun/common/mount.py @@ -132,7 +132,7 @@ def check_already_mounted(devpath, mountpoint): """ mounts = Mounter().read_mounts() for m in mounts: - if devpath == m.device and mountpoint == m.mountpoint: + if mountpoint == m.mountpoint: return True return False