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

create stemcell failed: Timed out reading instance metadata, please make sure CPI is running on EC2 instance #329

Open
sranasinghe opened this issue Feb 29, 2016 · 5 comments

Comments

@sranasinghe
Copy link

do you or anyone happen to know whats going on here .. I m running my bosh commands from my vagrant box running on my computer ... any suggestions are greatly appreciated as i trying to figure out what did i do wrong for few days now .... Thank you ... also please let me know if you need any other info

Verified the AWS credential (shared secret and the private keys) are good

vagrant@vagrant-ubuntu-trusty:~/micro-deployment$ bosh micro deploy bosh-stemcell-3197-aws-xen-ubuntu-trusty-go_agent.tgz

No bosh-deployments.yml file found in current directory.

Conventionally, bosh-deployments.yml should be saved in /home/vagrant.
Is /home/vagrant/micro-deployment a directory where you can save state? (type 'yes' to continue): yes
Deploying new micro BOSH instance manifest.yml' tohttps://52.25.49.76:25555' (type 'yes' to continue): yes

Verifying stemcell...
File exists and readable OK
Verifying tarball...
Read tarball OK
Manifest exists OK
Stemcell image file OK
Stemcell properties OK

Stemcell info

Name: bosh-aws-xen-ubuntu-trusty-go_agent
Version: 3197

Started deploy micro bosh
Started deploy micro bosh > Unpacking stemcell. Done (00:00:05)
Started deploy micro bosh > Uploading stemcelllog writing failed. can't be called from trap context
create stemcell failed: Timed out reading instance metadata, please make sure CPI is running on EC2 instance:
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/helpers.rb:32:in cloud_error' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:97:inrescue in current_vm_id'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:78:in current_vm_id' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:465:inblock in create_stemcell'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_common-1.3202.0/lib/common/thread_formatter.rb:49:in with_thread_name' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:453:increate_stemcell'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cpi-1.3202.0/lib/cloud/internal_cpi.rb:22:in invoke_cpi_method' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cpi-1.3202.0/lib/cloud/internal_cpi.rb:10:inmethod_missing'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/deployer/instance_manager.rb:228:in block (2 levels) in create_stemcell' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/deployer/instance_manager.rb:85:instep'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/deployer/instance_manager.rb:227:in block in create_stemcell' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/deployer/instance_manager.rb:213:in create_stemcell' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/deployer/instance_manager.rb:118:increate'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/deployer/instance_manager.rb:98:in block in create_deployment' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/deployer/instance_manager.rb:92:inwith_lifecycle'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/deployer/instance_manager.rb:98:in create_deployment' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli_plugin_micro-1.3202.0/lib/bosh/cli/commands/micro.rb:179:inperform'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli-1.3202.0/lib/cli/command_handler.rb:57:in run' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli-1.3202.0/lib/cli/runner.rb:59:inrun'
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/bosh_cli-1.3202.0/bin/bosh:19:in <top (required)>' /home/vagrant/.rvm/gems/ruby-2.2.1/bin/bosh:23:inload'
/home/vagrant/.rvm/gems/ruby-2.2.1/bin/bosh:23:in <main>' /home/vagrant/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:ineval'
/home/vagrant/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `

'
vagrant@vagrant-ubuntu-trusty:~/micro-deployment$

@sranasinghe
Copy link
Author

Here is my manifest yaml looks

name: microbosh

network:
type: manual
vip: 52.25.49.76
ip: 10.0.0.6
dns: [10.0.0.2]
cloud_properties:
subnet: subnet-ef7c968b

resources:
persistent_disk: 20000
cloud_properties:
instance_type: c3.xlarge
availability_zone: us-west-2a

cloud:
plugin: aws
properties:
aws:
access_key_id: ************************
secret_access_key: ***********************
region: us-west-2
default_key_name: bosh
default_security_groups: ["bosh"]
ec2_private_key: ./bosh.pem

apply_spec:
agent:
blobstore: {address: 10.0.0.6}
nats: {address: 10.0.0.6}
properties:
registry: {address: 10.0.0.6}

@sranasinghe
Copy link
Author

and the bosh gems

vagrant@vagrant-ubuntu-trusty:~/micro-deployment$ gem list bosh

*** LOCAL GEMS ***

bosh-core (1.3202.0)
bosh-director-core (1.3202.0)
bosh-registry (1.3202.0)
bosh-stemcell (1.3202.0)
bosh-template (1.3202.0)
bosh_aws_cpi (2.1.1)
bosh_cli (1.3202.0)
bosh_cli_plugin_micro (1.3202.0)
bosh_common (1.3202.0)
bosh_cpi (1.3202.0)
bosh_openstack_cpi (2.1.1)
bosh_vcloud_cpi (0.12.1)
bosh_vsphere_cpi (2.1.1)

@duncwinn
Copy link

I have the same issue using the Bosh bootstrap plugin-

Started deploy micro bosh > Uploading stemcelllog writing failed. can't be called from trap context
create stemcell failed: Timed out reading instance metadata, please make sure CPI is running on EC2 instance:
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/helpers.rb:32:in cloud_error' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:97:inrescue in current_vm_id'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:78:in current_vm_id' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:465:inblock in create_stemcell'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_common-1.3215.0/lib/common/thread_formatter.rb:49:in with_thread_name' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:453:increate_stemcell'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cpi-1.3215.0/lib/cloud/internal_cpi.rb:22:in invoke_cpi_method' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cpi-1.3215.0/lib/cloud/internal_cpi.rb:10:inmethod_missing'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:228:in block (2 levels) in create_stemcell' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:85:instep'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:227:in block in create_stemcell' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:213:in create_stemcell' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:118:increate'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:98:in block in create_deployment' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:92:inwith_lifecycle'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:98:in create_deployment' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/cli/commands/micro.rb:179:inperform'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/lib/cli/command_handler.rb:57:in run' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/lib/cli/runner.rb:59:inrun'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/bin/bosh:19:in <top (required)>' /Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh:23:inload'
/Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh:23:in <main>' /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:66:inblock in create_shell_runner': Command failed with status (1): bundle exec bosh -n micro deploy --update-...
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:57:in call' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:57:insh'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/helpers/bundle.rb:11:in block in bundle' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:219:inblock in with_clean_env'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:199:in with_original_env' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:205:inwith_clean_env'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/helpers/bundle.rb:9:in bundle' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:69:inblock in deploy_or_update'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in chdir' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:incd'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:67:in deploy_or_update' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:43:inblock in deploy'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in chdir' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:incd'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:40:in deploy' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/commands/deploy.rb:77:inperform_microbosh_deploy'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/commands/deploy.rb:24:in perform' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/thor_cli.rb:11:indeploy'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:instart'
from /Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/bin/bosh-bootstrap:13:in <top (required)>' from /Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh-bootstrap:23:inload'
from /Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh-bootstrap:23:in `

