Project

General

Profile

Bug #22560

Error while creating centos container on docker compute resource

Added by Nikhil Kathole over 4 years ago. Updated over 3 years ago.

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

Description

while creating centos container on docker compute resource, once clicked on submit, it gives traceback as wrong number of arguments (given 1, expected 0)

15:16:33 rails.1   | ::1 - - [12/Feb/2018:15:16:30 UTC] "GET /image_search/2/search_repository?registry=hub&search=centos&registr
y_id= HTTP/1.1" 304 0
15:16:33 rails.1   | https://192.168.121.86/wizard_states/5/steps/image -> /image_search/2/search_repository?registry=hub&search=
centos&registry_id=
15:16:34 rails.1   | 2018-02-12T15:16:34 6c34a511 [notifications] [D] Cache Hit: notification, reading cache for notification-4
15:16:34 rails.1   | ::1 - - [12/Feb/2018:15:16:34 UTC] "GET /notification_recipients HTTP/1.1" 304 0
15:16:34 rails.1   | https://192.168.121.86/wizard_states/5/steps/image -> /notification_recipients
15:16:39 rails.1   | ::1 - - [12/Feb/2018:15:16:35 UTC] "GET /image_search/2/search_repository?registry=hub&search=centos&registr
y_id= HTTP/1.1" 200 1785
15:16:39 rails.1   | https://192.168.121.86/wizard_states/5/steps/image -> /image_search/2/search_repository?registry=hub&search=
centos&registry_id=
15:16:39 rails.1   | ::1 - - [12/Feb/2018:15:16:35 UTC] "GET /image_search/2/search_repository?registry=hub&search=centos%3A&regi
stry_id=&tags=true HTTP/1.1" 304 0
15:16:39 rails.1   | https://192.168.121.86/wizard_states/5/steps/image -> /image_search/2/search_repository?registry=hub&search=
centos%3A&registry_id=&tags=true
15:16:44 rails.1   | ::1 - - [12/Feb/2018:15:16:41 UTC] "GET /image_search/2/search_repository?registry=hub&search=centos%3Alates
t&registry_id=&tags=true HTTP/1.1" 200 37
15:16:44 rails.1   | https://192.168.121.86/wizard_states/5/steps/image -> /image_search/2/search_repository?registry=hub&search=
centos%3Alatest&registry_id=&tags=true
15:16:44 rails.1   | 2018-02-12T15:16:44 6d43b01a [notifications] [D] Cache Hit: notification, reading cache for notification-4
15:16:44 rails.1   | ::1 - - [12/Feb/2018:15:16:44 UTC] "GET /notification_recipients HTTP/1.1" 304 0
15:16:44 rails.1   | https://192.168.121.86/wizard_states/5/steps/image -> /notification_recipients
15:16:49 rails.1   | ::1 - - [12/Feb/2018:15:16:46 UTC] "POST /wizard_states/5/steps/image HTTP/1.1" 302 124
15:16:49 rails.1   | https://192.168.121.86/wizard_states/5/steps/image -> /wizard_states/5/steps/image
15:16:49 rails.1   | ::1 - - [12/Feb/2018:15:16:49 UTC] "GET /wizard_states/5/steps/configuration HTTP/1.1" 200 33747
15:16:49 rails.1   | https://192.168.121.86/wizard_states/5/steps/image -> /wizard_states/5/steps/configuration
15:16:50 rails.1   | 2018-02-12T15:16:50 b3fb5998 [notifications] [D] Cache Hit: notification, reading cache for notification-4
15:16:50 rails.1   | ::1 - - [12/Feb/2018:15:16:50 UTC] "GET /notification_recipients HTTP/1.1" 304 0
15:16:50 rails.1   | https://192.168.121.86/wizard_states/5/steps/configuration -> /notification_recipients
15:16:52 rails.1   | ::1 - - [12/Feb/2018:15:16:52 UTC] "POST /wizard_states/5/steps/configuration HTTP/1.1" 302 122
15:16:52 rails.1   | https://192.168.121.86/wizard_states/5/steps/configuration -> /wizard_states/5/steps/configuration
15:16:53 rails.1   | ::1 - - [12/Feb/2018:15:16:52 UTC] "GET /wizard_states/5/steps/environment HTTP/1.1" 200 38926
15:16:53 rails.1   | https://192.168.121.86/wizard_states/5/steps/configuration -> /wizard_states/5/steps/environment
15:16:54 rails.1   | 2018-02-12T15:16:54 014bef84 [notifications] [D] Cache Hit: notification, reading cache for notification-4
15:16:54 rails.1   | ::1 - - [12/Feb/2018:15:16:54 UTC] "GET /notification_recipients HTTP/1.1" 304 0
15:16:54 rails.1   | https://192.168.121.86/wizard_states/5/steps/environment -> /notification_recipients
15:17:04 rails.1   | 2018-02-12T15:17:04 8ff7fe79 [notifications] [D] Cache Hit: notification, reading cache for notification-4
15:17:04 rails.1   | ::1 - - [12/Feb/2018:15:17:04 UTC] "GET /notification_recipients HTTP/1.1" 304 0
15:17:04 rails.1   | https://192.168.121.86/wizard_states/5/steps/environment -> /notification_recipients
15:17:14 rails.1   | 2018-02-12T15:17:14 11dbaccd [app] [F]
15:17:14 rails.1   | 2018-02-12T15:17:14 11dbaccd [app] [F] ArgumentError (wrong number of arguments (given 1, expected 0)):
15:17:14 rails.1   | 2018-02-12T15:17:14 11dbaccd [app] [F]
15:17:14 rails.1   | 2018-02-12T15:17:14 11dbaccd [app] [F] foreman_docker (4.0.0) app/models/service/containers.rb:77:in `destroy_wizard_state'
15:17:14 rails.1   |  | foreman_docker (4.0.0) app/models/service/containers.rb:12:in `block in start_container!'
15:17:14 rails.1   |  | foreman_docker (4.0.0) app/models/service/containers.rb:8:in `start_container!'
15:17:14 rails.1   |  | foreman_docker (4.0.0) app/controllers/containers/steps_controller.rb:76:in `create_container'
15:17:14 rails.1   |  | foreman_docker (4.0.0) app/controllers/containers/steps_controller.rb:22:in `update'
15:17:14 rails.1   |  | app/controllers/concerns/application_shared.rb:15:in `set_timezone'
15:17:14 rails.1   |  | app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
15:17:14 rails.1   |  | app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
15:17:14 rails.1   |  | lib/middleware/catch_json_parse_errors.rb:8:in `call'
15:17:14 rails.1   |  | lib/middleware/session_safe_logging.rb:17:in `call'
15:17:14 rails.1   |  | lib/middleware/tagged_logging.rb:18:in `call'
15:17:14 rails.1   |  | /home/vagrant/katello/lib/katello/prevent_json_parsing.rb:12:in `call'
15:17:14 rails.1   | 2018-02-12T15:17:14 86d820b9 [notifications] [D] Cache Hit: notification, reading cache for notification-4
15:17:14 rails.1   | ::1 - - [12/Feb/2018:15:17:14 UTC] "GET /notification_recipients HTTP/1.1" 304 0
15:17:14 rails.1   | https://192.168.121.86/wizard_states/5/steps/environment -> /notification_recipients
15:17:14 rails.1   | ::1 - - [12/Feb/2018:15:16:58 UTC] "POST /wizard_states/5/steps/environment HTTP/1.1" 500 117023
15:17:14 rails.1   | https://192.168.121.86/wizard_states/5/steps/environment -> /wizard_states/5/steps/environment

