Permalink
Browse files

Add default config values after rebase

Update changelog and spec file

Update tests after rebase to master

Add extra logging
  • Loading branch information...
1 parent edae02c commit 0b9799d93cc2b950bfea7d24608f09e6301d130f @msavy msavy committed Jun 22, 2011
View
@@ -9,6 +9,7 @@ v0.9.3
* [BGBUILD-225] Move PAE configuration parameter to operating system configuration
* [BGBUILD-224] EBS Plugin Support for CentOS v5.5 and fix for non-integer EBS disk sizes
* [BGBUILD-231] Cannot register Fedora 15 EC2 AMI with S3 delivery plugin in eu-west-1 availability zone
+* [BGBUILD-193] EBS delivery plugin timing/concurrency issues
v0.9.2
@@ -55,6 +55,9 @@ def validate
set_default_config_value('availability_zone', @current_avaibility_zone)
set_default_config_value('delete_on_termination', true)
+ set_default_config_value('overwrite', false)
+ set_default_config_value('snapshot', false)
+ set_default_config_value('preserve_snapshots', false)
validate_plugin_config(['access_key', 'secret_access_key', 'account_number'], 'http://boxgrinder.org/tutorials/boxgrinder-build-plugins/#EBS_Delivery_Plugin')
raise PluginValidationError, "You can only convert to EBS type AMI appliances converted to EC2 format. Use '-p ec2' switch. For more info about EC2 plugin see http://boxgrinder.org/tutorials/boxgrinder-build-plugins/#EC2_Platform_Plugin." unless @previous_plugin_info[:name] == :ec2
@@ -78,7 +81,7 @@ def execute
ami_info = ami_info(ebs_appliance_name)
- @log.debug ami_info
+ @log.debug "AMI info #{ami_info}"
if ami_info and @plugin_config['overwrite']
@log.info "Overwrite is enabled. Stomping existing assets"
@@ -203,7 +206,8 @@ def get_volume_info(volume_id)
@ec2.describe_volumes(:volume_id => volume_id).volumeSet.item.each do |volume|
return volume if volume.volumeId == volume_id
end
- rescue AWS::Error #AWS::InvalidVolumeIDNotFound should be returned when no volume found, but is not always doing so at present.
+ rescue AWS::Error, AWS::InvalidVolumeIDNotFound => e# only InvalidVolumeIDNotFound should be returned when no volume found, but is not always doing so at present.
+ @log.trace "Error getting volume info: #{e}"
return nil
end
nil
@@ -249,6 +253,7 @@ def stomp_ebs(ami_info)
volume_id = snapshot_info.volumeId
volume_info = get_volume_info(volume_id)
+ @log.trace "volume_info for #{volume_id} : #{volume_info}"
@log.info "Finding any existing image with the block store attached"
if instances = get_instances(ami_info.imageId)
@@ -158,6 +158,7 @@ popd
- [BGBUILD-225] Move PAE configuration parameter to operating system configuration
- [BGBUILD-224] EBS Plugin Support for CentOS v5.5 and fix for non-integer EBS disk sizes
- [BGBUILD-231] Cannot register Fedora 15 EC2 AMI with S3 delivery plugin in eu-west-1 availability zone
+- [BGBUILD-193] EBS delivery plugin timing/concurrency issues
* Thu May 05 2011 Marek Goldmann <mgoldman@redhat.com> - 0.9.2-1
- Upstream release: 0.9.2
@@ -105,7 +105,7 @@ module BoxGrinder
end
it "should return valid ami_key with snapshot and overwrite enabled" do
- @plugin_config.merge!('snapshot' => true, 'overwrite' => true)
+ @config.plugins['s3'].merge!('snapshot' => true, 'overwrite' => true)
bucket = mock('Bucket')
bucket.should_receive(:keys).twice
@@ -124,7 +124,7 @@ module BoxGrinder
end
it "should generate valid ami_key with snapshot when bucket doesn't exist" do
- @plugin_config.merge!('snapshot' => true)
+ @config.plugins['s3'].merge!('snapshot' => true)
@plugin.should_receive(:bucket).with(false).and_raise('ABC')
@plugin.ami_key("name", "/").should == "name/fedora/14/1.0-SNAPSHOT-1/x86_64"
end

0 comments on commit 0b9799d

Please sign in to comment.