From 7e610b5dc6263ba85a883b60ccb7ff6aaf8c6ebe Mon Sep 17 00:00:00 2001 From: William Temple Date: Wed, 29 Jul 2015 12:23:35 -0400 Subject: [PATCH] Bugfix atomic mount command not detecting correct docker thin-pool prefix. Signed-off-by: William Temple --- Atomic/mount.py | 2 +- tests/integration/test_info.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Atomic/mount.py b/Atomic/mount.py index 68a02772..10804073 100644 --- a/Atomic/mount.py +++ b/Atomic/mount.py @@ -418,7 +418,7 @@ def _unmount_devicemapper(self): dev = Mount.get_dev_at_mountpoint(self.mountpoint) dev_name = dev.replace('/dev/mapper/', '') - if not dev_name.startswith('docker-'): + if not dev_name.startswith(pool.rsplit('-', 1)[0]): raise MountError('Device mounted at {} is not a docker container.' ''.format(self.mountpoint)) diff --git a/tests/integration/test_info.sh b/tests/integration/test_info.sh index 0e10279b..4b01b39c 100755 --- a/tests/integration/test_info.sh +++ b/tests/integration/test_info.sh @@ -12,8 +12,8 @@ validTest1 () { } TEST_1=`${ATOMIC} info atomic-test-1` -TEST_RHEL_REMOTE=`${ATOMIC} info --remote rhel7:7.1-9` -TEST_RHEL=`${ATOMIC} info rhel7:7.1-9` +TEST_CENTOS_REMOTE=`${ATOMIC} info --remote centos:latest` +TEST_CENTOS=`${ATOMIC} info centos:latest` set +e @@ -23,7 +23,7 @@ set -e echo $TEST_1 -if [[ "${TEST_RHEL_REMOTE}" != "${TEST_RHEL}" ]]; then +if [[ "${TEST_CENTOS_REMOTE}" != "${TEST_CENTOS}" ]]; then exit 1 fi