If you execute that with 4.4-1ubuntu1 it fails due to the loop back mount still being mounted(mount | grep maas). If you downgrade to 4.3-15ubuntu1 or use the patch from lp:~ltrager/maas-images/workaround_lp1641832 umount is called and the script executes successfully.
I'm having trouble coming up with a simpler test case myself. Here is how you can reproduce with lp:maas-images on Zesty with bash-4.4-1ubuntu1
mkdir maas-images ubuntu/ maas-images/ trunk/bin: $PATH cloud-images. ubuntu. com/daily/ server/ zesty/20161111/ zesty-server- cloudimg- amd64.squashfs cloudimg- amd64.squashfs out.d
cd maas-images
bzr init
bzr branch lp:maas-images
cd
export PATH=/home/
wget http://
meph2-build --image-format squashfs-image -vv --enable-di amd64 zesty 20161111 zesty-server-
If you execute that with 4.4-1ubuntu1 it fails due to the loop back mount still being mounted(mount | grep maas). If you downgrade to 4.3-15ubuntu1 or use the patch from lp:~ltrager/maas-images/workaround_lp1641832 umount is called and the script executes successfully.