How do I resolve a connection refused during compute node identity registration?

asked 2019-08-15 15:13:23 -0500

Samerious gravatar image

I am using openstack-chef queens to deploy a compute node. While using the recipe /var/chef/cache/cookbooks/openstack-compute/recipes/identity_registration.rb:65 I am getting an error of

Connection refused - connect(2) for 127.0.0.1:5000 (Errno::ECONNREFUSED)

Here are the connection params:

    openstack_service("nova") do
  action [:create]
  default_guard_interpreter :default
  declared_type :openstack_service
  cookbook_name "openstack-compute"
  recipe_name "identity_registration"
  type "compute"
  connection_params {:openstack_auth_url=>"http://192.168.0.42:5000", :openstack_username=>"admin", :openstack_api_key=>"PASSWORD", :openstack_project_name=>"admin", :openstack_domain_name=>"default", :no_path_prefix=>true}
  connection_cache #<Fog::Identity::OpenStack::V3::Real:98440480 @path_prefix="" @openstack_auth_url="http://192.168.0.42:5000" @openstack_username="admin" @openstack_api_key="PASSWORD" @openstack_project_name="admin" @openstack_domain_name="default" @auth_token="AUTH TOKEN" @openstack_must_reauthenticate=false @openstack_endpoint_type="admin" @openstack_cache_ttl=0 @openstack_can_reauthenticate=true @current_user="admin" @current_user_id="7fcd55f11db0452cbc55d2c2e3d58870" @current_tenant={"domain"=>{"id"=>"default", "name"=>"Default"}, "id"=>"26c362a0a3d34ae68b732fe20fab61f5", "name"=>"admin"} @openstack_service_type=["identity_v3", "identityv3", "identity"] @connection_options={:debug_response=>true, :headers=>{"User-Agent"=>"fog-core/2.1.0"}, :persistent=>false} @persistent=false @openstack_management_url="http://127.0.0.1:5000/v3" @expires="2019-08-15T01:11:12.000000Z" @unscoped_token="=#<URI::HTTP http://127.0.0.1:5000/v3> @path="/v3" @connection=#<Fog::Core::Connection:0x000000000bba8988 @excon=#<Excon::Connection:bba8668 @data={:chunk_size=>1048576, :ciphers=>"ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:DES-CBC3-SHA:!DSS", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog-core/2.1.0"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Hijack, Excon::Middleware::ResponseParser, Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock, Excon::Middleware::RedirectFollower], :mock=>false, :nonblock=>true, :omit_default_port=>false, :persistent=>false, :read_timeout=>60, :retry_errors=>[Excon::Error::Timeout, Excon::Error::Socket, Excon::Error::HTTPStatus], :retry_limit=>4, :ssl_verify_peer=>true, :ssl_uri_schemes=>["https"], :stubs=>:global, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.66.0 (x86_64-linux) ruby/2.5.3", :write_timeout=>60, :host=>"127.0.0.1", :hostname=>"127.0.0.1", :path=>"/v3", :port=>5000, :query=>nil, :scheme=>"http", :remote_ip=>"127.0.0.1"} @socket_key="http://127.0.0.1:5000" @_excon_sockets={5506560=>{}}>>>
  service_name "nova"
end

The error is being caused by identity trying to register locally when it should be registering remotely at 192.168.0.42:5000. I can not find where those parameters are being set for host,hostname,socket_key and or anything that's referencing the local host address.

edit retag flag offensive close merge delete