Project

General

Profile

Actions

Bug #36969

closed

Registration command should not fail with status 0

Added by Nofar Alfassi 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2155444

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

Actions #1

Updated by Nofar Alfassi 5 months ago

  • Subject changed from Registration command should not fail with status 0 to Registration command should not fail with status 0
  • Assignee set to Nofar Alfassi
Actions #2

Updated by The Foreman Bot 4 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/9948 added
Actions #3

Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 3.10.0 added
Actions #4

Updated by Nofar Alfassi 3 months ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF