Bug 2123306

Summary: Curl command to register host is generated even without specifying the Location though Location field is marked as mandatory
Product: Red Hat Satellite Reporter: Jayant Bhatia <jbhatia>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Shweta Singh <shwsingh>
Severity: low Docs Contact:
Priority: low    
Version: 6.12.0CC: lstejska, rlavi, sganar, shwsingh
Target Milestone: 6.14.0Keywords: EasyFix, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-3.7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:18:01 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 Jayant Bhatia 2022-09-01 10:59:04 UTC
Description of problem:
'Location' field is marked as mandatory field to be selected while generating curl command using Global registration Template. Even when the 'Location' field is not specified/selected, the curl commands gets generated without any issue/error/warning. Curl command should not get generated unless 'Location' field is explicitly specified since it is a mandatory field.

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

How reproducible: Always


Steps to Reproduce:
1. Navigate to Satellite WebUI -> Hosts -> Content Hosts -> Register Content Hosts.
2. Specify all the mandatory fields except Location. Do not specify the "Location" field and keep it as default which is "Not specified". 
3. Click on "Generate" at the bottom.

Actual results: The curl command is generated even when Location field is Not specified.


Expected results: Location field is marked as a mandatory field with asterisk(*). Clicking on "Generate" button should ask to specify the "Location" field and should not generate the curl command until Location field is explicitly specified. 


Additional info: While hovering to the question mark (?) near Location field, it says: "If no location is set, the default location of the user is assumed.". If that is the scenario, then "Location" field should be by default set to the user's location and should not be set as "Not specified".

Comment 1 Leos Stejskal 2023-01-31 09:29:12 UTC
Confirmed, UI should not mark Location & Organization as mandatory fields

Comment 3 Shweta Singh 2023-06-08 09:44:33 UTC
Verified. 

Version Tested: Satellite 6.14.0 Snap 2.0

Steps to Reproduce:
1. Create an activation key.
2. Navigate to Satellite UI --> Hosts --> Register Host
3. Change location to "Not Specified" and select the new created activation key.
4. Generate curl command to register host.

Actual Result:
Curl command gets generated successfully without specifying location

PS: This is expected behavior so moving this to verified.

Comment 6 errata-xmlrpc 2023-11-08 14:18:01 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.14 security and bug fix update), 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:6818