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 2166303 - Edit and Submit is not possible from All Hosts in Satellite 6.13
Summary: Edit and Submit is not possible from All Hosts in Satellite 6.13
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.13.0
Hardware: All
OS: All
unspecified
high
Target Milestone: 6.13.0
Assignee: kmalyjur
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-01 13:18 UTC by Sayan Das
Modified: 2024-04-30 09:54 UTC (History)
2 users (show)

Fixed In Version: foreman-3.5.1.8-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 13:24:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35762 0 Normal Ready For Testing No host found error after editing host's address 2023-02-08 08:38:42 UTC
Github theforeman foreman pull 9564 0 None open Fixes #35762 - No host error after editing host's interfaces 2023-02-08 08:38:42 UTC
Red Hat Issue Tracker SAT-15619 0 None None None 2023-02-02 15:15:51 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:25:00 UTC

Description Sayan Das 2023-02-01 13:18:40 UTC
Description of problem:

After editing a host from All Hosts page and changing some data in the same, hitting on Submit results in "The host <host_shortname> does not exist"

This is a regression as I don't see the same behavior in Satellite 6.12.0

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

Satellite 6.13


How reproducible:

Always


Steps to Reproduce:
1. Install a Satellite 6.13
2. Install an RHEL 8 system by name rhel8.example.com
3. Register the system with Satellite 
4. Go to Hosts --> All Hosts page, and click on the edit button for the host "rhel8.example.com"
5. Submit ( with or without making any changes )

Actual results:

URL in browser redirects to https://<satellite-fqdn>/page-not-found

and the error message is 

No host found
The host rhel8 does not exist or there are access permissions needed. Please contact your administrator if this issue continues.

Seems like one of the controller is pointing the "/api/hosts/" to use the shortname of the Host profiles instead of the ID or Full FQDN

Expected results:

The UI should get back to The new UI of that Host after submitting changes. 


Additional info:

Not reproducible in Satellite 6.12

Following trace in production.log of satellite 6.13


2023-02-01T18:36:26 [I|app|351ef1a9] Started PATCH "/hosts/3" for X.X.X.X at 2023-02-01 18:36:26 +0530
2023-02-01T18:36:26 [I|app|351ef1a9] Processing by HostsController#update as */*
2023-02-01T18:36:26 [I|app|351ef1a9]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"hekMC7mCvJtg8qd6dXEzrjC7A6ucs7nh4cvQdHfVPZZ9u5CnDu0V/3vBQkM4/VVRiVbYuZGb0mCTE4qIeD3CkA==", "host"=>{"name"=>"rhel8", "hostgroup_id"=>"", "content_facet_attributes"=>{"lifecycle_environment_id"=>"1", "content_view_id"=>"1", "content_source_id"=>"2"}, "openscap_proxy_id"=>"", "managed"=>"false", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"00:1a:4a:00:02:7a", "identifier"=>"ens3", "name"=>"rhel8", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"x.y.z.228", "ip6"=>"2620:52:0:4af8:21a:4aff:fe00:27a", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"3"}}, "host_parameters_attributes"=>{"0"=>{"name"=>"host_registration_insights", "parameter_type"=>"boolean", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false", "id"=>"10"}, "1"=>{"name"=>"host_registration_remote_execution_pull", "parameter_type"=>"boolean", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false", "id"=>"12"}, "2"=>{"name"=>"host_update_packages", "parameter_type"=>"boolean", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false", "id"=>"11"}}, "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"2", "comment"=>"", "overwrite"=>"false"}, "id"=>"3"}
2023-02-01T18:36:26 [I|app|351ef1a9] ForemanWebhooks::EventSubscriber: host_updated.event.foreman event received
2023-02-01T18:36:26 [I|app|351ef1a9] Redirected to https://rhel8.example.com/new/hosts/rhel8.example.com
2023-02-01T18:36:26 [I|app|351ef1a9] Completed 302 Found in 70ms (ActiveRecord: 9.2ms | Allocations: 24903)
2023-02-01T18:36:26 [I|app|71f62aaf] Started GET "/new/hosts/rhel8.example.com" for X.X.X.X at 2023-02-01 18:36:26 +0530
2023-02-01T18:36:26 [I|app|71f62aaf] Processing by ReactController#index as */*
2023-02-01T18:36:26 [I|app|71f62aaf]   Parameters: {"id"=>"rhel8.example.com"}
2023-02-01T18:36:26 [I|app|71f62aaf]   Rendered react/index.html.erb within layouts/react_application (Duration: 1.5ms | Allocations: 131)
2023-02-01T18:36:26 [I|app|71f62aaf]   Rendered layouts/base.html.erb (Duration: 42.6ms | Allocations: 37152)
2023-02-01T18:36:26 [I|app|71f62aaf]   Rendered layout layouts/react_application.html.erb (Duration: 45.9ms | Allocations: 37623)
2023-02-01T18:36:26 [I|app|71f62aaf] Completed 200 OK in 62ms (Views: 45.4ms | ActiveRecord: 3.9ms | Allocations: 43450)
2023-02-01T18:36:26 [I|app|9ddc584c] Started GET "/api/hosts/rhel8?show_hidden_parameters=true" for X.X.X.X at 2023-02-01 18:36:26 +0530
2023-02-01T18:36:26 [I|app|8cfee0d1] Started GET "/hosts/rhel8/statuses" for X.X.X.X at 2023-02-01 18:36:26 +0530
2023-02-01T18:36:26 [I|app|ad3cd40d] Started GET "/api/remote_execution_features" for X.X.X.X at 2023-02-01 18:36:26 +0530
2023-02-01T18:36:26 [I|app|8cfee0d1] Processing by HostsController#statuses as JSON
2023-02-01T18:36:26 [I|app|8cfee0d1]   Parameters: {"id"=>"rhel8"}
2023-02-01T18:36:26 [I|app|ad3cd40d] Processing by Api::V2::RemoteExecutionFeaturesController#index as JSON
2023-02-01T18:36:26 [I|app|ad3cd40d]   Parameters: {"apiv"=>"v2"}
2023-02-01T18:36:26 [I|app|9ddc584c] Processing by Api::V2::HostsController#show as JSON
2023-02-01T18:36:26 [I|app|9ddc584c]   Parameters: {"show_hidden_parameters"=>"true", "apiv"=>"v2", "id"=>"rhel8"}
2023-02-01T18:36:26 [I|app|8cfee0d1]   Rendered common/404.html.erb within layouts/application (Duration: 5.0ms | Allocations: 3790)
2023-02-01T18:36:26 [I|app|8cfee0d1]   Rendered layouts/base.html.erb (Duration: 16.8ms | Allocations: 17605)
2023-02-01T18:36:26 [I|app|8cfee0d1]   Rendered layout layouts/application.html.erb (Duration: 34.7ms | Allocations: 33990)
2023-02-01T18:36:26 [I|app|8cfee0d1] Completed 404 Not Found in 52ms (Views: 36.0ms | ActiveRecord: 3.3ms | Allocations: 37872)
2023-02-01T18:36:26 [I|app|b04c51ee] Started GET "/api/hosts/rhel8/power?timeout=30" for X.X.X.X at 2023-02-01 18:36:26 +0530
2023-02-01T18:36:26 [I|app|ccde80bb] Started GET "/api/audits?search=host%3Drhel8&per_page=3" for X.X.X.X at 2023-02-01 18:36:26 +0530
2023-02-01T18:36:26 [I|app|9ddc584c] Couldn't find Host::Managed with 'id'=rhel8 [WHERE "hosts"."type" = $1 AND "hosts"."organization_id" = $2 AND "hosts"."location_id" = $3] (ActiveRecord::RecordNotFound)
2023-02-01T18:36:26 [I|app|9ddc584c]   Rendered api/v2/errors/not_found.json.rabl within api/v2/layouts/error_layout (Duration: 6.7ms | Allocations: 7221)
2023-02-01T18:36:26 [I|app|9ddc584c]   Rendered layout api/v2/layouts/error_layout.json.erb (Duration: 11.7ms | Allocations: 13494)
2023-02-01T18:36:26 [I|app|9ddc584c] Completed 404 Not Found in 77ms (Views: 12.3ms | ActiveRecord: 51.1ms | Allocations: 37687)
2023-02-01T18:36:26 [I|app|ccde80bb] Processing by Api::V2::AuditsController#index as JSON
2023-02-01T18:36:26 [I|app|ccde80bb]   Parameters: {"search"=>"host=rhel8", "per_page"=>"3", "apiv"=>"v2"}
2023-02-01T18:36:26 [I|app|b04c51ee] Processing by Api::V2::HostsController#power_status as JSON
2023-02-01T18:36:26 [I|app|b04c51ee]   Parameters: {"timeout"=>"30", "apiv"=>"v2", "id"=>"rhel8"}


2023-02-01T18:36:26 [I|app|b04c51ee] Couldn't find Host::Managed with 'id'=rhel8 [WHERE "hosts"."type" = $1 AND "hosts"."organization_id" = $2 AND "hosts"."location_id" = $3] (ActiveRecord::RecordNotFound)
2023-02-01T18:36:26 [I|app|b04c51ee]   Rendered api/v2/errors/not_found.json.rabl within api/v2/layouts/error_layout (Duration: 5.5ms | Allocations: 6403)

Comment 3 Bryan Kearney 2023-02-22 20:03:20 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35762 has been resolved.

Comment 5 Peter Ondrejka 2023-03-06 09:21:54 UTC
Verified on Satellite 6.13 snap 13.

Comment 8 errata-xmlrpc 2023-05-03 13:24:53 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.13 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-2023:2097


Note You need to log in before you can comment on or make changes to this bug.