cloudfoundry / bosh-openstack-cpi-release

BOSH OpenStack CPI
Apache License 2.0
36 stars 59 forks source link

bosh deploy on Openstack fails with 401 HTTP status #61

Closed alpcrimea closed 7 years ago

alpcrimea commented 7 years ago

Hello. I'm trying to deploy CF with bosh on Openstack. Bosh deployed successfully. Example YML for it at

https://gist.github.com/alpcrimea/b921e6d130c78b22899fb944685dd2ed

But CF's deploy with such stub is failing https://gist.github.com/alpcrimea/f379650b38ee8fbcbb16842e34836461

bosh deploy ...... Started compiling packages Started compiling packages > cli/60a741596e7fc803f45c9628364b21d1b247550b Started compiling packages > haproxy/f061c9f4854fab702991cf42653b9b09d711c9c1 Started compiling packages > loggregator_trafficcontroller/8e6b4175fcf5347c82d52f7f9cf403506da0fe30 Started compiling packages > syslog_drain_binder/f63393af5ffbdd9bd49b181ec122d37866c5dd13 Started compiling packages > doppler/637090424bd428f91f998b679c9d0f57b7311860 Started compiling packages > dea_logging_agent/587d58c3e4c6eed995ffcf16de43129aaeb6931c. Failed: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'Cannot update settings for 'vm-9e39a357-66f0-4552-bd91-a5c35563b882', got HTTP 401' in 'create_vm' CPI method (00:02:19) Failed compiling packages > cli/60a741596e7fc803f45c9628364b21d1b247550b: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'Cannot update settings for 'vm-e5e5dcfa-25fa-4783-8034-f23c2a3633d2', got HTTP 401' in 'create_vm' CPI method (00:02:19) Failed compiling packages > syslog_drain_binder/f63393af5ffbdd9bd49b181ec122d37866c5dd13: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'Cannot update settings for 'vm-afc95fa3-3f3b-4214-b9c0-529932a0f86f', got HTTP 401' in 'create_vm' CPI method (00:02:19) Failed compiling packages > haproxy/f061c9f4854fab702991cf42653b9b09d711c9c1: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'Cannot update settings for 'vm-20f9ae7b-03dd-4d8e-abf5-4213613acaca', got HTTP 401' in 'create_vm' CPI method (00:02:24) Failed compiling packages > doppler/637090424bd428f91f998b679c9d0f57b7311860: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'Cannot update settings for 'vm-7e035eac-6df5-45a4-aff2-87bd47c74a2d', got HTTP 401' in 'create_vm' CPI method (00:02:26) Failed compiling packages > loggregator_trafficcontroller/8e6b4175fcf5347c82d52f7f9cf403506da0fe30: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'Cannot update settings for 'vm-90a63db3-64ac-4f33-9709-dc754edf1e44', got HTTP 401' in 'create_vm' CPI method (00:02:26)

Error 100: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'Cannot update settings for 'vm-9e39a357-66f0-4552-bd91-a5c35563b882', got HTTP 401' in 'create_vm' CPI method

Looks like it's creating VM, trying to upgrade(or just echoing that) and drops it.

I, [2017-02-07T22:17:35.598585 #10771] INFO -- : Server f12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa' is now active, took 121.752428384s I, [2017-02-07T22:17:35.598680 #10771] INFO -- : Configuring network for serverf12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa'... D, [2017-02-07T22:17:35.598788 #10771] DEBUG -- : 'human_readable_vm_names' disabled I, [2017-02-07T22:17:35.598851 #10771] INFO -- : Updating settings for server `f12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa'... W, [2017-02-07T22:17:35.606007 #10771] WARN -- : Failed to register server: Cannot update settings for 'vm-7e035eac-6df5-45a4-aff2-87bd47c74a2d', got HTTP 401 D, [2017-02-07T22:17:35.607012 #10771] 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-core/1.43.0", "Content-Type"=>"application/json", "Accept"=>"application/json", "X-Auth-Token"=>"", "Host"=>"horizon.test.com:8774"}, :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, :ssl_uri_schemes=>["https"], :stubs=>:global, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.49.0 (x86_64-linux) ruby/2.1.7", :write_timeout=>60, :host=>"horizon.test.com", :hostname=>"horizon.test.com", :path=>"/v2.1/servers/f12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa", :port=>8774, :query=>nil, :scheme=>"https", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor, :expects=>204, :method=>"DELETE", :retries_remaining=>4, :connection=>#<Excon::Connection:55e4fb535da0 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog-core/1.43.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, :ssl_uri_schemes=>["https"], :stubs=>:global, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.49.0 (x86_64-linux) ruby/2.1.7", :write_timeout=>60, :host=>"horizon.test.com", :hostname=>"horizon.test.com", :path=>"", :port=>8774, :query=>nil, :scheme=>"https", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor} @socket_key="https://horizon.test.com:8774">, :stack=>#<Excon::Middleware::ResponseParser:0x0055e4fb010e88 @stack=#<Excon::Middleware::Expects:0x0055e4fb010eb0 @stack=#<Excon::Middleware::Idempotent:0x0055e4fb010ed8 @stack=#<Excon::Middleware::Instrumentor:0x0055e4fb010f28 @stack=#<Excon::Middleware::Mock:0x0055e4fb010f50 @stack=#<Excon::Connection:55e4fb535da0 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog-core/1.43.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, :ssl_uri_schemes=>["https"], :stubs=>:global, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.49.0 (x86_64-linux) ruby/2.1.7", :write_timeout=>60, :host=>"horizon.test.com", :hostname=>"horizon.test.com", :path=>"", :port=>8774, :query=>nil, :scheme=>"https", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor} @socket_key="https://horizon.test.com:8774">>>>>>} D, [2017-02-07T22:17:35.996256 #10771] DEBUG -- : excon.response {:body=>"", :cookies=>[], :host=>"horizon.test.com", :headers=>{"Content-Length"=>"0", "Content-Type"=>"application/json", "X-Openstack-Nova-Api-Version"=>"2.1", "Vary"=>"X-OpenStack-Nova-API-Version", "X-Compute-Request-Id"=>"req-85af6d47-910b-4c69-8d6f-4e85c713e72d", "Date"=>"Tue, 07 Feb 2017 22:17:35 GMT", "Connection"=>"close", "X-Auth-Token"=>""}, :path=>"/v2.1/servers/f12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa", :port=>8774, :status=>204, :status_line=>"HTTP/1.1 204 No Content\r\n", :reason_phrase=>"No Content", :remote_ip=>"22.33.44.55", :local_port=>37674, :local_address=>"10.0.0.7"}

I, [2017-02-07T22:17:35.598585 #10771] INFO -- : Server f12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa' is now active, took 121.752428384s I, [2017-02-07T22:17:35.598680 #10771] INFO -- : Configuring network for serverf12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa'... D, [2017-02-07T22:17:35.598788 #10771] DEBUG -- : 'human_readable_vm_names' disabled I, [2017-02-07T22:17:35.598851 #10771] INFO -- : Updating settings for server `f12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa'... W, [2017-02-07T22:17:35.606007 #10771] WARN -- : Failed to register server: Cannot update settings for 'vm-7e035eac-6df5-45a4-aff2-87bd47c74a2d', got HTTP 401 D, [2017-02-07T22:17:35.607012 #10771] 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-core/1.43.0", "Content-Type"=>"application/json", "Accept"=>"application/json", "X-Auth-Token"=>"", "Host"=>"horizon.test.com:8774"}, :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, :ssl_uri_schemes=>["https"], :stubs=>:global, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.49.0 (x86_64-linux) ruby/2.1.7", :write_timeout=>60, :host=>"horizon.test.com", :hostname=>"horizon.test.com", :path=>"/v2.1/servers/f12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa", :port=>8774, :query=>nil, :scheme=>"https", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor, :expects=>204, :method=>"DELETE", :retries_remaining=>4, :connection=>#<Excon::Connection:55e4fb535da0 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog-core/1.43.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, :ssl_uri_schemes=>["https"], :stubs=>:global, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.49.0 (x86_64-linux) ruby/2.1.7", :write_timeout=>60, :host=>"horizon.test.com", :hostname=>"horizon.test.com", :path=>"", :port=>8774, :query=>nil, :scheme=>"https", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor} @socket_key="https://horizon.test.com:8774">, :stack=>#<Excon::Middleware::ResponseParser:0x0055e4fb010e88 @stack=#<Excon::Middleware::Expects:0x0055e4fb010eb0 @stack=#<Excon::Middleware::Idempotent:0x0055e4fb010ed8 @stack=#<Excon::Middleware::Instrumentor:0x0055e4fb010f28 @stack=#<Excon::Middleware::Mock:0x0055e4fb010f50 @stack=#<Excon::Connection:55e4fb535da0 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog-core/1.43.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, :ssl_uri_schemes=>["https"], :stubs=>:global, :tcp_nodelay=>false, :thread_safe_sockets=>true, :uri_parser=>URI, :versions=>"excon/0.49.0 (x86_64-linux) ruby/2.1.7", :write_timeout=>60, :host=>"horizon.test.com", :hostname=>"horizon.test.com", :path=>"", :port=>8774, :query=>nil, :scheme=>"https", :instrumentor=>Bosh::OpenStackCloud::ExconLoggingInstrumentor} @socket_key="https://horizon.test.com:8774">>>>>>} D, [2017-02-07T22:17:35.996256 #10771] DEBUG -- : excon.response {:body=>"", :cookies=>[], :host=>"horizon.test.com", :headers=>{"Content-Length"=>"0", "Content-Type"=>"application/json", "X-Openstack-Nova-Api-Version"=>"2.1", "Vary"=>"X-OpenStack-Nova-API-Version", "X-Compute-Request-Id"=>"req-85af6d47-910b-4c69-8d6f-4e85c713e72d", "Date"=>"Tue, 07 Feb 2017 22:17:35 GMT", "Connection"=>"close", "X-Auth-Token"=>""}, :path=>"/v2.1/servers/f12d3c3a-f20d-45f6-919e-a7f3b1e9e0aa", :port=>8774, :status=>204, :status_line=>"HTTP/1.1 204 No Content\r\n", :reason_phrase=>"No Content", :remote_ip=>"22.33.44.55", :local_port=>37674, :local_address=>"10.0.0.7"}

voelzmo commented 7 years ago

Thanks @alpcrimea for the report. The CPI cannot talk to the registry of the BOSH Director. This is because the two passwords in the registry settings of your manifest are different. Please make sure that in this section the two passwords are the same.

Hope that helps!

alpcrimea commented 7 years ago

Thank you @voelzmo, that helped on this stage!