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

Bug 1201719

Summary: Schedule errata into Action Chain using SSM does not work correctly
Product: Red Hat Satellite 5 Reporter: Jan Dobes <jdobes>
Component: ServerAssignee: Jan Dobes <jdobes>
Status: CLOSED ERRATA QA Contact: Ales Dujicek <adujicek>
Severity: medium Docs Contact:
Priority: medium    
Version: 570CC: adujicek, cperry, tkasparek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-2.3.8-108-sat Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-04 07:16:29 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: 1127217    

Description Jan Dobes 2015-03-13 10:42:09 UTC
Description of problem:

When you try to schedule errata in SSM into new Action Chain, only empty Chain is created. Scheduling into existing Chain works fine.

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

spacewalk-java-2.3.8-100

How reproducible:

always

Steps to Reproduce:
1. Select system(s) with applicable errata
2. Go to SSM -> Errata
3. Select errata, apply
4. Add them into new Action Chain

Actual results:

1. Link with weird address is displayed in notification box:

https://s21pg/rhn/schedule/ActionChain.do?id=1

2. Newly created Action Chain stays empty.

Expected results:

1. Correct link in notification box.
2. Action Chain contains actions you scheduled.

Additional info:

Reproducible also on Spacewalk nightly.

Comment 1 Jan Dobes 2015-03-13 10:43:50 UTC
Broken link fixed in spacewalk commit:

f4598695ec79cfd4aa8e74a0369c0d519d73cf33

Comment 2 Jan Dobes 2015-05-21 12:26:52 UTC
in catalina.out:

org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [ActionChain Id 26 not found for User admin#class com.redhat.rhn.domain.action.ActionChain]
        at com.redhat.rhn.domain.action.ActionChainFactory.getActionChain(ActionChainFactory.java:89)
        at com.redhat.rhn.frontend.events.SsmErrataAction.doExecute(SsmErrataAction.java:46)
        at com.redhat.rhn.frontend.events.AbstractDatabaseAction.execute(AbstractDatabaseAction.java:53)
        at com.redhat.rhn.common.messaging.ActionExecutor.run(ActionExecutor.java:69)
        at com.redhat.rhn.common.messaging.MessageDispatcher.run(MessageDispatcher.java:58)
        at java.lang.Thread.run(Thread.java:701)

Comment 3 Jan Dobes 2015-05-21 12:35:25 UTC
It occurs more likely if scheduling lot of errata. Scheduling is processed in different thread than WebUI and it occurs when we try to get action chain from hibernate before action chain's creation was commited in WebUI thread.

Comment 4 Jan Dobes 2015-05-22 12:20:36 UTC
Reproducible basically on every async action using Action chains. To reproduce just put Thread.sleep(10000) under MessageQueue.publish(xyz) line.

Comment 5 Jan Dobes 2015-05-22 12:38:52 UTC
fixed in spacewalk master:

882b2b1834b895b2d3bc324933d72500eb87a251

Comment 11 errata-xmlrpc 2015-08-04 07:16:29 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, 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://rhn.redhat.com/errata/RHBA-2015-1541.html