Bug 2054011

Summary: Submit button on Edit page of a host will revert back to a invalid page on Satellite
Product: Red Hat Satellite Reporter: Manu Sunil <msunil>
Component: HostsAssignee: Oleh Fedorenko <ofedoren>
Status: CLOSED ERRATA QA Contact: Peter Dragun <pdragun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: afeferku, ehelms, hakon.gislason, inecas, oezr, ofedoren
Target Milestone: 6.12.0Keywords: 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: 2022-11-16 13:33:25 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 Manu Sunil 2022-02-13 23:18:26 UTC
Description of problem:

- Clicking the submit option on the Host Edit page reverts to an invalid host page.

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

- satellite-7.0.0-0.5.beta.el7sat.noarch
- foreman-3.1.1.4-1.el7sat.noarch

How reproducible:

- Always

Steps to Reproduce:

1. Register a host to the Satellite

2. Access the client on the UI
 
   Satellite WebUI: Hosts --> All Hosts --> Select the Host --> Edit 

3. Make any change in the page and click Submit or simply click Submit button

Actual results:

- The action reverts to any invalid host page.

- The domain seems to be added to the hostname of the host again.

- The URL is generated as such.

  https://satellite.example.com/new/hosts/client.example.com.example.com#/Overview

Expected results:

- The submit action should revert back to the host page successfully.

Comment 1 Ondřej Ezr 2022-03-08 09:36:33 UTC
Created redmine issue https://projects.theforeman.org/issues/34572 from this bug

Comment 2 Bryan Kearney 2022-03-09 00:05:23 UTC
Upstream bug assigned to afeferku

Comment 3 Bryan Kearney 2022-03-09 00:05:25 UTC
Upstream bug assigned to afeferku

Comment 4 Bryan Kearney 2022-03-15 00:05:25 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34572 has been resolved.

Comment 9 tstrych 2022-04-21 13:25:40 UTC
FailedQA, 

with sat 6.11 snap 16, the root cause was removed, when the host is edited and submitted, the user is navigated back, and there is no longer problem with the double domain name. 

But, when the user edits the domain (in interfaces tab), the new UI navigation fails, take a look at the attached screenshot. User is navigated to correct host but with old domain name, so host doesn't exist anymore. 
The old UI navigates correctly to the host with just edited domain. 

Full example. 
New host UI is enabled in settings

Create a domain a.b.c.d, assign all locations and organizations
Create a domain e.f.g.h, assign all locations and organizations

Create a host with domain a.b.c.d. 
Edit the host -> interfaces -> domain and set to e.f.g.h
Submit

Actual result
Something went wrong,
ReferenceError: RedirectToEmptyHostPage is not defined
URL: https://<satellite>/new/hosts/<host>.a.b.c.d#/Overview -> doesn't exist  anymore

Expected result
URL: https://<satellite>/new/hosts/<host>.e.f.g.h#/Overview -> navigated correctly


The full example with New host UI disabled in settings is working correctly.

Comment 12 Oleh Fedorenko 2022-04-27 18:56:01 UTC
Created redmine issue https://projects.theforeman.org/issues/34830 from this bug

Comment 15 Bryan Kearney 2022-05-06 20:04:40 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34830 has been resolved.

Comment 16 Peter Dragun 2022-08-03 11:39:27 UTC
Verified on sat 6.12 snap 4.
Both new and old UI navigates correctly after updating the domain.

Comment 20 errata-xmlrpc 2022-11-16 13:33:25 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.12 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-2022:8506