Comment 9 for bug 1538135

Revision history for this message
John-Paul Robinson (jprorama) wrote :

After applying the debug build of dib, it reported the current mount pattern as /opt/dib_tmp/image.3uTEKgO2/mnt but /proc/mounts has the absolute path of the mount recorded as /mnt/opt/dib_tmp/image.3uTEKgO2/mnt/dev. This fails the pattern match check in the code:

http://git.openstack.org/cgit/openstack/diskimage-builder/tree/lib/common-functions#n286

This symlink comes from the use of the local x1.large instance that provides the 80G drive on /mnt and moving /opt the /mnt/opt via a symlink as described in comment #7 above.

The fix/workaround is to remount the 80G drive under /opt. The dib create that succeeds under the nodepool account. The reason for earlier success under ubuntu was that the dib cache/tmp dirs were specified with the full path under /mnt/ubuntu so the umount command succeeded.

The relevant part of the debug output is:

+ unmount_dir /opt/dib_tmp/image.3uTEKgO2/mnt
+ local pattern=/opt/dib_tmp/image.3uTEKgO2/mnt mnts=
+ echo 'Unmounting dirs matching pattern '\''/opt/dib_tmp/image.3uTEKgO2/mnt'\'''
Unmounting dirs matching pattern '/opt/dib_tmp/image.3uTEKgO2/mnt'
+ echo 'Current mounts:'
Current mounts:
+ cat /proc/mounts
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=4082832k,nr_inodes=1020708,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=817680k,mode=755 0 0
/dev/disk/by-uuid/ee1a8759-f2e2-4924-a2a3-505c432325bc / ext4 rw,relatime,data=ordered 0 0
none /sys/fs/cgroup tmpfs rw,relatime,size=4k,mode=755 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
none /run/user tmpfs rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755 0 0
none /sys/fs/pstore pstore rw,relatime 0 0
/dev/vdb /mnt ext3 rw,relatime,data=ordered 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,name=systemd 0 0
/dev/vdb /mnt/opt/dib_tmp/image.iYEI5csR/mnt/tmp/ccache ext3 rw,relatime,data=ordered 0 0
/dev/vdb /mnt/opt/dib_tmp/image.3uTEKgO2/mnt/tmp/ccache ext3 rw,relatime,data=ordered 0 0
/dev/vdb /mnt/opt/dib_tmp/image.3uTEKgO2/mnt/var/cache/apt/archives ext3 rw,relatime,data=ordered 0 0
none /mnt/opt/dib_tmp/image.3uTEKgO2/mnt/proc proc rw,relatime 0 0
udev /mnt/opt/dib_tmp/image.3uTEKgO2/mnt/dev devtmpfs rw,relatime,size=4082832k,nr_inodes=1020708,mode=755 0 0
devpts /mnt/opt/dib_tmp/image.3uTEKgO2/mnt/dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
none /mnt/opt/dib_tmp/image.3uTEKgO2/mnt/sys sysfs rw,relatime 0 0
+ '[' -n /opt/dib_tmp/image.3uTEKgO2/mnt ']'
+ awk '{print $2}'
+ grep '^/opt/dib_tmp/image.3uTEKgO2/mnt'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ mv /opt/dib_tmp/image.3uTEKgO2/mnt /opt/dib_tmp/image.3uTEKgO2/built