lp:charms/qemu-cloud

Created by Robert Ayres on 2012-11-16 and last modified on 2015-01-08
Get this branch:
bzr branch lp:charms/qemu-cloud
Members of charmers can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
charmers
Status:
Mature

Recent revisions

18. By José Antonio Rey on 2015-01-08

Marco Ceppi 2014-11-06 Tests for charm

17. By José Antonio Rey on 2014-09-10

Charles Butler 2014-09-09 Adds icon
Charles Butler 2014-09-09 Adds fixes to pass proof

16. By dann frazier on 2012-11-15

Bump revision to 2

15. By dann frazier on 2012-11-15

Revert transition to 'service' command

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

14. By dann frazier on 2012-11-14

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 on 2012-11-14

Use service instead of calling start/stop commands

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

12. By dann frazier on 2012-11-14

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 on 2012-11-14

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 on 2012-10-29

Note that upgrades are not currently supported

9. By dann frazier on 2012-10-29

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

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