Created by Diogo Matsubara and last modified
Get this branch:
bzr branch lp:~maas-maintainers/maas/backdoor-image
Members of MAAS Maintainers can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

MAAS Maintainers

Recent revisions

25. By Scott Moser

fix output of MOUNTPOINT

24. By Scott Moser

add simple 'run a shell' path

23. By Scott Moser

fix issue when day of year is less than 100

'date +%j' might return '008' (today it did).
you can force base 10 by '10#' before the number.

22. By Scott Moser

be safer on deletion of filesystems

21. By Scott Moser

mount-callback-umount: improvements in command invoking

instead of always just appending the mountpoint to the command,
if the string MOUNTPOINT appears in an argument, replace it with
the mountpoint.

Also, export the variable MOUNTPOINT for simplicity.

Also, other fixes:
  * stop successfull path from invoking qemu-disconnect twice
  * capture qemu-disconnect output showing only on error.
  * some better debug message on mount of nbd device
  * mention that --read-only is incompatible with system-resolvconf

20. By Scott Moser

wait for nbd pid file to appear in /sys before continuing qemu-nbd connect

By waiting for the pid file to appear, I'm seeing that this is extremely
less likely to hit a race where the 'mount' fails because the system isn't
ready yet.

Doing a loop like this:

for((i=0;i<50;i++)); do
  sudo ./mount-callback-umount \
    -vv --system-mounts --system-resolvconf disk.img -- \
      sh -c 'echo mounted at $1' -- || { echo "FAILED DUDE"; break; };

that will fail in 1 or 2 iterations on 12.04 without the check.
With this wait in place, I can run 2 of those loops (on separate images)
in parallel to completion.

the disk.img in question was a quantal cloud image (qcow2 compressed)

19. By Scott Moser

fix typo resulting in failure to use loop at all

18. By Scott Moser

add '--system-resolvconf' for copying resolvconf into target

17. By Scott Moser

change /bin/sh to /bin/bash

/bin/bash just has better 'trap' handling.
with sh, you can fairly easiliy end up with out the cleanup running
as a result of 'ctrl-c' or something.

16. By Scott Moser

mount-callback-umount: fix logic error resulting in UMOUNT not being set

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.