Screenshot from 2018-02-12 20-51-59.png View Screenshot from 2018-02-12 20-51-59.png 86.3 KB screenshot after clicking submit Nikhil Kathole, 02/12/2018 03:23 PM
Screenshot%20from%202018 02 12%2020 51 59

History

#1 Updated by Marek Hulán about 4 years ago

  • Description updated (diff)

#2 Updated by Nicolas Odermatt over 3 years ago

I know this is an old issue, nevertheless I wanted to give some input.
The creation seemed to work fine on Foreman 1.19.1 and docker plugin 4.1.0 and latest centos. However, docker containers stop after they're done executing - did you add a command to the container on step 3?

Also, make sure to select the "run" checkbox in step 4 otherwise the container won't start. I encountered this problem and documented here: https://community.theforeman.org/t/foreman-docker-plugin-setup-help/12796

2019-02-08T15:31:42 [I|app|] Started PUT "/wizard_states/10/steps/environment" for 10.223.10.120 at 2019-02-08 15:31:42 +0100
2019-02-08T15:31:42 [I|app|3aede] Processing by Containers::StepsController#update as HTML
2019-02-08T15:31:42 [I|app|3aede] Parameters: {"utf8"=>"✓", "authenticity_token"=>"KKc/oDtqdEZ/BHDJbdCf404j/fBi4d5jVIubegYX5d7c/c2GW90mbOdaZE+XqpTv+esFrBZ71FM3ZR4X0SRZqA==", "docker_container_wizard_states_environment"=>{"tty"=>"0", "attach_stdin"=>"1", "attach_stdout"=>"1", "attach_stderr"=>"1"}, "start_on_create"=>"1", "button"=>"", "wizard_state_id"=>"10", "id"=>"environment"}
2019-02-08T15:31:42 [I|app|3aede] Current user set to admin (admin)
2019-02-08T15:31:43 [I|app|] Started HEAD "/" for 10.35.146.64 at 2019-02-08 15:31:43 +0100
2019-02-08T15:31:43 [I|app|31384] Processing by DashboardController#index as */*
2019-02-08T15:31:43 [I|app|31384] Redirected to https://10.35.146.142/users/login
2019-02-08T15:31:43 [I|app|31384] Filter chain halted as :require_login rendered or redirected
2019-02-08T15:31:43 [I|app|31384] Completed 302 Found in 8ms (ActiveRecord: 1.4ms)
2019-02-08T15:31:45 [I|app|] Started GET "/notification_recipients" for 10.223.10.120 at 2019-02-08 15:31:45 +0100
2019-02-08T15:31:45 [I|app|8fbc6] Processing by NotificationRecipientsController#index as JSON
2019-02-08T15:31:45 [I|app|8fbc6] Current user set to admin (admin)
2019-02-08T15:31:45 [I|app|8fbc6] Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.5ms)
2019-02-08T15:31:53 [I|app|3aede] Redirected to https://server0142.cs.technik.fhnw.ch/containers/5
2019-02-08T15:31:53 [I|app|3aede] Completed 302 Found in 11162ms (ActiveRecord: 14.3ms)
2019-02-08T15:31:53 [I|app|] Started GET "/containers/5" for 10.223.10.120 at 2019-02-08 15:31:53 +0100
2019-02-08T15:31:53 [I|app|e829d] Processing by ContainersController#show as HTML
2019-02-08T15:31:53 [I|app|e829d] Parameters: {"id"=>"5"}
2019-02-08T15:31:53 [I|app|e829d] Current user set to admin (admin)
2019-02-08T15:31:53 [I|app|e829d] Rendering vendor/ruby/2.3.0/gems/foreman_docker-4.1.0/app/views/containers/show.html.erb within layouts/application
2019-02-08T15:31:54 [I|app|e829d] Rendered vendor/ruby/2.3.0/gems/foreman_docker-4.1.0/app/views/containers/show.html.erb within layouts/application (1337.8ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered layouts/_application_content.html.erb (1.4ms)
2019-02-08T15:31:54 [I|app|e829d] Rendering layouts/base.html.erb
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_org_switcher.html.erb (0.1ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_user_dropdown.html.erb (1.0ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_topbar.html.erb (1.9ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_vertical_menu.html.erb (2.0ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_vertical_menu.html.erb (0.9ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_vertical_menu.html.erb (2.0ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_vertical_menu.html.erb (2.1ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_vertical_menu.html.erb (1.6ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_vertical_menu.html.erb (1.6ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_vertical_menu.html.erb (0.6ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered home/_navbar.html.erb (13.0ms)
2019-02-08T15:31:54 [I|app|e829d] Rendered layouts/base.html.erb (17.4ms)
2019-02-08T15:31:54 [I|app|e829d] Completed 200 OK in 1363ms (Views: 1356.6ms | ActiveRecord: 2.5ms)
2019-02-08T15:31:54 [I|app|] Started GET "/javascripts/locale/en/app.js" for 10.223.10.120 at 2019-02-08 15:31:54 +0100

Feel free to add details about the version you're using.

#3 Updated by Nikhil Kathole over 3 years ago

Thanks for looking into it. Yea, I checked with foreman-1.20.1.10-1.el7sat.noarch and tfm-rubygem-foreman_docker-4.1.0-2.el7sat.noarch. This issue is fixed. Feel free to close.

Also available in: Atom PDF