lp:~marcoceppi/charms/precise/qemu-cloud/tests

Created by Marco Ceppi and last modified
Get this branch:
bzr branch lp:~marcoceppi/charms/precise/qemu-cloud/tests
Only Marco Ceppi can upload to this branch. If you are Marco Ceppi please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Marco Ceppi
Status:
Development

Recent revisions

18. By Marco Ceppi

Tests for charm

17. By José Antonio Rey

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

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

Branch metadata

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

Subscribers