cloudfoundry-community-attic / bosh-bootstrap

From zero to a running micro BOSH in one command line
MIT License
63 stars 46 forks source link

bosh-bootstrap deploy is failed with the error "Cannot allocate memory - tar (Errno::ENOMEM)" #312

Open harikrishna1210 opened 9 years ago

harikrishna1210 commented 9 years ago

Could you please check below error and advise where we went wrong.

ERROR:

[root@ip-172-31-18-217 ~]# bosh-bootstrap deploy

Confirming: Using AWS EC2/ap-southeast-1

Confirming: Using address 172.31.0.4 Reusing security group ssh-vpc-5bc63d3e for the VPC -> no additional ports opened Reusing security group dns-server-vpc-5bc63d3e for the VPC -> no additional ports opened Reusing security group bosh-vpc-5bc63d3e for the VPC -> no additional ports opened

Confirming: Using key pair firstbosh Determining stemcell image/file to use... /root/deployments/firstbosh/bosh-stemcell-2962-aws-xen-ubuntu-trusty-go_agent.tgz bosh micro deployment firstbosh Deployment set to '/root/deployments/firstbosh/micro_bosh.yml' bosh -n micro deploy --update-if-exists /root/deployments/firstbosh/bosh-stemcell-2962-aws-xen-ubuntu-trusty-go_agent.tgz

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: 2962

Started deploy micro bosh Started deploy micro bosh > Unpacking stemcell. Done (00:00:12) Started deploy micro bosh > Uploading stemcell. Done (00:05:38) Started deploy micro bosh > Creating VM from ami-802b14d2. Done (00:00:32) Started deploy micro bosh > Waiting for the agent. Done (00:01:43) Started deploy micro bosh > Updating persistent disk Started deploy micro bosh > Create disk. Done (00:00:07) Started deploy micro bosh > Mount disk. Done (00:00:06) Done deploy micro bosh > Updating persistent disk (00:00:19) Started deploy micro bosh > Stopping agent services. Done (00:00:01) Started deploy micro bosh > Applying micro BOSH spec. Done (00:00:40) Started deploy micro bosh > Starting agent services. Done (00:00:00) Started deploy micro bosh > Waiting for the director. Done (00:00:21) Done deploy micro bosh (00:09:26)log writing failed. can't be called from trap context /usr/local/share/gems/gems/bosh-stemcell-1.2950.0/lib/bosh/stemcell/archive.rb:15:in `': Cannot allocate memory - tar (Errno::ENOMEM) from /usr/local/share/gems/gems/bosh-stemcell-1.2950.0/lib/bosh/stemcell/archive.rb:15:inmanifest' from /usr/local/share/gems/gems/bosh-stemcell-1.2950.0/lib/bosh/stemcell/archive.rb:31:in sha1' from /usr/local/share/gems/gems/bosh_cli_plugin_micro-1.2950.0/lib/bosh/deployer/instance_manager.rb:554:insave_fingerprints' from /usr/local/share/gems/gems/bosh_cli_plugin_micro-1.2950.0/lib/bosh/deployer/instance_manager.rb:158:in create' from /usr/local/share/gems/gems/bosh_cli_plugin_micro-1.2950.0/lib/bosh/deployer/instance_manager.rb:98:inblock in create_deployment' from /usr/local/share/gems/gems/bosh_cli_plugin_micro-1.2950.0/lib/bosh/deployer/instance_manager.rb:92:in with_lifecycle' from /usr/local/share/gems/gems/bosh_cli_plugin_micro-1.2950.0/lib/bosh/deployer/instance_manager.rb:98:increate_deployment' from /usr/local/share/gems/gems/bosh_cli_plugin_micro-1.2950.0/lib/bosh/cli/commands/micro.rb:179:in perform' from /usr/local/share/gems/gems/bosh_cli-1.2950.0/lib/cli/command_handler.rb:57:inrun' from /usr/local/share/gems/gems/bosh_cli-1.2950.0/lib/cli/runner.rb:56:in run' from /usr/local/share/gems/gems/bosh_cli-1.2950.0/bin/bosh:16:in<top (required)>' from /usr/local/bin/bosh:23:in load' from /usr/local/bin/bosh:23:in

