Project

General

Profile

Bug #9246

Error in docker plugin in foreman 1.7.2 - submit new container produce an error

Added by Olivier Cruilles over 7 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Hello,

Using docker plugin in Foreman 1.7.2, when I valid the creation of a new container (New container -> Environment -> button Submit), nothing appends.

This is the error log:

Started PUT "/wizard_states/6/steps/environment" for 10.100.21.48 at 2015-02-05 16:16:39 -0500
Processing by Containers::StepsController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"NVXKAMGEZt6aPiTjQTjYyL3We1r+QGky6od13FtozJs=", "docker_container_wizard_states_environment"=>{"tty"=>"0", "attach_stdin"=>"1", "attach_stdout"=>"1", "attach_stderr"=>"1"}, "wizard_state_id"=>"6", "id"=>"environment"}
Failed to save:
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.0.0/app/views/foreman_docker/common_parameters/_environment_variable.html.erb (1.5ms)
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.0.0/app/views/containers/steps/_form_buttons.html.erb (0.8ms)
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.0.0/app/views/containers/steps/_title.html.erb (11.0ms)
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.0.0/app/views/containers/steps/environment.html.erb within layouts/application (11.5ms)
Rendered home/_user_dropdown.html.erb (2.1ms)
Read fragment views/tabs_and_title_records-2 (0.2ms)
Rendered home/_topbar.html.erb (3.9ms)
Rendered layouts/base.html.erb (6.0ms)
Completed 200 OK in 99ms (Views: 19.0ms | ActiveRecord: 5.5ms)

Thank you in advance

History

#1 Updated by Dominic Cleal over 7 years ago

  • Project changed from Plugins to Docker

#2 Updated by Dmitri Dolguikh over 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Dmitri Dolguikh

#3 Updated by Dmitri Dolguikh over 7 years ago

  • Status changed from Assigned to Need more information

This shouldn't be happening now: changes were made in how the container wizard handles and displays container creation errors. Would it be possible to test this with a recent build of foreman-docker (version 1.0.1 and later)?

#4 Updated by Olivier Cruilles over 7 years ago

Hello,

I updated the version of the docker plugin to:

ruby193-rubygem-docker-api.noarch 0:1.17.0-1.el6                                                          
ruby193-rubygem-foreman_docker.noarch 0:1.2.0-1.fm1_7.el6
ruby193-rubygem-foreman_docker-doc.noarch 0:1.2.0-1.fm1_7.el6

But the problem still continue. When I click on the Submit Button to validate the new Container, I stay on the same web page.

Logs:
Started PUT "/wizard_states/10/steps/environment" for 10.100.21.48 at 2015-02-26 14:25:16 -0500
Processing by Containers::StepsController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"1LHYOwmS4feXJAsJD19P1g6nF+rwFHvofaGm86uxfvI=", "docker_container_wizard_states_environment"=>{"tty"=>"0", "attach_stdin"=>"1", "attach_stdout"=>"1", "attach_stderr"=>"1"}, "wizard_state_id"=>"10", "id"=>"environment"}
Failed to save:
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/views/foreman_docker/common_parameters/_environment_variable.html.erb (1.5ms)
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/views/containers/steps/_form_buttons.html.erb (0.9ms)
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/views/containers/steps/_title.html.erb (11.5ms)
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/views/containers/steps/environment.html.erb within layouts/application (11.9ms)
Rendered home/_user_dropdown.html.erb (5.6ms)
Read fragment views/tabs_and_title_records-2 (0.1ms)
Rendered home/_organization_dropdown.html.erb (5.8ms)
Rendered home/_location_dropdown.html.erb (8.5ms)
Rendered home/_org_switcher.html.erb (15.1ms)
Rendered home/_submenu.html.erb (4.9ms)
Rendered home/_submenu.html.erb (3.6ms)
Rendered home/_submenu.html.erb (5.8ms)
Rendered home/_submenu.html.erb (4.8ms)
Rendered home/_submenu.html.erb (4.6ms)
Rendered home/_submenu.html.erb (5.9ms)
Write fragment views/tabs_and_title_records-2 (1.4ms)
Rendered home/_topbar.html.erb (57.5ms)
Rendered layouts/base.html.erb (59.7ms)
Completed 200 OK in 186ms (Views: 72.6ms | ActiveRecord: 8.3ms)

#5 Updated by Dmitri Dolguikh over 7 years ago

Could you document which options you used in each of the steps of the wizard? I assume starting a container using docker directly works ok?

#6 Updated by Olivier Cruilles over 7 years ago

Hello,

We use a server configured to run Foreman 1.7.2. Docker is installed on the same server.
Some images are available directly on the server.

In foreman, I go into the menu: New Container

