Bug 496655 - Package List never gets refreshed
Package List never gets refreshed
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: WebUI (Show other bugs)
0.5
All Linux
low Severity medium
: ---
: ---
Assigned To: Shannon Hughes
Red Hat Satellite QA List
:
Depends On:
Blocks: space06
  Show dependency treegraph
 
Reported: 2009-04-20 10:59 EDT by Mike McCune
Modified: 2009-09-10 08:05 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 498273 (view as bug list)
Environment:
Last Closed: 2009-09-10 08:05:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McCune 2009-04-20 10:59:39 EDT
From spacewalk-list:

http://www.redhat.com/archives/spacewalk-list/2009-April/msg00183.html

I have the same problem of package list not refreshed after yum update/rhn_check with my Spacewalk 0.5 (upgraded from 0.4)

I have created three channels in my spacewalk :
* one for RHEL 5.0
* one for RHEL 5.1
* one for RHEL 5.2

I kickstart a RHEL 5.0 and register it with Spacewlak. After, I change its base channel to be the one for RHEL 5.1 and Spacewalk show me a lot of packages that need to be upgraded. That's good. On the host, I do a yum update and everything is fine. But Spacewalk still tells me that a lot of packages need to be upgraded. After doing what Thomas von Steiger explain (playing with child channels), I have got the list refreshed. I have tried rhn-profile-sync without success

I changed again the base channe to the one for RHEL 5.2 and schedule a packages upgrade from Spacewalk webui. The task complete with success but the webui stills show me that some packages need to be upgraded... I have tried rhn-profile-sync without success. If I remove a child channel, the system status becomes "up to date".

That is weird and right now, Spacewalk lost is reporting functionnality
Comment 1 Santi Saez 2009-04-20 12:03:27 EDT
Hi!

I have exactly the same problem after upgrading from 0.4 to 0.5, on a CentOS 5.3 (x86) box:

# rpm -qa spacewalk
spacewalk-0.5.4-1.el5

When clicking in "Software -> Packages -> Upgrade", I can see the latest version available for the packages but I can't see installed versions (maybe that's the bug?) An example image is available at:

http://filesocial.com/262h9

Re-scheduling package upgrade and running rhn_check I get:

======================================================================
Package 1:cups-1.3.7-8.el5_3.4.i386 already installed and latest version
Package 1:cups-libs-1.3.7-8.el5_3.4.i386 already installed and latest version
Package device-mapper-multipath-0.4.7-23.el5_3.4.i386 already installed and latest version
Package kpartx-0.4.7-23.el5_3.4.i386 already installed and latest version
Package libvolume_id-095-14.20.el5_3.i386 already installed and latest version
Package tzdata-2009f-1.el5.noarch already installed and latest version
Package udev-095-14.20.el5_3.i386 already installed and latest version

(..)

D: Running Transaction
Adding packages to package profile: []
Removing packages from package profile: []
D: May free Score board((nil))
D: Sending back response (0, 'Update Succeeded', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: local action status:  (0, 'rpm database not modified since last update (or package list recently updated)', {})
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))
======================================================================

Package are already installed in the client but status not updated in Spacewalk DB, executing rhn-profile-sync doesn't solve this:

======================================================================
# rhn-profile-sync -vv
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1240243338.03  with expiration of  1240246938.03  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010283, 'X-RHN-Auth-Server-Time': '1240243335.86', 'X-RHN-Auth': '0IN1FIHdkgEVNDaXB8A0dQ==', 'X-RHN-Auth-Channels': [['centos-5-i386-base', '20090416163225', '1', '1'], ['centos-5-i386-updates', '20090420135604', '0', '1'], ['centos-5-i386-hostalia', '20090406182608', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
Updating package profile...
Updating package profile
Updating hardware profile...
======================================================================
Comment 2 Santi Saez 2009-04-20 12:11:56 EDT
We are following those steps to refresh installed package version:

- Select affected client and enter in "Software -> Software Channels".

- Unselect a child channel (CentOS 5 i386 Updates) and click "Change Subscriptions".

- Enter again in "Software Channels" and re-selected unselect channel (CentOS 5 i386 Updates).

Following this procedure installed package version will be updated, but if we make this operation globally using "System Set Manager" this doesn't work..
Comment 3 Santi Saez 2009-04-27 05:33:00 EDT
I have made a very simple Perl script that uses Spacewalk XML-RPC API to unsuscribe and re-suscribe again to all child channels, and help solving this bug.

Script is available at http://fpaste.org/paste/10243
Comment 4 Shannon Hughes 2009-05-06 13:54:40 EDT
bad index on backend side, 

index cc96d25..2fdb97b 100644 (file)


--- a/backend/server/rhnServer/server_packages.py
+++ b/backend/server/rhnServer/server_packages.py
@@ -317,8 +317,8 @@ def update_errata_cache(server_id):

     # Delete unneeded packages
-    non_null_errata = filter(lambda x: x[1] is not None, deleted_packages)
-    null_errata = filter(lambda x: x[1] is None, deleted_packages)
+    non_null_errata = filter(lambda x: x[0] is not None, deleted_packages)
+    null_errata = filter(lambda x: x[0] is None, deleted_packages)

pushed to 0.5 sw branch
Comment 5 Santi Saez 2009-05-07 07:23:54 EDT
This patch doesn't work in our installation (spacewalk-0.5.4-1.el5 + CentOS 5.3 x86):

# diff /usr/share/rhn/server/rhnServer/server_packages.py server_packages.py-2009-05-07
320,322c320,321
<      non_null_errata = filter(lambda x: x[0] is not None, deleted_packages)
<      null_errata = filter(lambda x: x[0] is None, deleted_packages)
< 
---
>     non_null_errata = filter(lambda x: x[1] is not None, deleted_packages)
>     null_errata = filter(lambda x: x[1] is None, deleted_packages)

When listing system packages still show upgrades available.. I must unsubscribe + subcribe method to solve the problem. Regards,
Comment 6 Weiwei Hu 2009-05-26 11:52:43 EDT
I modified the file of
/usr/share/rhn/server/rhnServer/server_packages.py
Line 320 and 321
      non_null_errata = filter(lambda x: x[1] is not None, deleted_packages)
      null_errata = filter(lambda x: x[1] is None, deleted_packages)
To 
     non_null_errata = filter(lambda x: x[0] is not None, deleted_packages)
     null_errata = filter(lambda x: x[0] is None, deleted_packages)

Now the rpmlist refresh is working once I update the packages.
Comment 7 Miroslav Suchý 2009-09-10 08:05:54 EDT
Spacewalk 0.6 released

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