Merge lp:~chad.smith/charms/precise/storage/storage-ec2-support into lp:~dpb/charms/precise/storage/trunk
Proposed by
Chad Smith
Status: | Merged |
---|---|
Merged at revision: | 32 |
Proposed branch: | lp:~chad.smith/charms/precise/storage/storage-ec2-support |
Merge into: | lp:~dpb/charms/precise/storage/trunk |
Diff against target: |
223 lines (+151/-7) 2 files modified
hooks/common_util.py (+32/-4) hooks/test_common_util.py (+119/-3) |
To merge this branch: | bzr merge lp:~chad.smith/charms/precise/storage/storage-ec2-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Britton | Approve | ||
Fernando Correa Neto (community) | Approve | ||
Review via email: mp+206834@code.launchpad.net |
Description of the change
Allow get_instance_id to work on both Openstack and EC2 instances.
To do this we first attempt a curl of the OS_METADATA_URL to pull the instance uuid which is used by nova commands for volume attachment.
If curl of OS_METADATA_URL fails to return valid JSON, we then try to curl EC2_METADATA_URL to grab the EC2 instance id.
This branch adds missing unit tests for get_instance_id as well.
To post a comment you must log in.
Code looks good but we have an issue because in order to mount an existing volume, the BSB service must be running on the same id.
That means that we must know upfront in which EC2 AZ the volume is, and if possible, deploy the BSB service in the same AZ so it can be successfully be attached.