Bug #31588
openFaild create compute_resources Openstack Ussuri [os-keystone]
Description
Hi, I have recently encountered a bug in the new foreman version (2.3.1) which applies to Ubuntu and CentOS.
The problem is that, when we want to add a new Cloud with OpenStack Ussuri, it cannot be saved in the databases from theforeman.
Package:
ii foreman 2.3.1-1 amd64 Systems management web interface
ii foreman-cli 2.3.1-1 all metapackage providing hammer CLI for Foreman
ii foreman-debug 2.3.1-1 all provides support utility foreman-debug.
ii foreman-dynflow-sidekiq 2.3.1-1 all package providing dynflow sidekiq services for Foreman
ii foreman-installer 2.3.1-1 all Automated puppet-based installer for The Foreman
ii foreman-openstack 2.3.1-1 all metapackage providing OpenStack dependencies for Foreman
ii foreman-postgresql 2.3.1-1 all metapackage providing PostgreSQL dependencies for Foreman
ii foreman-proxy 2.3.1-1 all RESTful proxies for DNS, DHCP, TFTP, and Puppet
ii foreman-service 2.3.1-1 all package providing Foreman services running via puma
ii foreman-vmware 2.3.1-1 all metapackage providing vmware dependencies for Foreman
ii ruby-foreman-statistics 1.0.0-1 all Foreman statistics plugin
ii ruby-hammer-cli-foreman 2.3.0-1 all Foreman commands for Hammer
ii ruby-puppetdb-foreman 5.0.0-1 all Foreman Puppetdb Plugin
Error reported by Foreman:
2021-01-07T12:27:41 [I|app|826a584d] Started PUT "/compute_resources/test_connection" for 127.0.0.1 at 2021-01-07 12:27:41 +0000
2021-01-07T12:27:41 [I|app|826a584d] Processing by ComputeResourcesController#test_connection as */*
2021-01-07T12:27:41 [I|app|826a584d] Parameters: {"utf8"=>"✓", "authenticity_token"=>"AYzcA3v4kN6XF......ATrIs6C1/Rdv0cTecV6w==", "compute_resource"=>{"name"=>"OSA", "provider"=>"Openstack", "description"=>"", "url"=>"https://api.xxx.de:5000/v3/auth/tokens", "user"=>"admin", "password"=>"[FILTERED]", "tenant"=>"", "domain"=>"", "project_domain_name"=>"", "project_domain_id"=>"", "allow_external_network"=>"1", "location_ids"=>["", "2"], "organization_ids"=>["", "1"]}, "fakepassword"=>"[FILTERED]", "cr_id"=>""}
2021-01-07T12:27:41 [I|app|826a584d] Rendered compute_resources/form/_openstack.html.erb (Duration: 116.6ms | Allocations: 5277)
2021-01-07T12:27:41 [I|app|826a584d] Rendered taxonomies/_loc_org_tabs.html.erb (Duration: 10.5ms | Allocations: 1628)
2021-01-07T12:27:41 [I|app|826a584d] Rendered compute_resources/_form.html.erb (Duration: 131.9ms | Allocations: 8332)
2021-01-07T12:27:41 [I|app|826a584d] Completed 200 OK in 722ms (Views: 130.7ms | ActiveRecord: 6.7ms | Allocations: 25011)
2021-01-07T12:27:44 [I|app|0a9b296a] Started POST "/compute_resources" for 127.0.0.1 at 2021-01-07 12:27:44 +0000
2021-01-07T12:27:44 [I|app|0a9b296a] Processing by ComputeResourcesController#create as HTML
2021-01-07T12:27:44 [I|app|0a9b296a] Parameters: {"utf8"=>"✓", "authenticity_token"=>"AYzcA3......5XKVtayY55vSmXjSNCyMDdATrIs6C1/Rdv0cTecV6w==", "compute_resource"=>{"name"=>"OSA", "provider"=>"Openstack", "description"=>"", "url"=>"https://api.xxxx:5000/v3/auth/tokens", "user"=>"admin", "password"=>"[FILTERED]", "tenant"=>"", "domain"=>"", "project_domain_name"=>"", "project_domain_id"=>"", "allow_external_network"=>"1", "location_ids"=>["", "2"], "organization_ids"=>["", "1"]}, "commit"=>"Submit"}
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on name OSA
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on description
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on url https://api.xxx.de:5000/v3/auth/tokens
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on user admin
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on password [redacted]
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on uuid
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on caching_enabled true
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on domain
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on http_proxy_id
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on organization_ids [1]
2021-01-07T12:27:44 [I|aud|0a9b296a] ComputeResource (10) create event on location_ids [2]
2021-01-07T12:27:45 [I|app|3c23c5ff] Started GET "/notification_recipients" for 127.0.0.1 at 2021-01-07 12:27:45 +0000
2021-01-07T12:27:45 [I|app|3c23c5ff] Processing by NotificationRecipientsController#index as JSON
2021-01-07T12:27:45 [I|app|3c23c5ff] Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 3.0ms | Allocations: 2223)
2021-01-07T12:27:45 [W|app|0a9b296a] Failed to generate key pair
2021-01-07T12:27:45 [I|app|0a9b296a] Backtrace for 'Failed to generate key pair' error (Fog::OpenStack::Compute::NotFound): Expected([200, 201]) <=> Actual(404 Not Found)
excon.error.response
:body => "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>\n"
:cookies => [
]
:headers => {
"Connection" => "close"
"Content-Length" => "232"
"Content-Type" => "text/html; charset=utf-8"
"Date" => "Thu, 07 Jan 2021 12:27:45 GMT"
"Server" => "nginx/1.14.0 (Ubuntu)"
"Vary" => "X-Auth-Token"
"x-openstack-request-id" => "req-d19f2d60-5452-4e2f-909c-3ced6b43236b"
}
:host => "api.xxxxr.de"
:local_address => "10.xx.xx.49"
:local_port => 34116
:path => "/os-keypairs"
:port => 5000
:reason_phrase => "NOT FOUND"
:remote_ip => "10.xxx.xx.106"
:status => 404
:status_line => "HTTP/1.1 404 NOT FOUND\r\n"
/usr/share/foreman/vendor/ruby/2.5.0/gems/excon-0.78.1/lib/excon/middlewares/expects.rb:13:in `response_call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/excon-0.78.1/lib/excon/middlewares/response_parser.rb:12:in `response_call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/excon-0.78.1/lib/excon/connection.rb:456:in `response'
/usr/share/foreman/vendor/ruby/2.5.0/gems/excon-0.78.1/lib/excon/connection.rb:287:in `request'
/usr/share/foreman/lib/foreman/http_proxy/excon_connection_extension.rb:13:in `request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-core-2.1.0/lib/fog/core/connection.rb:81:in `request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-openstack-1.0.11/lib/fog/openstack/core.rb:55:in `request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-openstack-1.0.11/lib/fog/openstack/compute/requests/create_key_pair.rb:15:in `create_key_pair'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-openstack-1.0.11/lib/fog/openstack/compute/models/key_pair.rb:30:in `save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-core-2.1.0/lib/fog/core/collection.rb:50:in `create'
/usr/share/foreman/app/models/concerns/key_pair_compute_resource.rb:42:in `setup_key_pair'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:428:in `block in make_lambda'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:238:in `block in halting_and_conditional'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:517:in `block in invoke_after'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:517:in `each'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:517:in `invoke_after'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:136:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:825:in `_run_create_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/callbacks.rb:331:in `_create_record'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/timestamp.rb:110:in `_create_record'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/persistence.rb:905:in `create_or_update'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/callbacks.rb:327:in `block in create_or_update'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:825:in `_run_save_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/callbacks.rb:327:in `create_or_update'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/timestamp.rb:128:in `create_or_update'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/persistence.rb:470:in `save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/validations.rb:47:in `save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:314:in `block in save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:314:in `save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/suppressor.rb:44:in `save'
/usr/share/foreman/app/controllers/compute_resources_controller.rb:29:in `create'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/base.rb:195:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:139:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/callbacks.rb:41:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/rescue.rb:22:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/base.rb:136:in `process'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/rendering.rb:39:in `process'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal.rb:190:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal.rb:254:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:33:in `serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:49:in `block in serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:32:in `each'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:32:in `serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:834:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-dsl-2.3.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/static_dispatcher.rb:66:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/extractor/recorder.rb:137:in `call'
/usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/cookies.rb:648:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:101:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:37:in `call_app'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:28:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/executor.rb:14:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/static.rb:126:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/secure_headers-6.3.1/lib/secure_headers/middleware.rb:11:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/engine.rb:527:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/railtie.rb:190:in `public_send'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/railtie.rb:190:in `method_missing'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/configuration.rb:228:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:713:in `handle_request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:472:in `process_client'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:328:in `block in run'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
/usr/share/foreman/vendor/ruby/2.5.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2021-01-07T12:27:45 [W|app|0a9b296a] Error while creating a resource
2021-01-07T12:27:45 [I|app|0a9b296a] Backtrace for 'Error while creating a resource' error (Fog::OpenStack::Compute::NotFound): Expected([200, 201]) <=> Actual(404 Not Found)
excon.error.response
:body => "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>\n"
:cookies => [
]
:headers => {
"Connection" => "close"
"Content-Length" => "232"
"Content-Type" => "text/html; charset=utf-8"
"Date" => "Thu, 07 Jan 2021 12:27:45 GMT"
"Server" => "nginx/1.14.0 (Ubuntu)"
"Vary" => "X-Auth-Token"
"x-openstack-request-id" => "req-d19f2d60-5452-4e2f-909c-3ced6b43236b"
}
:host => "api.xxx.de"
:local_address => "10.xxx.xxx.49"
:local_port => 34116
:path => "/os-keypairs"
:port => 5000
:reason_phrase => "NOT FOUND"
:remote_ip => "10.xxx.xxx.106"
:status => 404
:status_line => "HTTP/1.1 404 NOT FOUND\r\n"
/usr/share/foreman/vendor/ruby/2.5.0/gems/excon-0.78.1/lib/excon/middlewares/expects.rb:13:in `response_call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/excon-0.78.1/lib/excon/middlewares/response_parser.rb:12:in `response_call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/excon-0.78.1/lib/excon/connection.rb:456:in `response'
/usr/share/foreman/vendor/ruby/2.5.0/gems/excon-0.78.1/lib/excon/connection.rb:287:in `request'
/usr/share/foreman/lib/foreman/http_proxy/excon_connection_extension.rb:13:in `request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-core-2.1.0/lib/fog/core/connection.rb:81:in `request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-openstack-1.0.11/lib/fog/openstack/core.rb:55:in `request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-openstack-1.0.11/lib/fog/openstack/compute/requests/create_key_pair.rb:15:in `create_key_pair'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-openstack-1.0.11/lib/fog/openstack/compute/models/key_pair.rb:30:in `save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/fog-core-2.1.0/lib/fog/core/collection.rb:50:in `create'
/usr/share/foreman/app/models/concerns/key_pair_compute_resource.rb:42:in `setup_key_pair'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:428:in `block in make_lambda'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:238:in `block in halting_and_conditional'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:517:in `block in invoke_after'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:517:in `each'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:517:in `invoke_after'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:136:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:825:in `_run_create_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/callbacks.rb:331:in `_create_record'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/timestamp.rb:110:in `_create_record'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/persistence.rb:905:in `create_or_update'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/callbacks.rb:327:in `block in create_or_update'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:825:in `_run_save_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/callbacks.rb:327:in `create_or_update'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/timestamp.rb:128:in `create_or_update'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/persistence.rb:470:in `save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/validations.rb:47:in `save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:314:in `block in save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:314:in `save'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/suppressor.rb:44:in `save'
/usr/share/foreman/app/controllers/compute_resources_controller.rb:29:in `create'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/base.rb:195:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:139:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/callbacks.rb:41:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/rescue.rb:22:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/abstract_controller/base.rb:136:in `process'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.4/lib/action_view/rendering.rb:39:in `process'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal.rb:190:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal.rb:254:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:33:in `serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:49:in `block in serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:32:in `each'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/journey/router.rb:32:in `serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:834:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-dsl-2.3.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/static_dispatcher.rb:66:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/extractor/recorder.rb:137:in `call'
/usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/cookies.rb:648:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:101:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:37:in `call_app'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:28:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.4/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/executor.rb:14:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/static.rb:126:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/secure_headers-6.3.1/lib/secure_headers/middleware.rb:11:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/engine.rb:527:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/railtie.rb:190:in `public_send'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/railtie.rb:190:in `method_missing'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/configuration.rb:228:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:713:in `handle_request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:472:in `process_client'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/server.rb:328:in `block in run'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.7/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
/usr/share/foreman/vendor/ruby/2.5.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2021-01-07T12:27:45 [E|app|0a9b296a] Failed to save:
2021-01-07T12:27:45 [I|app|0a9b296a] Rendering compute_resources/new.html.erb within layouts/application
2021-01-07T12:27:45 [I|app|0a9b296a] Rendered compute_resources/form/_openstack.html.erb (Duration: 562.3ms | Allocations: 9733)
2021-01-07T12:27:45 [I|app|0a9b296a] Rendered taxonomies/_loc_org_tabs.html.erb (Duration: 6.6ms | Allocations: 1628)
2021-01-07T12:27:45 [I|app|0a9b296a] Rendered compute_resources/_form.html.erb (Duration: 574.0ms | Allocations: 12905)
2021-01-07T12:27:45 [I|app|0a9b296a] Rendered compute_resources/new.html.erb within layouts/application (Duration: 574.4ms | Allocations: 13015)
2021-01-07T12:27:45 [I|app|0a9b296a] Rendered layouts/_application_content.html.erb (Duration: 1.3ms | Allocations: 438)
2021-01-07T12:27:45 [I|app|0a9b296a] Rendering layouts/base.html.erb
2021-01-07T12:27:45 [I|app|0a9b296a] Rendered layouts/base.html.erb (Duration: 29.2ms | Allocations: 14999)
2021-01-07T12:27:45 [I|app|0a9b296a] Completed 200 OK in 1659ms (Views: 604.6ms | ActiveRecord: 29.2ms | Allocations: 111053)
No data to display