Bug 529064 - Calculation of errata cache is inconsistent across the application.
Summary: Calculation of errata cache is inconsistent across the application.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 530
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: sat540-blockers
TreeView+ depends on / blocked
 
Reported: 2009-10-14 19:57 UTC by Justin Sherrill
Modified: 2010-10-28 14:57 UTC (History)
11 users (show)

Fixed In Version: spacewalk-schema-1.2.21-9
Doc Type: Bug Fix
Doc Text:
Clone Of: 529053
Environment:
Last Closed: 2010-10-28 14:57:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Justin Sherrill 2009-10-14 19:58:02 UTC
Cloned for 5.3.1

Comment 2 Justin Sherrill 2009-11-03 18:44:32 UTC
So this shouldn't affect 5.3.0 afterall, Will move to modified for QA to test properly.

-Justin

Comment 5 Tomas Lestach 2010-10-20 10:27:46 UTC
channel subscription change, rhn-profile-sync shows 2 errata -> correct behavior

system registration shows only 1 applicable erratum:
1. I created a custom channel
2. I created 2 custom errata both containing same package foo-2 and published them into the custom channel
3. I created an activation key for the custom channel
4. I registered a client having installed foo-1 using the activation key

WebUI shows that only 1 erratum is applicable. After errata-cache was regenerated by taskomatic or after rhn-profile-sync was run on the client, 2 errata were shown on the webUI.

Using Satellite-5.4.0-RHEL5-re20101015.0

-> FAILS_QA

Comment 11 Justin Sherrill 2010-10-20 18:33:00 UTC
Tomas,  I wasn't able to reproduce this, what client were you using?  Can you point me to a reproducer?

Thanks!
-Justin

Comment 12 Tomas Lestach 2010-10-21 10:15:27 UTC
Hey Justin,

I using a rhel55 client.

I used rhn-setup-1.1.15-1.el5. Now, I tried rhn-setup-0.4.20-33.el5 with the same result.

Ping me for regarding reproducer because I reuse the systems often.

Comment 13 Justin Sherrill 2010-10-21 13:58:48 UTC
I've isolated the problem.


The stored proc rhn_server.update_needed_cache currently makes an assumption that multiple errata won't share a package which is incorrect.  I believe this was changed recently with some of the errata cache work that someone did.  The proc uses a hashmap of package_id -> errata_id  which causes this problem.

Anyways, the proc will only add 1 needed errata for each package_id each time it is run.  

So for example, if you have 5 errata with the same package, the proc will need to be run 5 times for the system to see all 5 are applicable.  

-Justin

Comment 14 Justin Sherrill 2010-10-21 13:59:38 UTC
I'm not going to go ahead to fix it since it will take some time, and I've got a 540 bug to work on, but the above information will at least save someone the time from tracking it down again :}

-Justin

Comment 16 Tomas Lestach 2010-10-22 15:18:55 UTC
fixed in spacewalk.git: 74665cc2f5ce9d14592ba5ba15afea16050da420

Comment 23 Clifford Perry 2010-10-28 14:52:13 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


Note You need to log in before you can comment on or make changes to this bug.