Failed to run "bosh aws create" in AWS

98 views
Skip to first unread message

王小锋

unread,
Jan 8, 2015, 7:43:34 AM1/8/15
to bosh-...@cloudfoundry.org
Hi, there

I am following this guide http://docs.cloudfoundry.org/deploying/ec2/bootstrap-aws-vpc.html to deploy cloudfoundry on AWS.

However, when I run command "bosh aws create", I met the error as follows :
I am wondering why bosh try to delete "The dhcpOptions 'dopt-90b2a8f2' ", the dhcpOptions is bound to default vpc. (please see the snapshot attached)
In this case, do I need to delete the default VPC to continue? If no, how to avoid the error? thanks.

bosh aws create output:

paas1@paas1-OptiPlex-9020:~/bosh-workspace/bootstrap$ bosh aws create
Executing migration CreateKeyPairs
allocating 1 KeyPair(s)
Executing migration CreateVpc
creating internet gateway
creating security groups: open, bosh, bat, cf, web
creating subnets: bosh1, bosh_rds1, cf_elb1, cf_rds1, services_rds1, cf1, services1, bosh_rds2, cf_elb2, cf_rds2, services_rds2
  Making subnet bosh1 10.10.0.0/24:
  Making subnet bosh_rds1 10.10.1.0/24:
  Making subnet cf_elb1 10.10.2.0/24:
  Making subnet cf_rds1 10.10.3.0/24:
  Making subnet services_rds1 10.10.8.0/21:
  Making subnet cf1 10.10.16.0/20:
  Making subnet services1 10.10.32.0/20:
  Making subnet bosh_rds2 10.10.65.0/24:
  Making subnet cf_elb2 10.10.66.0/24:
  Making subnet cf_rds2 10.10.67.0/24:
  Making subnet services_rds2 10.10.72.0/21:
    Making routing table for bosh1
    Binding default route to igw
    Making routing table for cf_elb1
    Binding default route to igw
    Making routing table for cf1
    Binding default route to cf_nat_box1
    Making routing table for services1
    Binding default route to cf_nat_box1
    Making routing table for cf_elb2
    Binding default route to igw
creating load balancers: cfrouter
adding CNAME record for *.zimicloud.wang
creating DHCP options
details in S3 receipt: aws_vpc_receipt and file: aws_vpc_receipt.yml
/home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-sdk-1.44.0/lib/aws/core/client.rb:375:in `return_or_raise': The dhcpOptions 'dopt-90b2a8f2' has dependencies and cannot be deleted. (AWS::EC2::Errors::DependencyViolation)
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-sdk-1.44.0/lib/aws/core/client.rb:476:in `client_request'
    from (eval):3:in `delete_dhcp_options'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-sdk-1.44.0/lib/aws/ec2/dhcp_options.rb:78:in `delete'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/vpc.rb:171:in `create_dhcp_options'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/migrations/20130412004642_create_vpc.rb:46:in `execute'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migration.rb:21:in `run'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migrator.rb:75:in `block in run_migrations'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migrator.rb:74:in `each'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migrator.rb:74:in `run_migrations'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migrator.rb:13:in `migrate'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh/cli/commands/aws.rb:130:in `create'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli-1.2809.0/lib/cli/command_handler.rb:57:in `run'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli-1.2809.0/lib/cli/runner.rb:56:in `run'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli-1.2809.0/lib/cli/runner.rb:16:in `run'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli-1.2809.0/bin/bosh:7:in `<top (required)>'
    from /home/paas1/.rbenv/versions/1.9.3-p194/bin/bosh:23:in `load'
    from /home/paas1/.rbenv/versions/1.9.3-p194/bin/bosh:23:in `<main>'

2015-01-08 20:42:24 snapshotvpc.png

Alex

unread,
Apr 9, 2015, 5:15:49 AM4/9/15
to bosh-...@cloudfoundry.org
Hi There, 

Did you manage to resolve your issue? I am having the exact same problem this morning!

Alex Blease

unread,
Apr 9, 2015, 6:46:06 AM4/9/15
to bosh-...@cloudfoundry.org
So unfortunately I did not locate the root cause of this problem. 

To get around this. We tore down all the infrastructure left behind from running the failing 'bash aws create' command. Apart from the bosh VPC and, BOSH and SHH security groups. 

I then I set the bosh VPC 'DHCP Options set' to default, and created a new gem set on my local machine, and reinstalled the bosh_cli, bosh_cli_plugin_micro and bosh_cli_plugin_aws gems. 

If anyone knows a better to get around this problem do let us know :)

Dr Nic Williams

unread,
Apr 9, 2015, 11:52:03 AM4/9/15
to bosh-...@cloudfoundry.org, bosh-...@cloudfoundry.org
Perhaps for future attempts at bootstrapping CF on AWS (with a smaller 6 vm footprint for CF) try https://github.com/cloudfoundry-community/terraform-aws-cf-install



To unsubscribe from this group and stop receiving emails from it, send an email to bosh-users+...@cloudfoundry.org.

Sylvain Gibier

unread,
Apr 16, 2015, 6:31:44 AM4/16/15
to bosh-...@cloudfoundry.org
I had the same issue in the past - it's due to AWS defaulting all new AWS account to be VPC type, as opposed to EC2 one. The bosh_cli_plugin_aws gem was written with the EC2 approach. I went through modifying the bosh_cli_plugin_aws gem to not deleting the default dhcp options, and adding additional availability zone too, well nowadays I have a AWS formation to setup the VPC itself.

S.  
Reply all
Reply to author
Forward
0 new messages