6 Replies Latest reply on Mar 9, 2012 8:54 PM by Amit Saha

    AMI delivery plugin issue

    Amit Saha Newbie

      Hello: I am trying to upload a EC2 image bundled as AMI to my S3 bucket. All's good so far. I hit an issue which I wanted to discuss.


      I saw that, boxgrinder failed with: (f16-owncloud is my appilance name btw.)


      F, [2012-03-09T23:33:22.345574 #27423] FATAL -- : RuntimeError: An error occurred while executing command: 'euca-upload-bundle -U http://s3-ap-southeast-1.amazonaws.com -b echorands3/f16-owncloud/fedora/16/1.0-SNAPSHOT-1/i686 -m build/appliances/i686/fedora/16/f16-owncloud/1.0/s3-plugin/ami/f16-owncloud.ec2.manifest.xml -a <REDACTED> -s <REDACTED>'


      If you notice the -b switch of euca-upload-bundle, its value is 'echorands3/f16-owncloud/fedora/16/1.0-SNAPSHOT-1/i686'. My S3 bucket name is 'echorands3'. So as you can see, it appends the AMI directory name to it as well (same as the meta-data directory)  and the upload fails. (my reasoning).


      So, I go to the 'plugins/delivery/s3/s3-plugin.rb' file and modify this line in upload_image( ) :


      @exec_helper.execute("euca-upload-bundle -U #{@plugin_config['url'].nil? ? "http://#{@s3_endpoints[@plugin_config['r\

      egion']][:endpoint]}" : @plugin_config['url']} -b #{@plugin_config['bucket']}/#{ami_dir} -m #{@ami_manifest} -a #{@plugin_co\

      nfig['access_key']} -s #{@plugin_config['secret_access_key']}", :redacted => [@plugin_config['access_key'], @plugin_config['\



      as follows:

      @exec_helper.execute("euca-upload-bundle -U #{@plugin_config['url'].nil? ? "http://#{@s3_endpoints[@plugin_config['reg\

      ion']][:endpoint]}" : @plugin_config['url']} -b #{@plugin_config['bucket']} -m #{@ami_manifest} -a #{@plugin_config['access_\

      key']} -s #{@plugin_config['secret_access_key']}", :redacted => [@plugin_config['access_key'], @plugin_config['secret_access\




      And it seems to be working fine (upload is in progress).


      Is this a bug I hit? Or something is wrong at my end? Thanks for any info.