Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Openstack API bad request while installing Bosh for Cloud Foundry

I am trying to install Cloud Foundry for which I need Micro bosh setup. I am using "bosh-bootstrap deploy" for the same.

But I am getting the following error.

I, [2014-06-04T21:12:38.954336 #28348] [0xd47330]  INFO -- : Loading existing deployment data from: /home/abhay/.microbosh/deployments/bosh-deployments.yml
I, [2014-06-04T21:12:39.028849 #28348] [0xd47330]  INFO -- : discovering client services ip
I, [2014-06-04T21:12:39.028971 #28348] [0xd47330]  INFO -- : ip address not discovered - using default of 192.168.101.1
I, [2014-06-04T21:12:40.389579 #28353] [0x1047328]  INFO -- : Loading existing deployment data from: /home/abhay/.microbosh/deployments/bosh-deployments.yml
I, [2014-06-04T21:12:49.510068 #28353] [0x1047328]  INFO -- : bosh-registry is ready on port 25889
I, [2014-06-04T21:12:53.807269 #28353] [delete_stemcell(98f3b480-9d44-4979-9308-5d9903387b2c)]  INFO -- : Deleting stemcell `98f3b480-9d44-4979-9308-5d9903387b2c'...
I, [2014-06-04T21:12:54.014586 #28353] [delete_stemcell(98f3b480-9d44-4979-9308-5d9903387b2c)]  INFO -- : Stemcell `98f3b480-9d44-4979-9308-5d9903387b2c' not found. Skipping.
I, [2014-06-04T21:13:01.497910 #28353] [0x1047328]  INFO -- : Loading yaml from /tmp/d20140604-28353-6scw5x/sc-20140604-28353-51dml3/stemcell.MF
I, [2014-06-04T21:13:01.608009 #28353] [create_stemcell(/tmp/d20140604-28353-6scw5x/sc-20140604-28353-51dml3/image...)]  INFO -- : Creating new image...
I, [2014-06-04T21:13:01.608305 #28353] [create_stemcell(/tmp/d20140604-28353-6scw5x/sc-20140604-28353-51dml3/image...)]  INFO -- : Extracting stemcell file to `/tmp/d20140604-28353-6scw5x/d20140604-28353-1kvq2ck'...
D, [2014-06-04T21:13:50.824398 #28353] [create_stemcell(/tmp/d20140604-28353-6scw5x/sc-20140604-28353-51dml3/image...)] DEBUG -- : Using image parms: `{:name=>"BOSH-051e8ff4-ac63-4141-8da7-c276d62a3286", :disk_format=>"qcow2", :container_format=>"bare", :is_public=>false, :properties=>{:name=>"bosh-openstack-kvm-ubuntu", :version=>"2427", :os_type=>"linux", :os_distro=>"ubuntu", :architecture=>"x86_64", :auto_disk_config=>"true"}, :location=>"/tmp/d20140604-28353-6scw5x/d20140604-28353-1kvq2ck/root.img"}'
I, [2014-06-04T21:15:22.573785 #28353] [create_stemcell(/tmp/d20140604-28353-6scw5x/sc-20140604-28353-51dml3/image...)]  INFO -- : Creating new image `37b45284-3e7c-4323-9846-c8759de5f27c'...
D, [2014-06-04T21:15:22.609826 #28353] [create_stemcell(/tmp/d20140604-28353-6scw5x/sc-20140604-28353-51dml3/image...)] DEBUG -- : Waiting for Image `37b45284-3e7c-4323-9846-c8759de5f27c' to be active (0.000598153s)
I, [2014-06-04T21:15:22.785206 #28353] [create_stemcell(/tmp/d20140604-28353-6scw5x/sc-20140604-28353-51dml3/image...)]  INFO -- : Image `37b45284-3e7c-4323-9846-c8759de5f27c' is now active, took 0.196107605s
I, [2014-06-04T21:15:23.192318 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)]  INFO -- : Creating new server...
D, [2014-06-04T21:15:24.709114 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)] DEBUG -- : Using security groups: `ssh, dns_server, bosh'
D, [2014-06-04T21:15:24.709248 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)] DEBUG -- : Using NICs: `'
D, [2014-06-04T21:15:24.971195 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)] DEBUG -- : Using image: `37b45284-3e7c-4323-9846-c8759de5f27c'
D, [2014-06-04T21:15:25.099244 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)] DEBUG -- : Using flavor: `m1.medium'
D, [2014-06-04T21:15:25.133332 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)] DEBUG -- : Using key-pair: `firstbosh' (e4:3c:f6:d5:ff:3a:9b:9b:72:79:72:95:c9:f2:f5:43)
D, [2014-06-04T21:15:25.133697 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)] DEBUG -- : Using boot parms: `{:name=>"vm-cf04f769-3979-4eda-b8c7-f55cc907fe79", :image_ref=>"37b45284-3e7c-4323-9846-c8759de5f27c", :flavor_ref=>"3", :key_name=>"firstbosh", :security_groups=>["ssh", "dns_server", "bosh"], :nics=>[], :user_data=>"{\"registry\":{\"endpoint\":\"http://admin:admin@localhost:25889\"},\"server\":{\"name\":\"vm-cf04f769-3979-4eda-b8c7-f55cc907fe79\"}}", :personality=>[{"path"=>"/var/vcap/bosh/user_data.json", "contents"=>"{\"registry\":{\"endpoint\":\"http://admin:admin@localhost:25889\"},\"server\":{\"name\":\"vm-cf04f769-3979-4eda-b8c7-f55cc907fe79\"},\"openssh\":{\"public_key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBTfxc8RXexNOqErU4/Ryi5yWtdDepmgsJHBgJvbPmtvq5wF/oGZs0aE1RgazX3h23kXHVJimdEVxk6nRnXAa6GXU/E731hook3AQ1E6cNMjMn/dpRdytvbhik3NFkwNwFHnTDCc4xl8ebLTvVpvkHUr/I7u/PRX+FBHyFbVVSLi4BTezyQaOSga/HExeuOnzRP644dk040EgT5nEYwFo50VPYSRxmku8fBdah51ZBJpGAwaeaNCIrKrXzRkEsStbO5aCeU8r4LFk6ETA4rA4qnsdfm1zlMtKJBFP96in2USD0hJskJdDcXlUMKnaCIhS6LC51Zv7AZCQA+4DF+5lF Generated-by-Nova\\n\"}}"}]}'
I, [2014-06-04T21:15:26.309741 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)]  INFO -- : Creating new server `692ee80d-07c5-4ec4-9526-b7adc245127c'...
I, [2014-06-04T21:15:26.309914 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)]  INFO -- : Configuring network for server `692ee80d-07c5-4ec4-9526-b7adc245127c'...
I, [2014-06-04T21:15:26.346795 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)]  INFO -- : Associating server `692ee80d-07c5-4ec4-9526-b7adc245127c' with floating IP `192.168.101.1'
E, [2014-06-04T21:15:26.622869 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)] ERROR -- : OpenStack API Bad Request (No nw_info cache associated with instance). Check task debug log for details.
E, [2014-06-04T21:15:26.623067 #28353] [create_vm(bm-c242460e-31d5-4a64-9bbb-098996d9ee8b, ...)] ERROR -- : Expected([200, 202]) <=> Actual(400 Bad Request)
response => #<Excon::Response:0x000000027643d0 @data={:body=>"{\"badRequest\": {\"message\": \"No nw_info cache associated with instance\", \"code\": 400}}", :headers=>{"Content-Length"=>"85", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-abbd641b-34b8-46d6-baf5-fa928edd48a6", "Date"=>"Wed, 04 Jun 2014 15:45:26 GMT"}, :status=>400, :remote_ip=>"127.0.0.1"}, @body="{\"badRequest\": {\"message\": \"No nw_info cache associated with instance\", \"code\": 400}}", @headers={"Content-Length"=>"85", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-abbd641b-34b8-46d6-baf5-fa928edd48a6", "Date"=>"Wed, 04 Jun 2014 15:45:26 GMT"}, @status=400, @remote_ip="127.0.0.1"> (Excon::Errors::BadRequest)
/home/abhay/.rvm/gems/ruby-2.1.1/gems/excon-0.25.3/lib/excon/middlewares/expects.rb:6:in `response_call'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/excon-0.25.3/lib/excon/middlewares/response_parser.rb:8:in `response_call'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/excon-0.25.3/lib/excon/connection.rb:349:in `response'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/excon-0.25.3/lib/excon/connection.rb:247:in `request'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/fog-1.14.0/lib/fog/core/connection.rb:57:in `request'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/fog-1.14.0/lib/fog/core/deprecated/connection.rb:20:in `request'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/fog-1.14.0/lib/fog/openstack/compute.rb:339:in `request'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/fog-1.14.0/lib/fog/openstack/requests/compute/server_action.rb:7:in `server_action'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/fog-1.14.0/lib/fog/openstack/requests/compute/associate_address.rb:8:in `associate_address'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/fog-1.14.0/lib/fog/openstack/models/compute/address.rb:55:in `associate'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/fog-1.14.0/lib/fog/openstack/models/compute/address.rb:30:in `server='
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_openstack_cpi-1.2579.0/lib/cloud/openstack/vip_network.rb:43:in `block in configure'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_openstack_cpi-1.2579.0/lib/cloud/openstack/helpers.rb:26:in `with_openstack'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_openstack_cpi-1.2579.0/lib/cloud/openstack/vip_network.rb:32:in `configure'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_openstack_cpi-1.2579.0/lib/cloud/openstack/network_configurator.rb:72:in `configure'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_openstack_cpi-1.2579.0/lib/cloud/openstack/cloud.rb:258:in `block in create_vm'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_common-1.2579.0/lib/common/thread_formatter.rb:46:in `with_thread_name'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_openstack_cpi-1.2579.0/lib/cloud/openstack/cloud.rb:184:in `create_vm'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/deployer/instance_manager.rb:243:in `create_vm'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/deployer/instance_manager.rb:123:in `block in create'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/deployer/instance_manager.rb:85:in `step'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/deployer/instance_manager.rb:122:in `create'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/deployer/instance_manager.rb:201:in `update'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/deployer/instance_manager.rb:102:in `block in update_deployment'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/deployer/instance_manager.rb:92:in `with_lifecycle'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/deployer/instance_manager.rb:102:in `update_deployment'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli_plugin_micro-1.2579.0/lib/bosh/cli/commands/micro.rb:179:in `perform'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli-1.2579.0/lib/cli/command_handler.rb:57:in `run'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli-1.2579.0/lib/cli/runner.rb:56:in `run'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli-1.2579.0/lib/cli/runner.rb:16:in `run'
/home/abhay/.rvm/gems/ruby-2.1.1/gems/bosh_cli-1.2579.0/bin/bosh:7:in `<top (required)>'
/home/abhay/.rvm/gems/ruby-2.1.1/bin/bosh:23:in `load'
/home/abhay/.rvm/gems/ruby-2.1.1/bin/bosh:23:in `<main>'
/home/abhay/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/home/abhay/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'

When I tried doing it manually via CLI, I am getting an error "No valid host found" but when I create a VM via Dashboard, its running successfully. I want to automate the bosh deployment using bosh-bootstrap. Please help.