'

@sranasinghe
Copy link
Author

Hey Duncan

Sorry for the delayed response as I was busy with work

reason for this was due to the permissions for the user which this is
trying to create the microbosh

Following permissions required

{

"Version": "2012-10-17",

"Statement": [

{

  "Action": [

    "ec2:AssociateAddress",

    "ec2:AttachVolume",

    "ec2:CreateVolume",

    "ec2:DeleteSnapshot",

    "ec2:DeleteVolume",

    "ec2:DescribeAddresses",

    "ec2:DescribeImages",

    "ec2:DescribeInstances",

    "ec2:DescribeRegions",

    "ec2:DescribeSecurityGroups",

    "ec2:DescribeSnapshots",

    "ec2:DescribeSubnets",

    "ec2:DescribeVolumes",

    "ec2:DetachVolume",

    "ec2:CreateSnapshot",

    "ec2:CreateTags",

    "ec2:RunInstances",

    "ec2:TerminateInstances"

  ],

  "Effect": "Allow",

  "Resource": "*"

},

{

  "Effect": "Allow",

  "Action": [ "elasticloadbalancing:*" ],

  "Resource": [ "*" ]

}

]

}

Also i figured this comes back even it has the required permission with the
to specific stemcell ( i never wanted to dig them through due to the dead
line) which get time out when uploading . so use the light version of the
the stemcell as this stemcell will only need for the micro bosh so that you
will not going to have this blocker

Hope it makes sense what I did , Let me know if you need anything else

Regards

Sanjaya

On Tue, Mar 29, 2016 at 6:54 PM, Duncan Winn [email protected]
wrote:

I have the same issue using the Bosh bootstrap plugin-

Started deploy micro bosh > Uploading stemcelllog writing failed. can't be
called from trap context
create stemcell failed: Timed out reading instance metadata, please make
sure CPI is running on EC2 instance:
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/helpers.rb:32:in
cloud_error'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:97:inrescue
in current_vm_id'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:78:in
current_vm_id'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:465:inblock
in create_stemcell'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_common-1.3215.0/lib/common/thread_formatter.rb:49:in
with_thread_name'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:453:in
create_stemcell'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cpi-1.3215.0/lib/cloud/internal_cpi.rb:22:in
invoke_cpi_method'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cpi-1.3215.0/lib/cloud/internal_cpi.rb:10:in
method_missing'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:228:in
block (2 levels) in create_stemcell'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:85:in
step'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:227:in
block in create_stemcell'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tmpdir.rb:88:in
mktmpdir'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:213:in
create_stemcell'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:118:in
create'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:98:in
block in create_deployment'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:92:in
with_lifecycle'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:98:in
create_deployment'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/cli/commands/micro.rb:179:in
perform'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/lib/cli/command_handler.rb:57:in
run'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/lib/cli/runner.rb:59:in
run'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/bin/bosh:19:in
<top (required)>'
/Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh:23:inload'
/Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh:23:in

