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

Bug 628100

Summary: RHN Satellite 5.3: activation keys & configuration channels subscribing / ranking issues
Product: Red Hat Satellite 5 Reporter: Xixi <xdmoon>
Component: ServerAssignee: Jan Pazdziora (Red Hat) <jpazdziora>
Status: CLOSED ERRATA QA Contact: Dimitar Yordanov <dyordano>
Severity: high Docs Contact:
Priority: urgent    
Version: 530CC: cperry, dyordano, fnadge, tlestach, xdmoon
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-java-0.5.44-94 Doc Type: Bug Fix
Doc Text:
On the RHN Satellite 5.3 WebUI, if activation keys are associated with configuration channels and if one or more of those channels are removed/deleted, then the ranking is not updated correctly, and subsequent ranking and un/subscribing to channels via web UI errors with Internal Server Error. This bug was fixed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-01 10:31:52 UTC Type: ---
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: 518253    

Description Xixi 2010-08-27 22:15:44 UTC
Description of problem:
On the RHN Satellite 5.3 WebUI, if activation keys are associated with configuration channels and if 1 or more of those channels are removed/deleted, then the ranking is not updated correctly, and subsequent ranking and un/subscribing to channels via web UI errors with Internal Server Error.

Version-Release number of selected component (if applicable):
Red Hat Network (RHN) Satellite 5.3.0

How reproducible:
Always.

Steps to Reproduce:
1- On RHN Satellite 5.3, create 3 configuration channels (test1,test2,test3)
2- create a new activation key with provisioning entitlement
3- subscribe to & rank in order those 3 channels in the key
4- delete the configuration channel 'test2'
5- go back to the activation key configuration page
6- PROBLEM: Rank shown are '1' & '3' instead of '1' & '2' <-----------
7- PROBLEM: try to subscribe to a new channel: ISE   <------------
...
2010-07-22 01:25:44,569 [TP-Processor9] WARN  org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class java.lang.NullPointerException
2010-07-22 01:25:44,570 [TP-Processor9] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
javax.servlet.ServletException
       at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
...
Caused by:
java.lang.NullPointerException
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.populateWidgetLabels(RankChannelsAction.java:236)
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.setupWidget(RankChannelsAction.java:87)
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.setup(RankChannelsAction.java:223)
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.init(RankChannelsAction.java:164)
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.execute(RankChannelsAction.java:68)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
       ... 40 more
...
8- PROBLEM: try to view/modify rankings: ISE
...
2010-07-22 01:22:46,447 [TP-Processor17] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
javax.servlet.ServletException
       at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
...
Caused by:
java.lang.NullPointerException
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.populateWidgetLabels(RankChannelsAction.java:236)
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.setupWidget(RankChannelsAction.java:87)
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.setup(RankChannelsAction.java:223)
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.init(RankChannelsAction.java:164)
       at com.redhat.rhn.frontend.action.token.configuration.RankChannelsAction.execute(RankChannelsAction.java:68)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
       ... 40 more
...
2010-07-22 01:22:46,729 [RHN Message Dispatcher] ERROR com.redhat.rhn.common.messaging.ActionExecutor - java.lang.NullPointerException
java.lang.NullPointerException
       at com.redhat.rhn.frontend.events.TraceBackEvent.toText(TraceBackEvent.java:75)
       at com.redhat.rhn.frontend.events.BaseMailAction.execute(BaseMailAction.java:42)
       at com.redhat.rhn.common.messaging.ActionExecutor.run(ActionExecutor.java:72)
       at com.redhat.rhn.common.messaging.MessageDispatcher.run(MessageDispatcher.java:58)
       at java.lang.Thread.run(Thread.java:736)
...
9- Try to unsubscribe to 'test1': OK, test3 moves to rank 2
10- PROBLEM: Try to unsubscribe to 'test3': ISE
...
2010-07-22 01:28:58,177 [TP-Processor5] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
javax.servlet.ServletException
       at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
...
Caused by:
java.lang.NullPointerException
       at com.redhat.rhn.domain.config.ConfigChannel.equals(ConfigChannel.java:248)
       at java.util.ArrayList.indexOf(ArrayList.java:461)
       at java.util.ArrayList.remove(ArrayList.java:570)
       at org.hibernate.collection.PersistentList.remove(PersistentList.java:156)
       at com.redhat.rhn.domain.config.ConfigChannelListProcessor.remove(ConfigChannelListProcessor.java:98)
       at com.redhat.rhn.frontend.action.token.configuration.ListRemoveChannelsAction.handleDispatch(ListRemoveChannelsAction.java:62)
       at com.redhat.rhn.frontend.action.token.BaseListAction.execute(BaseListAction.java:90)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
       ... 40 more
...

Actual results:
See 6, 7, 8, 10 above. 

Expected results:
See 6, 7, 8, 10 above. Ranking should be updated correctly after channels are moved.  And subscribing/unsubscribing/ranking should still work without errors.

Additional info:
Workaround to bypass UI and use RHN API -
use the call activationkey.setConfigChannels to (re)set configuration channels for the activation key - for example, server.activationkey.setConfigChannels(session, ['1-1132253'], ['test1', 'test5']). After that should be able to use Web UI to manage the activation key's config channels again without errors.

Comment 7 Florian Nadge 2011-01-17 13:55:30 UTC
Please be so kind and add a few key words to the Technical Notes of this
Bugzilla entry using the following structure:

Cause:

Consequence:

Fix:

Result:

For details, see:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

Thanks

Comment 8 Florian Nadge 2011-01-17 13:55:30 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:

Consequence:

Fix:

Result:

Comment 9 Jan Pazdziora (Red Hat) 2011-01-17 14:06:13 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1 @@
-Cause:
+On the RHN Satellite 5.3 WebUI, if activation keys are associated with configuration channels and if one or more of those channels are removed/deleted, then the ranking is not updated correctly, and subsequent ranking and un/subscribing to channels via web UI errors with Internal Server Error. This bug was fixed.-
-Consequence:
-
-Fix:
-
-Result:

Comment 10 Dimitar Yordanov 2011-01-19 22:46:43 UTC
Verified:
REHL5, RHEL4 - s390x, x86_64

Comment 11 Florian Nadge 2011-01-25 19:20:51 UTC
Please be so kind and add a few key words to the Technical Notes of this
Bugzilla entry using the following structure:

Cause:

Consequence:

Fix:

Result:

For details, see:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

Do not simply describe the consequence and say how the bug was fixed not just that it was fixed.

Thanks

Comment 12 Jan Pazdziora (Red Hat) 2011-01-27 12:25:39 UTC
(In reply to comment #11)
> Please be so kind and add a few key words to the Technical Notes of this
> Bugzilla entry using the following structure:

I'm sorry, I cannot do that. I cannot just generate loads of texts without any meaning just to match some artificial structure.

Comment 13 errata-xmlrpc 2011-02-01 10:31:52 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0189.html