lp:~dannf/charms/precise/qemu-cloud/trunk

Created by dann frazier and last modified
Get this branch:
bzr branch lp:~dannf/charms/precise/qemu-cloud/trunk
Only dann frazier can upload to this branch. If you are dann frazier please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
dann frazier
Status:
Development

Recent revisions

16. By dann frazier

Bump revision to 2

15. By dann frazier

Revert transition to 'service' command

Service doesn't seem to work with plain upstart jobs.

14. By dann frazier

Make sure qemu is stopped before reinstalling/starting

Redeploys currently fail because we're trying to start an already-running
service. Maybe the stop hook doesn't get called on destroy-service? At any
rate, let's just be cautious and make sure the service is stopped before
overwriting the disk image or starting it.

13. By dann frazier

Use service instead of calling start/stop commands

This is a best practice; but I forget why :)

12. By dann frazier

Avoid read-only issues by using nbd4 instead of nbd0

Once qemu-nbd has attached a file to a /dev/nbdX device read-only, the read-only
setting persists for any other block devices that are attached to it later.
Unfortunately there is no "read-write" flag for qemu-nbd - so that /dev/nbdX
device becomes unusable for anything but read-only devices from then on.
(I'm not sure this is a qemu-nbd bug; it might actually be rooted in the nbd
driver).

Since the upstart job uses /dev/nbd0 to extract boot files out of the disk
image, and it does this read-only, the install hook will fail when called
a second time:

  mount: block device /dev/nbd0p1 is write-protected, mounting read-only
  cp: cannot create regular file `/mnt/tmp/tmp.mnt/usr/bin/qemu-arm-static'
  Read-only file system

This breaks redeployments. To avoid this, let's use /dev/nbd4. I picked because
nbd0 is used by the upstart job, and nbd[1-3] are used by the image build.

11. By dann frazier

Clear out any previous deployments

If a user deploys qemu-cloud, destroys the service, then redeploys to the same
system, this will fail with the error:
 bzr: ERROR: Already a branch: "make-highbank-ami"

We could fix this by checking to see if the directory already exists, running
make clean, then updating the bzr tree. That would prevent us from pulling
a whole new tree. But, it'll probably be more reliable in the long run to avoid
special cases, and just redoing everything we do in a virgin install.

Thanks to Robert Ayres for reporting this issue.

10. By dann frazier

Note that upgrades are not currently supported

9. By dann frazier

Make start/stop scripts set -e
We only run 1 command now, but might do more later

8. By dann frazier

drop set -x; done debugging for now

7. By dann frazier

factory out the temporary directory name into a variable

Branch metadata

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

Subscribers