Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1153789

Summary: Infinite loop when scheduling kickstart for system already in process of kickstarting
Product: Red Hat Satellite 5 Reporter: Stephen Herr <sherr>
Component: ProvisioningAssignee: Stephen Herr <sherr>
Status: CLOSED CURRENTRELEASE QA Contact: Dimitar Yordanov <dyordano>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 570CC: dyordano, pstudeni
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-2.3.8-42 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-13 10:19:05 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:
Bug Depends On:    
Bug Blocks: 1128189    

Description Stephen Herr 2014-10-16 18:52:01 UTC
I'm not sure how to reproduce this issue. I stumbled into it when testing kickstarts for ppc64le, but I'm not sure why no one has hit this issue before.

If you a schedule a kickstart for a system that is currently kickstarting first we have the cancell the existing kickstart session. There is code that attempts to do this, and it takes the current action and attempts to walk up the tree to find the original action so it can cancel that one. For example if the current action is a reboot action it needs to go find the kickstart action that caused the reboot action to be necessary. Cancelling the root action should cancell all the others.

The problem is that the loop that was supposed to walk up the action tree was written incorrectly so that it would just cycle infinitely, leading to the page to just sit there and eventually time out and a java process consuming all of its cpu until you restart tomcat.

I'm not terribly concerned about the fact that I don't know how to reproduce this because the existing code is clearly wrong and this fix is clearly the intended behavior, and everything functions correctly on my system when the fix is applied.

Comment 1 Stephen Herr 2014-10-16 18:54:03 UTC
Committing to Spacewalk master:
7f5c7324f143737e18c5e02a9569760563ab4ab1

Comment 4 Dimitar Yordanov 2014-11-05 21:39:04 UTC
Verified.
spacewalk-java-2.3.8-52

1. Initiate a provisioning of a KVM guest.
   1.1. Check the Event tab
   1.2  Pick up the scheduled events. (rhn_check --v )
2. While the first provisioning session is running schedule second one.
   1.2. Check the Event tab
3. Ensure that second provisioning will start right after the first one is done.
4. Ensure the "Session" tab is updated correctly.

Comment 5 Pavel Studeník 2015-01-12 12:18:31 UTC
Reverified with spacewalk-java-2.3.8-96.el6sat.noarch

Page rhn/systems/details/kickstart/SessionStatus.do?sid=1000010033 was refreshed each 15s: 

Mon, 12 Jan 2015 12:17:01 GMT
Mon, 12 Jan 2015 12:17:16 GMT

Comment 6 Clifford Perry 2015-01-13 10:19:05 UTC
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 

Cliff