** Changed in: cloud-utils
       Status: In Progress => Fix Committed

** Description changed:

  The changes recently added to mount-image-callback under bug 1493188
  that were targeted at supporting 'overlay' filesystem type while still
  supporting 'overlayfs' may result in exiting with "unsupported" when a
  mount would work.
  
  The changes basically said:
-   if overlay in /proc/filesystems:
-      return GOOD
-   modprobe --quiet --use-blacklist overlay
-      if overlay in /proc/filesystems:
-         return GOOD
-   return BAD
+   if overlay in /proc/filesystems:
+      return GOOD
+   modprobe --quiet --use-blacklist overlay
+      if overlay in /proc/filesystems:
+         return GOOD
+   return BAD
  
  the path that fails now that previously succeeded is when 'modprobe'
  would not work, but 'mount -t overlay' *would*.  This occurs in build
  systems where the running kernel is of one version and code is running
  in a chroot that does not have access to the kernel modules in
  /lib/modules/.
  
  'mount -t overlay' works in this scenario because the mount abi call passes 
the filesystem type 'overlay', and the kernel then does:
-    fs/filesystems.c:       if (!fs && (request_module("fs-%.*s", len, name) 
== 0))
+    fs/filesystems.c:       if (!fs && (request_module("fs-%.*s", len, name) 
== 0))
  
  The kernel's scope is not chrooted, so the module gets loaded and
  everything is happy.
+ 
+ The new changes are to instead basically do:
+   for fstype in overlay overlayfs; do
+      mount -t $fstype <options> && return GOOD
+      if /proc/filesystems is readable and $fstype in /proc/filesystems; then
+          return FAIL
+      fi
+   done

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1630274

Title:
  mount-image-callback may not mount overlay when it could

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-utils/+bug/1630274/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to