Bug 2155444 - Registration command should not fail with status 0
Summary: Registration command should not fail with status 0
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: nalfassi
QA Contact: Satellite QE Team
URL:
Whiteboard:
: 2174022 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-21 09:29 UTC by vivek singh
Modified: 2023-06-26 11:53 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-18114 0 None None None 2023-06-05 14:42:52 UTC

Description vivek singh 2022-12-21 09:29:58 UTC
1. Proposed title of this feature request.
=> Need to verify that if the host is registered successfully using global template by using any ansible playbook or script


2. What are the nature and description of the request?  

* Customer concern is if there is problem when registering a host how would a program running the registration know, means if script is used to register host how script will know if it has fully worked or not. Is there any exit status for it or any messages.

* Customer was trying to register client using global registration template and while executing curl command the client was registered but it failed at one point and the echo $? showed exit status as 0.

* Customer expectation is it should show 1 or any other exits status. In unix/linux, in general, if an exit status (shell variable $?) is greater than zero, it is considered an error.  In the current situation, the exit status for global registration templates, will be zero, even if registration was not successful.

* I tried to check on this and curl command gave an exit status of zero even if it failed to install the insight packages or was not able to resolve the satellite hostname.


3. Why do you need this? (List the business requirements here).
Need to verify that if the host is registered successfully using global template by using any ansible playbook or script
 
4. How would you like to achieve this? (List the functional requirements here).
If Script runs to register and if at any step it fails then echo $? should return non zero value instead of zero based on last run step. 

5. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. 
We will try to register host using global registration template and try to fail it intentionaly at one step then check echo $? output. 
  
6. Do you have any specific timeline dependencies and which release would they like to target (i.e. Satellite 6.8,7)?
NA
     
7. List any affected packages or components. 
NA 
      
8. Would you be able to assist in testing this functionality if implemented?  
Yes

Comment 2 Leos Stejskal 2023-01-10 10:05:33 UTC
Hi,
I believe this is a valid issue,
registration command should exit with proper status when it fails for any reason.

Comment 5 Marek Hulan 2023-06-05 14:40:49 UTC
*** Bug 2174022 has been marked as a duplicate of this bug. ***


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