' /usr/local/share/gems/gems/rake-10.4.2/lib/rake/file_utils.rb:66:in block in create_shell_runner': Command failed with status (1): [bosh -n micro deploy --update-if-exists /r...] (RuntimeError) from /usr/local/share/gems/gems/rake-10.4.2/lib/rake/file_utils.rb:57:incall' from /usr/local/share/gems/gems/rake-10.4.2/lib/rake/file_utils.rb:57:in sh' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/cli/helpers/bundle.rb:18:inblock in run' from /usr/local/share/gems/gems/bundler-1.9.5/lib/bundler.rb:247:in block in with_clean_env' from /usr/local/share/gems/gems/bundler-1.9.5/lib/bundler.rb:234:inwith_original_env' from /usr/local/share/gems/gems/bundler-1.9.5/lib/bundler.rb:240:in with_clean_env' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/cli/helpers/bundle.rb:16:inrun' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/microbosh.rb:54:in block in deploy_or_update' from /usr/share/ruby/fileutils.rb:125:inchdir' from /usr/share/ruby/fileutils.rb:125:in cd' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/microbosh.rb:52:indeploy_or_update' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/microbosh.rb:42:in block in deploy' from /usr/share/ruby/fileutils.rb:125:inchdir' from /usr/share/ruby/fileutils.rb:125:in cd' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/microbosh.rb:40:indeploy' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/cli/commands/deploy.rb:77:in perform_microbosh_deploy' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/cli/commands/deploy.rb:24:inperform' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/lib/bosh-bootstrap/thor_cli.rb:11:in deploy' from /usr/local/share/gems/gems/thor-0.19.1/lib/thor/command.rb:27:inrun' from /usr/local/share/gems/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /usr/local/share/gems/gems/thor-0.19.1/lib/thor.rb:359:indispatch' from /usr/local/share/gems/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /usr/local/share/gems/gems/bosh-bootstrap-0.17.0/bin/bosh-bootstrap:13:in<top (required)>' from /usr/local/bin/bosh-bootstrap:23:in load' from /usr/local/bin/bosh-bootstrap:23:in
' [root@ip-172-31-18-217 ~]#

Setup:

[root@ip-172-31-18-217 ~]# ruby -v ruby 2.0.0p598 (2014-11-13) [x86_64-linux] [root@ip-172-31-18-217 ~]# bosh -v BOSH 1.2950.0 [root@ip-172-31-18-217 ~]# gem list | grep bosh-bootstrap bosh-bootstrap (0.17.0) [root@ip-172-31-18-217 ~]# gem list | grep fog-aws fog-aws (0.1.1)

harikrishna1210 commented 9 years ago

Important update is micro bosh instance is launched and below commands are worked fine:

Command1:

[root@ip-172-31-18-217 firstbosh]# bosh micro agent ping "pong"

Command2:

[root@ip-172-31-18-217 deployments]# bosh micro delete You are going to delete micro BOSH deployment firstbosh'. THIS IS A VERY DESTRUCTIVE OPERATION AND IT CANNOT BE UNDONE! Are you sure? (type 'yes' to continue): yes Started delete micro bosh Started delete micro bosh > Stopping agent services. Done (00:00:04) Started delete micro bosh > Deleting persistent diskvol-4b263fa2' Started delete micro bosh > Unmount disk. Done (00:00:17) Started delete micro bosh > Detach disk. Done (00:00:15) Started delete micro bosh > Delete disk. Done (00:00:02) Done delete micro bosh > Deleting persistent disk `vol-4b263fa2' (00:00:34) Started delete micro bosh > Delete VM. Done (00:00:33) Started delete micro bosh > Delete stemcell. Done (00:00:01) Done delete micro bosh (00:01:12)log writing failed. can't be called from trap context Deleted deployment 'firstbosh', took 00:01:12 to complete [root@ip-172-31-18-217 deployments]#

Request:

Is that this below error will impact any functionally or can I consider as a known issue Error: "Cannot allocate memory - tar (Errno::ENOMEM)"

lnguyen commented 9 years ago

this is happening on every deploy? this is an odd error, i havent seen this before

harikrishna1210 commented 9 years ago

Every deploy I am getting this error. Could you please advise me this error effects any functionality.