'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:66:inblock
in create_shell_runner': Command failed with status (1): bundle exec bosh
-n micro deploy --update-... http://RuntimeError
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:57:in
call'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:57:in
sh'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/helpers/bundle.rb:11:in
block in bundle'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:219:inblock
in with_clean_env'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:199:in
with_original_env'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:205:in
with_clean_env'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/helpers/bundle.rb:9:in
bundle'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:69:inblock
in deploy_or_update'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in
chdir'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in
cd'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:67:in
deploy_or_update'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:43:inblock
in deploy'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in
chdir'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in
cd'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:40:in
deploy'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/commands/deploy.rb:77:in
perform_microbosh_deploy'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/commands/deploy.rb:24:in
perform'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/thor_cli.rb:11:in
deploy'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in
run'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in
dispatch'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
start'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/bin/bosh-bootstrap:13:in
<top (required)>'
from /Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh-bootstrap:23:inload'
from /Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh-bootstrap:23:in `
'


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#329 (comment)

@sranasinghe
Copy link
Author

also make sure that your user doesnt required a MFA to login

On Wed, Mar 30, 2016 at 2:45 PM, Sanjaya Ranasinghe [email protected]
wrote:

Hey Duncan

Sorry for the delayed response as I was busy with work

reason for this was due to the permissions for the user which this is
trying to create the microbosh

Following permissions required

{

"Version": "2012-10-17",

"Statement": [

{

  "Action": [

    "ec2:AssociateAddress",

    "ec2:AttachVolume",

    "ec2:CreateVolume",

    "ec2:DeleteSnapshot",

    "ec2:DeleteVolume",

    "ec2:DescribeAddresses",

    "ec2:DescribeImages",

    "ec2:DescribeInstances",

    "ec2:DescribeRegions",

    "ec2:DescribeSecurityGroups",

    "ec2:DescribeSnapshots",

    "ec2:DescribeSubnets",

    "ec2:DescribeVolumes",

    "ec2:DetachVolume",

    "ec2:CreateSnapshot",

    "ec2:CreateTags",

    "ec2:RunInstances",

    "ec2:TerminateInstances"

  ],

  "Effect": "Allow",

  "Resource": "*"

},

{

  "Effect": "Allow",

  "Action": [ "elasticloadbalancing:*" ],

  "Resource": [ "*" ]

}

]

}

Also i figured this comes back even it has the required permission with
the to specific stemcell ( i never wanted to dig them through due to the
dead line) which get time out when uploading . so use the light version
of the the stemcell as this stemcell will only need for the micro bosh so
that you will not going to have this blocker

Hope it makes sense what I did , Let me know if you need anything else

Regards

Sanjaya

On Tue, Mar 29, 2016 at 6:54 PM, Duncan Winn [email protected]
wrote:

I have the same issue using the Bosh bootstrap plugin-

Started deploy micro bosh > Uploading stemcelllog writing failed. can't
be called from trap context
create stemcell failed: Timed out reading instance metadata, please make
sure CPI is running on EC2 instance:
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/helpers.rb:32:in
cloud_error'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:97:inrescue
in current_vm_id'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:78:in
current_vm_id'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:465:inblock
in create_stemcell'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_common-1.3215.0/lib/common/thread_formatter.rb:49:in
with_thread_name'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_aws_cpi-2.1.1/lib/cloud/aws/cloud.rb:453:in
create_stemcell'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cpi-1.3215.0/lib/cloud/internal_cpi.rb:22:in
invoke_cpi_method'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cpi-1.3215.0/lib/cloud/internal_cpi.rb:10:in
method_missing'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:228:in
block (2 levels) in create_stemcell'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:85:in
step'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:227:in
block in create_stemcell'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tmpdir.rb:88:in
mktmpdir'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:213:in
create_stemcell'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:118:in
create'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:98:in
block in create_deployment'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:92:in
with_lifecycle'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/deployer/instance_manager.rb:98:in
create_deployment'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli_plugin_micro-1.3215.0/lib/bosh/cli/commands/micro.rb:179:in
perform'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/lib/cli/command_handler.rb:57:in
run'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/lib/cli/runner.rb:59:in
run'
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh_cli-1.3215.0/bin/bosh:19:in
<top (required)>'
/Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh:23:inload'
/Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh:23:in

'

/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:66:inblock
in create_shell_runner': Command failed with status (1): bundle exec
bosh -n micro deploy --update-... http://RuntimeError
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:57:in
call'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/file_utils.rb:57:in
sh'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/helpers/bundle.rb:11:in
block in bundle'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:219:inblock
in with_clean_env'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:199:in
with_original_env'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:205:in
with_clean_env'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/helpers/bundle.rb:9:in
bundle'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:69:inblock
in deploy_or_update'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in
chdir'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in
cd'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:67:in
deploy_or_update'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:43:inblock
in deploy'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in
chdir'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:127:in
cd'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/microbosh.rb:40:in
deploy'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/commands/deploy.rb:77:in
perform_microbosh_deploy'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/cli/commands/deploy.rb:24:in
perform'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/lib/bosh-bootstrap/thor_cli.rb:11:in
deploy'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in
run'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in
dispatch'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
start'
from
/Users/duncwinn/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bosh-bootstrap-0.14.5/bin/bosh-bootstrap:13:in
<top (required)>'
from /Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh-bootstrap:23:inload'
from /Users/duncwinn/.rbenv/versions/2.2.2/bin/bosh-bootstrap:23:in `
'


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#329 (comment)

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

2 participants