Bug 2238952

Summary: Discovery Provisioning fails as when we try to submit the host from customize host button
Product: Red Hat Satellite Reporter: addubey
Component: Discovery PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: addubey
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.14.0CC: ahumbe, gtalreja, iballou, jstloui9, lstejska, mjia, rlavi, saydas, zhunting
Target Milestone: 6.15.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman_discovery-23.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-23 17:14:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Hotfix RPM for Satellite 6.14.4 none

Description addubey 2023-09-14 14:17:03 UTC
Description of problem: Discovery Provisioning fails when we try to submit the host from the customize host button


Version-Release number of selected component (if applicable): 6.14.o snap 16


How reproducible: 100%


Steps to Reproduce:
1. Setup Discovery provisioning and have discovered hosts
2. Click on provision -> click on customize host -> Dont select the hostgroup
3. When the host page appears select the hostgroup and make sure the data is populated .
4. click on submit and the page is stuck there stopping it from moving forward

Actual results: Blank page


Expected results: Discovery provisioning should work with the host submission.


Additional info:

Parameters: {"utf8"=>"✓", "authenticity_token"=>"7H9fk79ScznM/lXbCQZ7r+ocCFYWEyuRxEclQ9KmtW6C3S7t1PZwlaG4eAM+rQEt+lD0KOclS3dH1iJIxnpeMQ==", "host"=>{"name"=>"mac566f6df501f4", "hostgroup_id"=>"1", "content_facet_attributes"=>{"content_source_id"=>"1", "lifecycle_environment_id"=>"9", "content_view_id"=>"10", "kickstart_repository_id"=>"7"}, "openscap_proxy_id"=>"", "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"56:6f:6d:f5:01:f4", "identifier"=>"ens3", "name"=>"mac566f6df501f4", "domain_id"=>"2", "subnet_id"=>"1", "ip"=>"10.1.5.66", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"5"}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "build"=>"1", "medium_id"=>"", "ptable_id"=>"142", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"1", "comment"=>"", "overwrite"=>"false"}, "media_selector"=>"synced_content", "id"=>"5"}
2023-09-14T04:37:59 [I|app|1941975c]   Rendered common/404.html.erb within layouts/application (Duration: 7.2ms | Allocations: 6561)
2023-09-14T04:37:59 [I|app|1941975c]   Rendered layouts/base.html.erb (Duration: 10.7ms | Allocations: 18713)
2023-09-14T04:37:59 [I|app|1941975c]   Rendered layout layouts/application.html.erb (Duration: 25.5ms | Allocations: 37858)
2023-09-14T04:37:59 [I|app|1941975c] Completed 404 Not Found in 39ms (Views: 26.1ms | ActiveRecord: 2.4ms | Allocations: 41788)
2023-09-14T04:38:02 [I|app|67a5c918] Started GET "/javascripts/foreman_virt_who_configure/locale/en/foreman_virt_who_configure.js?_=1694680632194" for 10.74.18.98 at 2023-09-14 04:38:02 -0400
2023-09-14T04:38:02 [F|app|67a5c918]   
 67a5c918 | ActionController::RoutingError (No route matches [GET] "/javascripts/foreman_virt_who_configure/locale/en/foreman_virt_who_configure.js"):
 67a5c918 |   
 67a5c918 | lib/foreman/middleware/logging_context_request.rb:11:in `call'
 67a5c918 | katello (4.9.0.16) lib/katello/prevent_json_parsing.rb:12:in `call'

Comment 2 Leos Stejskal 2023-09-15 10:58:31 UTC
This issue is not a 6.14 regression, I was able to reproduce it on 6.13 as well.

Comment 4 Brad Buckingham 2023-10-30 11:29:29 UTC
Bulk setting Target Milestone = 6.15.0 where sat-6.15.0+ is set.

Comment 5 addubey 2024-01-04 10:02:36 UTC
Verified 

Tested on: Satellite 6.15.0 snap 3

Steps followed:

1. Setup Discovery provisioning and have discovered hosts
2. Click on provision -> click on customize host -> Dont select the host group
3. When the host page appears select the hostgroup and make sure the data is populated.
4. Click on submit.

Observation:
Discovery provisioning works with the host submission.

Additional info : (Tried these possible cases as well)

1. Auto-provisioning.
2. Directly create a host post by clicking on the provision button
3. Don't select the host group and click on the create host button, fails for the validation of the required params which is expected but setting everything from there makes sense and works.
4. Select the host group click on the customize button, and click on submit validating the data is populated.
5. Dont Select the host group click on the customize button, and click on submit validating the data is populated.

Comment 6 matt jia 2024-03-20 22:36:31 UTC
*** Bug 2268544 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2024-04-23 17:14:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.15.0 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2024:2010

Comment 10 Ian Ballou 2024-05-03 14:35:58 UTC
Created attachment 2031135 [details]
Hotfix RPM for Satellite 6.14.4

A hotfix RPM is available for this BZ for Satellite 6.14.4

INSTALL INSTRUCTIONS:

1. Create a complete backup or snapshot of Satellite 6.14.4 server

2. Download the hotfix RPM from this attachment

3. # dnf install ./rubygem-foreman_discovery-22.0.4-2.HOTFIXRHBZ2238952_2068263.el8sat.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart