Bug 1921095

Summary: Global Registration: Build status gets set to Pending installation when running script from Registration Tab
Product: Red Hat Satellite Reporter: Kenny Tordeurs <ktordeur>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Omkar Khatavkar <okhatavk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.9.0CC: ahumbe, egolov, lstejska, okhatavk, osousa, pcreech, sraut
Target Milestone: 6.10.0Keywords: 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: 2021-11-16 14:09:54 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 Kenny Tordeurs 2021-01-27 13:58:32 UTC
Description of problem:
Build status gets set to Pending installation when running script from Registration Tab.

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

How reproducible:
100%

Steps to Reproduce:
1. Provision host
2. Host has property Build set to Installed
3. Run register from Registration Tab 

Actual results:
Build is set to Pending installation


Expected results:
No change to Build status

Additional info:

Comment 3 Kenny Tordeurs 2021-01-27 14:04:07 UTC
Also some other properties are modified:

Errata	
System Purpose	
Subscription

Comment 6 Leos Stejskal 2021-03-19 15:25:56 UTC
Hi Kenny,
could you please attach log from the script run?

If you check the content of the script, at the end is curl call back to satellite to switch host's build status.
It is possible that there was a problem during the script run & it never reached the the part with the callback.

Comment 9 Leos Stejskal 2021-03-25 09:04:42 UTC
If there were errors in the log then the script didn't finish and the state is still in pending,
this is expected behavior.
I propose to close the issue as not a bug

Comment 10 Kenny Tordeurs 2021-03-25 09:09:49 UTC
Leos, is it expected to change the build status upon failure of registration?
Installation and registration should be independent of each other imho when the machine is already considered 'installed'.

Comment 11 Leos Stejskal 2021-03-25 09:18:54 UTC
> Leos, is it expected to change the build status upon failure of registration?

The change to 'Pending' is done when we render the template, 
the problem is that right now we don't have way how to tell Satellite that the registration didn't finish correctly.

I correct my proposal to close it as 'not a bug', this needs to be handled.

Comment 12 Leos Stejskal 2021-04-15 08:08:11 UTC
Created redmine issue https://projects.theforeman.org/issues/32322 from this bug

Comment 14 Bryan Kearney 2021-06-01 16:06:19 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32322 has been resolved.

Comment 15 Omkar Khatavkar 2021-08-09 12:05:20 UTC
Added Wrong Snippet Code for the host_init_config_post and tried to verify the host status, Updated with Error(with some general information error), Verified in Satellite 6.10 Snap 12.

Comment 18 errata-xmlrpc 2021-11-16 14:09:54 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 (Moderate: Satellite 6.10 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-2021:4702