Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

ERROR: illegal image file #324

Open
rkoster opened this issue Nov 23, 2015 · 8 comments
Open

ERROR: illegal image file #324

rkoster opened this issue Nov 23, 2015 · 8 comments

Comments

@rkoster
Copy link
Contributor

rkoster commented Nov 23, 2015

ERROR: illegal image file When using bosh_cli_plugin_micro version 3143.

Output below:

Stemcell properties                                          OK

Stemcell info
-------------
Name:    bosh-aws-xen-ubuntu-trusty-go_agent
Version: 3143

  Started deploy micro bosh
  Started deploy micro bosh > Unpacking stemcell. Done (00:00:09)
  Started deploy micro bosh > Uploading stemcelllog writing failed. can't be called from trap context
create stemcell failed: Unable to copy stemcell root image: command 'sudo -n /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_aws_cpi-2.1.0/scripts/stemcell-copy.sh /tmp/d20151123-32475-1ngmlsr/sc-20151123-32475-1
c9pwj0/image /dev/xvdf 2>&1' failed with exit code 1
Script output:
ERROR: illegal image file: /tmp/d20151123-32475-1ngmlsr/sc-20151123-32475-1c9pwj0/image
:
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_aws_cpi-2.1.0/lib/cloud/aws/stemcell_creator.rb:71:in `rescue in copy_root_image'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_aws_cpi-2.1.0/lib/cloud/aws/stemcell_creator.rb:54:in `copy_root_image'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_aws_cpi-2.1.0/lib/cloud/aws/stemcell_creator.rb:19:in `create'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_aws_cpi-2.1.0/lib/cloud/aws/cloud.rb:493:in `block in create_stemcell'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_common-1.3143.0/lib/common/thread_formatter.rb:49:in `with_thread_name'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_aws_cpi-2.1.0/lib/cloud/aws/cloud.rb:473:in `create_stemcell'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_cpi-1.3143.0/lib/cloud/internal_cpi.rb:22:in `invoke_cpi_method'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_cpi-1.3143.0/lib/cloud/internal_cpi.rb:10:in `method_missing'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_cli_plugin_micro-1.3143.0/lib/bosh/deployer/instance_manager.rb:228:in `block (2 levels) in create_stemcell'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_cli_plugin_micro-1.3143.0/lib/bosh/deployer/instance_manager.rb:85:in `step'
/home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_cli_plugin_micro-1.3143.0/lib/bosh/deployer/instance_manager.rb:227:in `block in create_stemcell'
@rkoster
Copy link
Contributor Author

rkoster commented Nov 23, 2015

Was able to work around the issue by manually applying the fix from: cloudfoundry/bosh-aws-cpi-release@d99ce44 to /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_aws_cpi-2.1.0/scripts/stemcell-copy.sh

@drnic
Copy link
Contributor

drnic commented Nov 23, 2015

Is this a bosh-bootstrap bug or bosh_cli_plugin_micro bug? And is it caused by a regression in new stemcell?

On Mon, Nov 23, 2015 at 2:44 AM, Ruben Koster [email protected]
wrote:

Was able to work around the issue by manually applying the fix from: cloudfoundry/bosh-aws-cpi-release@d99ce44 to /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/bosh_aws_cpi-2.1.0/scripts/stemcell-copy.sh

Reply to this email directly or view it on GitHub:
#324 (comment)

@rkoster
Copy link
Contributor Author

rkoster commented Nov 23, 2015

It is a bosh_cli_plugin_micro bug. Also encountered it when using a different stemcell. Will check to see when it was introduced.

@rkoster
Copy link
Contributor Author

rkoster commented Nov 23, 2015

@cppforlife could the above be an bosh_cli_plugin_micro issue?

@cppforlife
Copy link

not micro cli specific. im guessing this is os specific.

error comes from here: https://github.com/cloudfoundry-incubator/bosh-aws-cpi-release/blob/master/src/bosh_aws_cpi/scripts/stemcell-copy.sh. its probably related to grep regex inconsistencies on os-es.

Sent from my iPhone

On Nov 23, 2015, at 11:19 AM, Ruben Koster [email protected] wrote:

@cppforlife could the above be an bosh_cli_plugin_micro issue?


Reply to this email directly or view it on GitHub.

@rkoster
Copy link
Contributor Author

rkoster commented Nov 23, 2015

@cppforlife The last commit in that file fixes something related the the regex. In which version of the bosh_aws_cpi gem will this fix be included?

@rkoster
Copy link
Contributor Author

rkoster commented Nov 26, 2015

@rkoster
Copy link
Contributor Author

rkoster commented Nov 26, 2015

This workaround needs to be included in bosh_bootstrap unless a new versions of the bosh_aws_cpi gem will be published. @cppforlife @drnic

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants