Re: How to run test for bosh-openstack-cpi locally?
Guangcai Wang <guangcai.wang@...>
Hi Dmitriy,
Actually, after I generated the bosh release and bosh-openstack-cpi release locally, I deployed them with bosh-init and failed with keystone v3. I found this is caused by fog-1.27.0 code which is installed during packaging. (attached detailed log below). Do you know how to fix it? (Note: new bosh-openstack-cpi supporting keystone v3 has dependency on fog 1.31.0) File: 1. bosh-openstack-cpi-release\packages\bosh_openstack_cpi\packaging cat >> Gemfile <<EOF gem 'bosh_openstack_cpi' EOF Here, it depends on fog-1.27.0 ( https://rubygems.org/gems/bosh_openstack_cpi/versions/1.2972.0) which does not support keystone v3. when it is executed during packaging, it will install fog-1.27.0. (I guess) 2. /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-1.27.0/lib/fog/openstack/core.rb if @openstack_auth_uri.path =~ /\/v2.0/ credentials = Fog::OpenStack.authenticate_v2(options, @connection_options) else credentials = Fog::OpenStack.authenticate_v1(options, @connection_options) end Command 'deploy' failed: creating stemcell (bosh-openstack-kvm-ubuntu-trusty-go_agent 2950): Unmarshalling external CPI command output: STDOUT: '', STDERR: 'D, [2015-07-14T01:06:53.287951 #17191] DEBUG -- : excon.request {:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.27.0 fog-core/1.32.0", "X-Auth-Key"=>"passw0rd", "X-Auth-User"=>"demo", "Host"=>" 137.172.74.130:5000"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::ResponseParser, Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :persistent=>false, :read_timeout=>60, :retry_limit=>4, :ssl_verify_peer=>true, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.45.3 (x86_64-linux) ruby/1.9.3", :write_timeout=>60, :host=>"137.172.74.130", :hostname=>"137.172.74.130", :path=>"/v3/tokens", :port=>5000, :query=>nil, :scheme=>"http", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor, :expects=>[200, 204], :method=>"GET", :retries_remaining=>4, :connection=>#<Excon::Connection:30fe238 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.27.0 fog-core/1.32.0"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::ResponseParser, Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :persistent=>false, :read_timeout=>60, :retry_limit=>4, :ssl_verify_peer=>true, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.45.3 (x86_64-linux) ruby/1.9.3", :write_timeout=>60, :host=>"137.172.74.130", :hostname=>"137.172.74.130", :path=>"/v3/tokens", :port=>5000, :query=>nil, :scheme=>"http", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor} @socket_key=" http://137.172.74.130:5000">, :stack=>#<Excon::Middleware::ResponseParser:0x000000030fbb00 @stack=#<Excon::Middleware::Expects:0x000000030fbb28 @stack=#<Excon::Middleware::Idempotent:0x000000030fbbc8 @stack=#<Excon::Middleware::Instrumentor:0x000000030fbbf0 @stack=#<Excon::Middleware::Mock:0x000000030fbe48 @stack=#<Excon::Connection:30fe238 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.27.0 fog-core/1.32.0"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::ResponseParser, Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :persistent=>false, :read_timeout=>60, :retry_limit=>4, :ssl_verify_peer=>true, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.45.3 (x86_64-linux) ruby/1.9.3", :write_timeout=>60, :host=>"137.172.74.130", :hostname=>"137.172.74.130", :path=>"/v3/tokens", :port=>5000, :query=>nil, :scheme=>"http", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor} @socket_key=" http://137.172.74.130:5000">>>>>>} D, [2015-07-14T01:06:53.292721 #17191] DEBUG -- : excon.error {:error=>#<Excon::Errors::NotFound: Expected([200, 204]) <=> Actual(404 Not Found) excon.error.response :body => "{\"error\": {\"message\": \"The resource could not be found.\", \"code\": 404, \"title\": \"Not Found\"}}" :headers => { "Connection" => "close" "Content-Length" => "93" "Content-Type" => "application/json" "Date" => "Tue, 14 Jul 2015 01:06:53 GMT" "Server" => "Apache/2.4.6 (CentOS)" "Vary" => "X-Auth-Token" } :local_address => "172.16.0.20" :local_port => 45399 :reason_phrase => "Not Found" :remote_ip => "137.172.74.130" :status => 404 :status_line => "HTTP/1.1 404 Not Found\r\n" }E, [2015-07-14T01:06:53.292820 #17191] ERROR -- : Expected([200, 204]) <=> Actual(404 Not Found) excon.error.response :body => "{\"error\": {\"message\": \"The resource could not be found.\", \"code\": 404, \"title\": \"Not Found\"}}" :headers => { "Connection" => "close" "Content-Length" => "93" "Content-Type" => "application/json" "Date" => "Tue, 14 Jul 2015 01:06:53 GMT" "Server" => "Apache/2.4.6 (CentOS)" "Vary" => "X-Auth-Token" } :local_address => "172.16.0.20" :local_port => 45399 :reason_phrase => "Not Found" :remote_ip => "137.172.74.130" :status => 404 :status_line => "HTTP/1.1 404 Not Found\r\n" (Excon::Errors::NotFound) /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/excon-0.45.3/lib/excon/middlewares/expects.rb:10:in `response_call' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/excon-0.45.3/lib/excon/middlewares/response_parser.rb:8:in `response_call' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/excon-0.45.3/lib/excon/connection.rb:372:in `response' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/excon-0.45.3/lib/excon/connection.rb:236:in `request' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-core-1.32.0/lib/fog/core/connection.rb:81:in `request' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-1.27.0/lib/fog/openstack/core.rb:70:in `authenticate_v1' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-1.27.0/lib/fog/openstack/compute.rb:397:in `authenticate' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-1.27.0/lib/fog/openstack/compute.rb:320:in `initialize' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-core-1.32.0/lib/fog/core/service.rb:115:in `new' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-core-1.32.0/lib/fog/core/service.rb:115:in `new' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-core-1.32.0/lib/fog/core/services_mixin.rb:16:in `new' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/fog-core-1.32.0/lib/fog/compute.rb:62:in `new' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/bosh_openstack_cpi-1.3012.0/lib/cloud/openstack/cloud.rb:67:in `initialize' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/bosh_openstack_cpi-1.3012.0/bin/openstack_cpi:17:in `new' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/bosh_openstack_cpi-1.3012.0/bin/openstack_cpi:17:in `<top (required)>' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/bin/openstack_cpi:16:in `load' /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/bin/openstack_cpi:16:in `<main>' E, [2015-07-14T01:06:53.292878 #17191] ERROR -- : Unable to connect to the OpenStack Compute API. Check task debug log for details. /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/bosh_openstack_cpi-1.3012.0/lib/cloud/openstack/helpers.rb:20:in `cloud_error': Unable to connect to the OpenStack Compute API. Check task debug log for details. (Bosh::Clouds::CloudError) from /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/bosh_openstack_cpi-1.3012.0/lib/cloud/openstack/cloud.rb:70:in `rescue in initialize' from /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/bosh_openstack_cpi-1.3012.0/lib/cloud/openstack/cloud.rb:66:in `initialize' from /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/bosh_openstack_cpi-1.3012.0/bin/openstack_cpi:17:in `new' from /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/gem_home/ruby/1.9.1/gems/bosh_openstack_cpi-1.3012.0/bin/openstack_cpi:17:in `<top (required)>' from /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/bin/openstack_cpi:16:in `load' from /home/ubuntu/.bosh_init/installations/4ae17957-e371-4116-74d2-8b50ad18c1b8/packages/bosh_openstack_cpi/bin/openstack_cpi:16:in `<main>' On Thu, Jul 16, 2015 at 5:34 PM, Guangcai Wang <guangcai.wang(a)gmail.com> wrote: Hi Dmitriy, |
|