Preliminary panel:
Deploy on: I use a remote machine with coreos installed on.

Image panel:
External Registry
- Registry: "Our proper internal registry"
- Search: "centos"
- Tag: "latest"

Configuration panel:
- Basic options:
- Name: my_container
- Command: /bin/ping theforman.org
- Entrypoint:

- Compute options
- CPU sets
- CPU shares
- Memory

Environment variables:

- Shell
- TTY: no selected
- Attach STDIN: selected
- Attach STDOUT: selected
- Attach STDERR: selected

That is all. Do you need more informations ?

Thank you

#7 Updated by Dmitri Dolguikh over 7 years ago

Could you enable debug logging and send the output and send that? To enable it, in /usr/share/foreman/config/environments/production.rb, add/uncomment: "config.log_level = :debug" somewhere within "Foreman::Application.configure do |app|" block.

(http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging)

#8 Updated by Olivier Cruilles over 7 years ago

Hello,

This is the debug log:

Started PUT "/wizard_states/12/steps/environment" for 10.100.21.48 at 2015-03-03 10:00:28 -0500
Processing by Containers::StepsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"Xo/4pi58Hl5+tsHlkyy1JjzasTHSYLyB02BfhmcxpsI=", "docker_container_wizard_states_environment"=>{"tty"=>"0", "attach_stdin"=>"1", "attach_stdout"=>"1", "attach_stderr"=>"1"}, "wizard_state_id"=>"12", "id"=>"environment"}
  User Load (0.2ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1
Setting current user thread-local variable to ocruilles
  Setting Load (0.7ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'authorize_login_delegation' ORDER BY name LIMIT 1
  Setting Load (0.4ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'idle_timeout' ORDER BY name LIMIT 1
   (0.1ms)  SELECT COUNT(*) FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization')
Setting current organization thread-local variable to none
   (0.1ms)  SELECT COUNT(*) FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location')
Setting current location thread-local variable to none
  AuthSource Load (0.1ms)  SELECT `auth_sources`.* FROM `auth_sources` WHERE `auth_sources`.`id` = 1 LIMIT 1
   (0.1ms)  SELECT id FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') LIMIT 1
   (0.1ms)  SELECT id FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization') LIMIT 1
  DockerContainerWizardState Load (0.1ms)  SELECT `docker_container_wizard_states`.* FROM `docker_container_wizard_states` WHERE `docker_container_wizard_states`.`id` = 12 LIMIT 1
  DockerContainerWizardStates::Environment Load (0.1ms)  SELECT `docker_container_wizard_states_environments`.* FROM `docker_container_wizard_states_environments` WHERE `docker_container_wizard_states_environments`.`docker_container_wizard_state_id` = 12 LIMIT 1
   (0.1ms)  BEGIN
   (0.1ms)  COMMIT
   (0.1ms)  BEGIN
  SQL (0.4ms)  INSERT INTO `docker_container_wizard_states_environments` (`attach_stderr`, `attach_stdin`, `attach_stdout`, `created_at`, `docker_container_wizard_state_id`, `tty`, `updated_at`) VALUES (1, 1, 1, '2015-03-03 15:00:28', 12, 0, '2015-03-03 15:00:28')
   (3.9ms)  COMMIT
   (0.1ms)  BEGIN
   (0.1ms)  COMMIT
   (0.1ms)  BEGIN
  DockerContainerWizardStates::Image Load (0.4ms)  SELECT `docker_container_wizard_states_images`.* FROM `docker_container_wizard_states_images` WHERE `docker_container_wizard_states_images`.`docker_container_wizard_state_id` = 12 LIMIT 1
  DockerContainerWizardStates::Configuration Load (0.4ms)  SELECT `docker_container_wizard_states_configurations`.* FROM `docker_container_wizard_states_configurations` WHERE `docker_container_wizard_states_configurations`.`docker_container_wizard_state_id` = 12 LIMIT 1
  DockerContainerWizardStates::Preliminary Load (0.4ms)  SELECT `docker_container_wizard_states_preliminaries`.* FROM `docker_container_wizard_states_preliminaries` WHERE `docker_container_wizard_states_preliminaries`.`docker_container_wizard_state_id` = 12 LIMIT 1
  DockerContainerWizardState Load (0.4ms)  SELECT `docker_container_wizard_states`.* FROM `docker_container_wizard_states` WHERE `docker_container_wizard_states`.`id` = 12 LIMIT 1
  DockerContainerWizardStates::Environment Load (0.4ms)  SELECT `docker_container_wizard_states_environments`.* FROM `docker_container_wizard_states_environments` WHERE `docker_container_wizard_states_environments`.`docker_container_wizard_state_id` IN (12)
  DockerContainerWizardStates::EnvironmentVariable Load (1.0ms)  SELECT `parameters`.* FROM `parameters` WHERE `parameters`.`type` IN ('DockerContainerWizardStates::EnvironmentVariable') AND `parameters`.`reference_id` IN (23) ORDER BY parameters.name
  Taxonomy Load (1.2ms)  SELECT `taxonomies`.* FROM `taxonomies` INNER JOIN `taxable_taxonomies` ON `taxonomies`.`id` = `taxable_taxonomies`.`taxonomy_id` WHERE `taxable_taxonomies`.`taxable_id` = 12 AND `taxable_taxonomies`.`taxable_type` = 'DockerContainerWizardStates::Preliminary' AND (taxonomies.type='Location') ORDER BY title
  Taxonomy Load (0.7ms)  SELECT `taxonomies`.* FROM `taxonomies` INNER JOIN `taxable_taxonomies` ON `taxonomies`.`id` = `taxable_taxonomies`.`taxonomy_id` WHERE `taxable_taxonomies`.`taxable_id` = 12 AND `taxable_taxonomies`.`taxable_type` = 'DockerContainerWizardStates::Preliminary' AND (taxonomies.type='Organization') ORDER BY title
  ComputeResource Load (0.1ms)  SELECT `compute_resources`.* FROM `compute_resources` WHERE `compute_resources`.`id` = 27 ORDER BY compute_resources.name LIMIT 1
  DockerRegistry Load (0.1ms)  SELECT `docker_registries`.* FROM `docker_registries` WHERE `docker_registries`.`id` = 1 LIMIT 1
Creating docker image with the following options: {:fromImage=>"docker-registry.tritondigital.com:443/centos:latest"}
Fog error: Must have id, got: {"id"=>nil, :headers=>{}}
 /opt/rh/ruby193/root/usr/share/gems/gems/docker-api-1.17.0/lib/docker/base.rb:16:in `initialize'
 /opt/rh/ruby193/root/usr/share/gems/gems/docker-api-1.17.0/lib/docker/image.rb:110:in `new'
 /opt/rh/ruby193/root/usr/share/gems/gems/docker-api-1.17.0/lib/docker/image.rb:110:in `create'
 /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/models/foreman_docker/docker.rb:86:in `block in create_image'
 /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/models/foreman_docker/docker.rb:117:in `docker_command'
 /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/models/foreman_docker/docker.rb:85:in `create_image'
 /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/models/service/containers.rb:32:in `pull_image'
 /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/models/service/containers.rb:23:in `block in start_container!'
 /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
 /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
 /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/models/service/containers.rb:8:in `start_container!'
 /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/controllers/containers/steps_controller.rb:46:in `create_container'
 /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/controllers/containers/steps_controller.rb:19:in `update'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:637:in `block (3 levels) in _run__1682588381435761475__process_action__1972113631983154074__callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7545'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_1831'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7545'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:603:in `block (2 levels) in _run__1682588381435761475__process_action__1972113631983154074__callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7544'
 /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7544'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:437:in `block in _run__1682588381435761475__process_action__1972113631983154074__callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7543'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7543'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:425:in `_run__1682588381435761475__process_action__1972113631983154074__callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
 /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
 /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
 /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__4260731845008975693__call__3275843228187479108__callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app'
 /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/quiet_assets-1.0.2/lib/quiet_assets.rb:18:in `call_with_quiet_assets'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
 /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
 /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
 /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
 /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
 /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
   (0.2ms)  ROLLBACK
Failed to save: 
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/views/foreman_docker/common_parameters/_environment_variable.html.erb (1.8ms)
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/views/containers/steps/_form_buttons.html.erb (1.0ms)
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/views/containers/steps/_title.html.erb (13.1ms)
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0/app/views/containers/steps/environment.html.erb within layouts/application (13.7ms)
  Setting Load (0.5ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'use_gravatar' ORDER BY name LIMIT 1
  Rendered home/_user_dropdown.html.erb (6.6ms)
Read fragment views/tabs_and_title_records-2 (0.1ms)
   (0.1ms)  SELECT COUNT(*) FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization')
  Organization Load (0.1ms)  SELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization') ORDER BY title
  Rendered home/_organization_dropdown.html.erb (6.7ms)
   (0.1ms)  SELECT COUNT(*) FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location')
  Location Load (0.1ms)  SELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') ORDER BY title
  Rendered home/_location_dropdown.html.erb (9.0ms)
  Rendered home/_org_switcher.html.erb (16.5ms)
  Rendered home/_submenu.html.erb (5.0ms)
  Rendered home/_submenu.html.erb (3.7ms)
  Rendered home/_submenu.html.erb (5.9ms)
  Rendered home/_submenu.html.erb (4.9ms)
  Rendered home/_submenu.html.erb (4.7ms)
  Rendered home/_submenu.html.erb (6.1ms)
Write fragment views/tabs_and_title_records-2 (1.5ms)
  Rendered home/_topbar.html.erb (61.3ms)
  Rendered layouts/base.html.erb (63.9ms)
Completed 200 OK in 437ms (Views: 79.2ms | ActiveRecord: 15.8ms)

#9 Updated by Dmitri Dolguikh over 7 years ago

It seems there's an issue with docker creating an image... Have you checked docker host logs? Anything interesting in there?

#10 Updated by Olivier Cruilles over 7 years ago

Yes, exact.

This is the docker log in debug mode:

time="2015-03-03T11:10:11-05:00" level="debug" msg="Calling POST /images/create"
time="2015-03-03T11:10:11-05:00" level="info" msg="POST /v1.15/images/create?fromImage=our-docker-registry-server.compagny.com%3A443%2Fcentos%3Alatest"
time="2015-03-03T11:10:11-05:00" level="info" msg="+job pull(our-docker-registry-server.compagny.com:443/centos, latest)"
time="2015-03-03T11:10:11-05:00" level="debug" msg="hostDir: /etc/docker/certs.d/our-docker-registry-server.compagny.com:443"
time="2015-03-03T11:10:11-05:00" level="debug" msg="Error unmarshalling the _ping RegistryInfo: json: cannot unmarshal bool into Go value of type registry.RegistryInfo"
time="2015-03-03T11:10:11-05:00" level="debug" msg="RegistryInfo.Version: \"\""
time="2015-03-03T11:10:11-05:00" level="debug" msg="Registry standalone header: 'True'"
time="2015-03-03T11:10:11-05:00" level="debug" msg="RegistryInfo.Standalone: true"
time="2015-03-03T11:10:11-05:00" level="debug" msg="hostDir: /etc/docker/certs.d/our-docker-registry-server.compagny.com:443"
time="2015-03-03T11:10:11-05:00" level="debug" msg="Error unmarshalling the _ping RegistryInfo: json: cannot unmarshal bool into Go value of type registry.RegistryInfo"
time="2015-03-03T11:10:11-05:00" level="debug" msg="RegistryInfo.Version: \"\""
time="2015-03-03T11:10:11-05:00" level="debug" msg="Registry standalone header: 'True'"
time="2015-03-03T11:10:11-05:00" level="debug" msg="RegistryInfo.Standalone: true"
time="2015-03-03T11:10:11-05:00" level="debug" msg="Endpoint https://our-docker-registry-server.compagny.com:443/v1/ is eligible for private registry registry. Enabling decorator."
time="2015-03-03T11:10:11-05:00" level="debug" msg="[registry] Calling GET https://our-docker-registry-server.compagny.com:443/v1/repositories/centos/images"
time="2015-03-03T11:10:11-05:00" level="debug" msg="https://our-docker-registry-server.compagny.com:443/v1/repositories/centos/images -- HEADERS: map[User-Agent:[docker/1.4.1 go/go1.3.3 kernel/2.6.32-504.8.1.el6.x86_64 os/linux arch/amd64] Authorization:[Basic Og==]]"
time="2015-03-03T11:10:11-05:00" level="debug" msg="hostDir: /etc/docker/certs.d/our-docker-registry-server.compagny.com:443"
HTTP code: 403
time="2015-03-03T11:10:11-05:00" level="info" msg="-job pull(our-docker-registry-server.compagny.com:443/centos, latest) = ERR (1)"

Parameters of our registry server:
- We built in internal a docker registry server with Valid SSL certificate and not with auto-generated certificate, plus a valid account to login in.

#11 Updated by Dmitri Dolguikh over 7 years ago

There could be an issue with the self-signed certificate, pls. see this thread: https://github.com/docker/docker/issues/8849. I'm also not sure if the 403 response you are getting is related to the certificate or indicative of another issue with the configuration. You should probably resolve external registry configuration issues before continuing with foreman-docker. If you haven't done so already, I'd suggest trying to use the stock cli, or trying #docker on freenode.

I'm going to keep this open for a little while -- I'm going to look if we can handle the failure you are seeing either in our code, or in docker-api gem.

#12 Updated by Dmitri Dolguikh over 7 years ago

I submitted a bug with the docker team (https://github.com/docker/docker/issues/11176), we'll see what their response is going to be...

#13 Updated by Tomer Brisker over 6 years ago

  • Status changed from Need more information to Rejected

Seems to be an issue with the external registry configuration and not with Foreman. No new activity in a year. Closing, feel free to reopen if you feel this should be fixed by Foreman.

Also available in: Atom PDF