Project

General

Profile

Actions

Bug #10691

open

Foreman setup fails on step4_update with RHEL + Satellite

Added by Jamin Ragle almost 9 years ago. Updated almost 9 years ago.

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

Description

Greetings, Lukas (#lzap) Zapletal asked me to file this as he was able to replicate it. (via Foreman-users @ google groups)

When using foreman_setup on a brand new system, I get an error(below) on the last stage of the setup, just after entering the hostname of our Satellite server, the Satellite dropdown option and our corresponding rhn_activation key.

Much of the setup seems to occur, but the $activation_key seems to fail to make it into foreman. I can build a RHEL6.6 system, but it fails to register since the key is missing. This also prevents puppet from installing in the next stage as dependent software is missing. (my first idea of a workaround was to just have puppet register the host.)

If you have a workaround where I could enter the $activation_key into foreman manually, that would be great.

Feel free to contact me for additional details/testing.

Foreman version: 1.8.1 RHEL 6 x86_64 (rpm)
OS: RHEL6.6
URL: https://<foreman_server>/foreman_setup/provisioners/1/step4_update

Trace copied from web interface:

Oops, we're sorry but something went wrong
 Warning!Validation failed: Group parameters.reference parameters require an associated domain, operating system, host or host group

 ActiveRecord::RecordInvalid

 Validation failed: Group parameters.reference parameters require an associated domain, operating system, host or host group
 app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Corresponding chunk from the logs(default levels):

==> ../foreman/production.log <==
2015-06-02 15:55:37 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_setup-2.1.1/app/views/foreman_setup/provisioners/_step4.html.erb (21.7ms)
2015-06-02 15:55:37 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_setup-2.1.1/app/views/foreman_setup/provisioners/step4.html.erb within layouts/application (32.6ms)
2015-06-02 15:55:37 [I]   Rendered home/_user_dropdown.html.erb (1.9ms)
2015-06-02 15:55:37 [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2015-06-02 15:55:37 [I]   Rendered home/_topbar.html.erb (3.0ms)
2015-06-02 15:55:37 [I]   Rendered layouts/base.html.erb (4.9ms)
2015-06-02 15:55:37 [I] Completed 200 OK in 721ms (Views: 39.4ms | ActiveRecord: 16.1ms)
2015-06-02 15:56:24 [I] 

Started PUT "/foreman_setup/provisioners/1/step4_update" for <USER_IP> at 2015-06-02 15:56:24 -0600
2015-06-02 15:56:24 [I] Processing by ForemanSetup::ProvisionersController#step4_update as HTML
2015-06-02 15:56:24 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"<TOKEN>", "foreman_setup_provisioner"=>{"hostgroup_attributes"=>{"medium_id"=>"8", "id"=>"1"}, "create_medium"=>{"name"=>""}, "satellite_type"=>{"value"=>"[FILTERED]"}, "activation_key"=>{"value"=>"[FILTERED]"}}, "medium_type"=>"spacewalk", "spacewalk_hostname"=>"<RHN_SATELLITE_SERVER>", "commit"=>"Submit", "id"=>"1"}
2015-06-02 15:56:24 [W] Operation FAILED: Validation failed: Group parameters.reference parameters require an associated domain, operating system, host or host group
2015-06-02 15:56:24 [I]   Rendered common/500.html.erb within layouts/application (7.4ms)
2015-06-02 15:56:24 [I]   Rendered layouts/base.html.erb (1.9ms)
2015-06-02 15:56:24 [I] Completed 500 Internal Server Error in 165ms (Views: 18.5ms | ActiveRecord: 22.2ms)
2015-06-02 15:56:45 [I] 


Files

Screen Shot 2015-06-02 at 4.35.01 PM.png View Screen Shot 2015-06-02 at 4.35.01 PM.png 71.4 KB Error screenshot Jamin Ragle, 06/03/2015 11:55 AM
Actions #1

Updated by Jamin Ragle almost 9 years ago

Workaround: (results my vary, but this worked for me.)

  1. After the reported failure, navigate back to 'Hosts -> Operating Systems -> <Red Hat OS>'
  2. Edit the parameters of your Red Hat OS of choice and add the following:
  • spacewalk_type = site
  • spacewalk_host = <RHN SATELLITE FQDN>
  • activation_key = <ACTIVATION_KEY>

You should see that your generated kickstart for a new host now displays new code in the 'Red Hat Registration Snippet' section. You will see your activation key under 'Discovered Activation Key'(rhn_activation_key) and the Satellite server will be displayed under 'satellite_hostname' variable.

Actions

Also available in: Atom PDF