Project

General

Profile

Actions

Bug #36208

open

Error setting up provisioning

Added by xevilstar linux about 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Difficulty:
hard
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Dear Maintainers

I am setting up provisioning using the web interface,
I compile the form and I launch

foreman-installer \
--enable-foreman-proxy \
--foreman-proxy-tftp=true \
--foreman-proxy-tftp-servername=my.server.name \
--foreman-proxy-dhcp=true \
--foreman-proxy-dhcp-interface=ens32 \
--foreman-proxy-dhcp-gateway=my.gw.ip.address \
--foreman-proxy-dhcp-nameservers="8.8.8.8,8.8.4.4" \
--foreman-proxy-dns=true \
--foreman-proxy-dns-interface=ens32 \
--foreman-proxy-dns-zone=smart-com.local \
--foreman-proxy-dns-reverse=5.168.192.in-addr.arpa \
--foreman-proxy-dns-forwarders= ns1.local.net\
--foreman-proxy-dns-forwarders=ns2.local.net \
--foreman-proxy-dns-forwarders=8.8.8.8 \
--foreman-proxy-dns-forwarders=8.8.4.4 \
--foreman-proxy-oauth-consumer-key=<obscured super secret key> \
--foreman-proxy-oauth-consumer-secret=<obscured super secret key>

I wait for it to finish and it finishes successfully

Then I click on next and I get

Oops, we're sorry but something went wrong undefined method `value' for nil:NilClass

HOSTNAME: my-puppet.domain.local
OS: debian
RELEASE: 11.6
FOREMAN: 3.7.0-develop
RUBY: ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]
PUPPET: 7.23.0

where can I send my 33M foreman-debug-dmYvU.tar.xz.gz ?

foreman-rake errors:fetch_log request_id=c91c47ba
Foreman version: 3.7.0-develop
Plugins:
- foreman-tasks 7.2.1
- foreman_bootdisk 21.0.4
- foreman_dhcp_browser 0.0.8
- foreman_monitoring 3.0.0
- foreman_puppet 5.1.1
- foreman_remote_execution 9.1.0
- foreman_salt 15.1.0
- foreman_setup 8.0.1
- foreman_statistics 2.0.1
- foreman_templates 9.3.0

