Bug #31645
closedFeature #30440: Simple & automatic host registration WF
Global registration fails with Validation failed: Name can't be blank
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1900694
Description of problem:
Attempting to register host via global registration fails on hosts
ERROR: Validation failed: Name can't be blank, Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123
The curl command:
curl -k -X GET "https://myhg.redhat.com:9090/register?host_group_id=1&location_id=2&operatingsystem_id=1&organization_id=1&setup_insights=true&smart_proxy=1&activation_key=mykey" -H 'Authorization: Bearer ey...VvSI' | bash
Production log excerpt:
2020-11-23T15:21:20 [I|app|4851439e] Started POST "/register?url=https%3A%2F%2Fmyhostname.redhat.com%3A9090" for 2620:52:0:2598:224:e8ff:fe4a:b245 at 2020-11-23 15:21:20 +0100
2020-11-23T15:21:20 [I|app|4851439e] Processing by Api::V2::RegistrationController#host as HTML
2020-11-23T15:21:20 [I|app|4851439e] Parameters: {"host"=>{"organization_id"=>"1", "location_id"=>"2"}, "setup_insights"=>"true", "url"=>"https://myhostname.redhat.com:9090"}
2020-11-23T15:21:20 [I|app|4851439e] Authorized user admin(Admin User)
2020-11-23T15:21:20 [D|app|4851439e] Post-login processing for admin
2020-11-23T15:21:20 [D|tax|4851439e] Current location set to none
2020-11-23T15:21:20 [D|tax|4851439e] Current organization set to none
2020-11-23T15:21:20 [D|tax|4851439e] Current location set to none
2020-11-23T15:21:20 [D|tax|4851439e] Current organization set to none
2020-11-23T15:21:20 [D|app|4851439e] Unpermitted parameters: :setup_insights, :url
2020-11-23T15:21:20 [D|app|4851439e] Unpermitted parameters: :setup_insights, :url
2020-11-23T15:21:20 [D|app|4851439e] Unpermitted parameters: :setup_insights, :url
2020-11-23T15:21:20 [W|app|4851439e] Not queueing Host::Managed: ["Name can't be blank", "Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-11-23T15:21:20 [W|app|4851439e] Not queueing Host::Managed: ["Name can't be blank", "Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-11-23T15:21:20 [W|app|4851439e] Not queueing Host::Managed: ["Name can't be blank", "Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-11-23T15:21:20 [W|app|4851439e] Not queueing Discovery reboot: Name can't be blank and Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123
2020-11-23T15:21:20 [I|app|4851439e] Rendering text template
2020-11-23T15:21:20 [I|app|4851439e] Rendered text template (Duration: 0.0ms | Allocations: 2)
2020-11-23T15:21:20 [I|app|4851439e] Completed 422 Unprocessable Entity in 71ms (Views: 0.4ms | ActiveRecord: 43.4ms | Allocations: 18883)
Version-Release number of selected component (if applicable):
Satellite 6.9 snap 2
How reproducible:
always