From 01d7633e8775dcc4bb25bdf8d4e0add5060e1878 Mon Sep 17 00:00:00 2001 From: Wei Hui Date: Wed, 19 Oct 2016 15:34:48 +0800 Subject: [PATCH] Fix umount fuse control filesystem error In fuel-agent.log, mountpoint -q /tmp/target/sys/fs/fuse/connections execute failed. Fuse is a kernel mechanism, it has a fixed pseudo filesystem location (/sys/fs/fuse/connection) for user. We do not need to umount it manually, let kernel take care of that. In our case, nobody cares about fuse in kernel by /sys/fs/fuse/connection. So we don't need to mount and umount in chroot. https://www.kernel.org/doc/Documentation/filesystems/fuse.txt Change-Id: I0a9af904b2b65af1af96340c0579dedf979464fc --- fuel_agent/manager.py | 3 +-- fuel_agent/tests/test_manager.py | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fuel_agent/manager.py b/fuel_agent/manager.py index e717231d..c8f64fec 100644 --- a/fuel_agent/manager.py +++ b/fuel_agent/manager.py @@ -659,8 +659,7 @@ class Manager(object): def umount_target(self, chroot, pseudo=True): LOG.debug('Umounting target file systems: %s', chroot) if pseudo: - # umount fusectl (typically mounted at /sys/fs/fuse/connections) - for path in ('/proc', '/dev', '/sys/fs/fuse/connections', '/sys'): + for path in ('/proc', '/dev', '/sys'): fu.umount_fs(chroot + path) for fs in self.driver.partition_scheme.fs_sorted_by_depth( reverse=True): diff --git a/fuel_agent/tests/test_manager.py b/fuel_agent/tests/test_manager.py index 41d72e97..0d142a90 100644 --- a/fuel_agent/tests/test_manager.py +++ b/fuel_agent/tests/test_manager.py @@ -843,7 +843,6 @@ class TestManager(unittest2.TestCase): fake_mtab = """ proc /proc proc rw,noexec,nosuid,nodev 0 0 sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0 -none /sys/fs/fuse/connections fusectl rw 0 0 none /sys/kernel/debug debugfs rw 0 0 none /sys/kernel/security securityfs rw 0 0 udev /dev devtmpfs rw,mode=0755 0 0 @@ -893,7 +892,6 @@ none /run/shm tmpfs rw,nosuid,nodev 0 0""" self.mgr.umount_target('fake_chroot') self.assertEqual([mock.call('fake_chroot/proc'), mock.call('fake_chroot/dev'), - mock.call('fake_chroot/sys/fs/fuse/connections'), mock.call('fake_chroot/sys'), mock.call('fake_chroot/var/lib'), mock.call('fake_chroot/boot'),