2023-03-20T15:04:41 [I|app|c91c47ba] Started POST "/foreman_setup/provisioners/1/step4" for 192.168.5.254 at 2023-03-20 15:04:41 0100
2023-03-20T15:04:41 [I|app|c91c47ba] Processing by ForemanSetup::ProvisionersController#step4 as HTML
2023-03-20T15:04:41 [I|app|c91c47ba] Parameters: {"authenticity_token"=>"/Gi69UAkQCmW9fxu1sXKLNq5EFrDtrNARuZ
/DxEOGjYVABVIKsJNWwRqmnGcvAiMGSV9y0ZO76Si36WlnyNUg==", "id"=>"1"}
2023-03-20T15:04:41 [I|aud|c91c47ba] Hostgroup (1) update event on subnet_id , 1
2023-03-20T15:04:42 [I|aud|c91c47ba] Subnet (1) update event on dhcp_id , 1
2023-03-20T15:04:42 [I|aud|c91c47ba] Subnet (1) update event on tftp_id , 1
2023-03-20T15:04:42 [I|aud|c91c47ba] Subnet (1) update event on dns_id , 1
2023-03-20T15:04:42 [W|app|c91c47ba] undefined method `value' for nil:NilClass
2023-03-20T15:04:42 [I|app|c91c47ba] Backtrace for 'undefined method `value' for nil:NilClass' error (NoMethodError): undefined method `value' for nil:NilClass
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/foreman_setup-8.0.1/app/controllers/foreman_setup/provisioners_controller.rb:95:in `step4'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/abstract_controller/base.rb:228:in `process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_controller/metal/rendering.rb:30:in `process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
c91c47ba | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
c91c47ba | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
c91c47ba | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/audited-5.3.2/lib/audited/sweeper.rb:16:in `around'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/audited-5.3.2/lib/audited/sweeper.rb:16:in `around'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:137:in `run_callbacks'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/abstract_controller/callbacks.rb:41:in `process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_controller/metal/rescue.rb:22:in `process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activerecord-6.1.7.3/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/abstract_controller/base.rb:165:in `process'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionview-6.1.7.3/lib/action_view/rendering.rb:39:in `process'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_controller/metal.rb:190:in `dispatch'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_controller/metal.rb:254:in `dispatch'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:33:in `serve'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:50:in `block in serve'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:32:in `each'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:32:in `serve'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:842:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/apipie-dsl-2.5.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/static_dispatcher.rb:68:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/extractor/recorder.rb:137:in `call'
c91c47ba | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
c91c47ba | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/tempfile_reaper.rb:15:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/etag.rb:27:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/conditional_get.rb:40:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/head.rb:12:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/http/content_security_policy.rb:19:in `call'
c91c47ba | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/session/abstract/id.rb:266:in `context'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/session/abstract/id.rb:260:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/cookies.rb:697:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:98:in `run_callbacks'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/railties-6.1.7.3/lib/rails/rack/logger.rb:37:in `call_app'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/railties-6.1.7.3/lib/rails/rack/logger.rb:28:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
c91c47ba | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/request_id.rb:26:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/method_override.rb:24:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/runtime.rb:22:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/activesupport-6.1.7.3/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/sendfile.rb:110:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/ssl.rb:77:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/railties-6.1.7.3/lib/rails/engine.rb:539:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/railties-6.1.7.3/lib/rails/railtie.rb:207:in `public_send'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/railties-6.1.7.3/lib/rails/railtie.rb:207:in `method_missing'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/urlmap.rb:74:in `block in call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/urlmap.rb:58:in `each'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/rack-2.2.6.4/lib/rack/urlmap.rb:58:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/puma-5.6.5/lib/puma/configuration.rb:252:in `call'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/puma-5.6.5/lib/puma/request.rb:77:in `block in handle_request'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/puma-5.6.5/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/puma-5.6.5/lib/puma/request.rb:76:in `handle_request'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/puma-5.6.5/lib/puma/server.rb:443:in `process_client'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/puma-5.6.5/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
c91c47ba | /usr/share/foreman/vendor/ruby/2.7.0/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-03-20T15:04:42 [I|app|c91c47ba] Rendered common/500.html.erb within layouts/application (Duration: 4.5ms | Allocations: 1139)
2023-03-20T15:04:42 [I|app|c91c47ba] Rendered layouts/base.html.erb (Duration: 4.3ms | Allocations: 2347)
2023-03-20T15:04:42 [I|app|c91c47ba] Rendered layout layouts/application.html.erb (Duration: 9.5ms | Allocations: 3749)
2023-03-20T15:04:42 [I|app|c91c47ba] Completed 500 Internal Server Error in 581ms (Views: 10.8ms | ActiveRecord: 34.9ms | Allocations: 68660)

please help and thanks for your time.

Actions #1

Updated by xevilstar linux about 2 years ago

  • Assignee set to Brian Gupta
Actions #2

Updated by xevilstar linux about 2 years ago

  • Assignee changed from Brian Gupta to Leos Stejskal
Actions #3

Updated by Ewoud Kohl van Wijngaarden about 2 years ago

  • Project changed from Foreman to foreman_setup
  • Category deleted (Web Interface)
  • Assignee deleted (Leos Stejskal)
  • Priority changed from Immediate to Normal

Please don't assign people.

Looking at the specific error I think this is part of the foreman_setup plugin, specifically this line:

https://github.com/theforeman/foreman_setup/blob/6738145d266d72051dd8df0d03a4df748a6df9ec/app/controllers/foreman_setup/provisioners_controller.rb#L95

It can be either Facter which is undefined, or this is incompatible with the new Settings API in recent versions. I think the whole workaround is no longer needed.

The foreman_setup plugin is largely unmaintained now, so that's likely a problem in getting it fixed.

Actions #4

Updated by xevilstar linux about 2 years ago

Hello,

Sorry For the assign, I thought it was necessary, my fault.

That said how am I supposed to easily setup provisioning ?

Ewoud Kohl van Wijngaarden wrote:

Please don't assign people.

Looking at the specific error I think this is part of the foreman_setup plugin, specifically this line:

https://github.com/theforeman/foreman_setup/blob/6738145d266d72051dd8df0d03a4df748a6df9ec/app/controllers/foreman_setup/provisioners_controller.rb#L95

It can be either Facter which is undefined, or this is incompatible with the new Settings API in recent versions. I think the whole workaround is no longer needed.

The foreman_setup plugin is largely unmaintained now, so that's likely a problem in getting it fixed.

Actions

Also available in: Atom PDF