Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2268544

Summary: The "'Customize Host'" button no longer works
Product: Red Hat Satellite Reporter: matt jia <mjia>
Component: Discovery PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.14.0CC: ahumbe, gtalreja, jpasqual, myoder, rlavi, wpinheir
Target Milestone: UnspecifiedKeywords: EasyFix, Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-20 22:36:31 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:

Description matt jia 2024-03-08 05:41:26 UTC
Description of problem:

Clicking on the 'Customize Host' button to provision a discovered host leads to below error:

2024-02-22T12:10:53 [I|app|dedab469] Started GET "/discovered_hosts/mac846993855035/edit?utf8=%E2%9C%93&host%5Bhostgroup_id%5D=62&host%5Borganization_id%5D=1&host%5Blocation_id%5D=2" for x.x.x.x at 2024-02-22 12:10:53 +0100
2024-02-22T12:10:53 [I|app|dedab469] Processing by DiscoveredHostsController#edit as HTML
2024-02-22T12:10:53 [I|app|dedab469]   Parameters: {"utf8"=>"✓", "host"=>{"hostgroup_id"=>"62", "organization_id"=>"1", "location_id"=>"2"}, "id"=>"mac846993855035"}
2024-02-22T12:10:53 [I|app|dedab469] Deface: [WARNING] No :original defined for 'add_execution_interface_js', you should change its definition to include:
 dedab469 |  :original => 'ac3c64a7a3f555ffd6939179326e7666155bc5fc' 
2024-02-22T12:10:53 [I|app|dedab469] Deface: [WARNING] No :original defined for 'ansible_roles_tab', you should change its definition to include:
 dedab469 |  :original => '8c63c5282ee199068bfd65475e13066ee981089a' 
2024-02-22T12:10:53 [I|app|dedab469] Deface: [WARNING] No :original defined for 'ansible_roles_tab_content', you should change its definition to include:
 dedab469 |  :original => 'ac3c64a7a3f555ffd6939179326e7666155bc5fc' 
2024-02-22T12:10:53 [I|app|dedab469] Deface: [WARNING] No :original defined for 'add_execution_interface', you should change its definition to include:
 dedab469 |  :original => 'dbe1da973bfb251a74b994e7ae11bc8d11502c97' 
2024-02-22T12:10:53 [I|app|dedab469]   Rendered /usr/share/gems/gems/foreman_discovery-22.0.4/app/views/discovered_hosts/edit.html.erb within layouts/application (Duration: 333.4ms | Allocations: 260026)
2024-02-22T12:10:53 [I|app|dedab469]   Rendered layout layouts/application.html.erb (Duration: 333.6ms | Allocations: 260079)
2024-02-22T12:10:53 [W|app|dedab469] No route matches {:action=>"index", :controller=>"react", :id=>#<Host::Managed id: 768, name: "", last_compile: nil, last_report: [FILTERED], updated_at: "2024-02-22 12:09:25.360985000 +0100", created_at: "2024-02-22 12:09:24.298623000 +0100", root_pass: nil, architecture_id: 1, operatingsystem_id: 8, ptable_id: 136, medium_id: nil, build: true, comment: nil, disk: nil, installed_at: nil, model_id: 3, hostgroup_id: 62, owner_id: 1, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", discovery_rule_id: nil, global_status: 0, lookup_value_matcher: nil, openscap_proxy_id: nil, pxe_loader: nil, initiated_at: nil, build_errors: nil, creator_id: 1>}, possible unmatched constraints: [:id]
 dedab469 | Did you mean?  host_details_page_url
2024-02-22T12:10:53 [I|app|dedab469] Backtrace for 'No route matches {:action=>"index", :controller=>"react", :id=>#<Host::Managed id: 768, name: "", last_compile: nil, last_report: [FILTERED], updated_at: "2024-02-22 12:09:25.360985000 +0100", created_at: "2024-02-22 12:09:24.298623000 +0100", root_pass: nil, architecture_id: 1, operatingsystem_id: 8, ptable_id: 136, medium_id: nil, build: true, comment: nil, disk: nil, installed_at: nil, model_id: 3, hostgroup_id: 62, owner_id: 1, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", discovery_rule_id: nil, global_status: 0, lookup_value_matcher: nil, openscap_proxy_id: nil, pxe_loader: nil, initiated_at: nil, build_errors: nil, creator_id: 1>}, possible unmatched constraints: [:id]
 dedab469 | Did you mean?  host_details_page_url' error (ActionView::Template::Error): No route matches {:action=>"index", :controller=>"react", :id=>#<Host::Managed id: 768, name: "", last_compile: nil, last_report: [FILTERED], updated_at: "2024-02-22 12:09:25.360985000 +0100", created_at: "2024-02-22 12:09:24.298623000 +0100", root_pass: nil, architecture_id: 1, operatingsystem_id: 8, ptable_id: 136, medium_id: nil, build: true, comment: nil, disk: nil, installed_at: nil, model_id: 3, hostgroup_id: 62, owner_id: 1, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", discovery_rule_id: nil, global_status: 0, lookup_value_matcher: nil, openscap_proxy_id: nil, pxe_loader: nil, initiated_at: nil, build_errors: nil, creator_id: 1>}, possible unmatched constraints: [:id]
 dedab469 | Did you mean?  host_details_page_url
 dedab469 | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/journey/formatter.rb:44:in `path'
...


Version-Release number of selected component (if applicable):

6.14

How reproducible:

Easy
Steps to Reproduce:
1. provision a discovered host on the WebUI
2. click Customize Host for further customization

Actual results:

failed with above error


Expected results:

should redirect to the host editing page for further customization

Additional info:

Comment 2 myoder 2024-03-08 17:19:34 UTC
Issue stems from the "Type of name generator" variable in the Satellite UI.  When using "MAC-based" value, the "host" variable being sent in the method "current_host_details_path" from the "/usr/share/foreman/app/helpers/application_helper.rb" script is blank.  When we use "Random-based" value, the "host" variable gets populated correctly, and the view is rendered properly.

I have reproduced this issue locally when using "MAC-based".  And also been able to render successfully on the reproducer when using "Random-based".

Comment 3 myoder 2024-03-08 19:15:52 UTC
Just to clarify, there are 2 different settings "Type of name generator" in the UI (Provisioning and Discovery tabs).  The one for this issue is from the Provisioning tab.

Comment 4 Gaurav Talreja 2024-03-20 13:34:37 UTC
It looks like this issue was already reported in BZ 2238952 and has been resolved.

I tested this functionality on latest version where we've a fix for above BZ 2238952, and discovery provisioning works correctly with 'Customize Host' button on WebUI with both Random-based and MAC-based values for the mentioned setting. Therefore, I propose closing this BZ as a duplicate of BZ 2238952

Comment 5 matt jia 2024-03-20 22:36:31 UTC
(In reply to Gaurav Talreja from comment #4)
> It looks like this issue was already reported in BZ 2238952 and has been
> resolved.
> 
> I tested this functionality on latest version where we've a fix for above BZ
> 2238952, and discovery provisioning works correctly with 'Customize Host'
> button on WebUI with both Random-based and MAC-based values for the
> mentioned setting. Therefore, I propose closing this BZ as a duplicate of BZ
> 2238952

Thanks, I will do it.

*** This bug has been marked as a duplicate of bug 2238952 ***