The presence of /var/lib/rpm makes the reporter crash

Bug #388577 reported by Free Ekanayaka
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Medium
Free Ekanayaka
Smart Package Manager
Fix Released
Undecided
Unassigned
smart (Ubuntu)
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned

Bug Description

The Landscape Team has proposed a SRU to fix this bug.

Statement explaining the impact
=====================

This bug affects anybody with the rpm package installed, or even removed but not purged (see below how to reproduce). The landscape package reporter (which is what is crashing) reports to the landscape server the packages installed and available on each managed machine. If it crashes, then the machine will show up in landscape has having no packages at all.

How the bug has been addressed
======================

By conditionally loading the rpm smart plugin if it's available.

Detailed instructions how to reproduce the bug
==============================

If the /var/lib/rpm directory exists on the system (this happens for instance if
the "rpm" package is installed or removed but not purged), the call to smart.initPlugins() in landscape/package/facade.py makes the landscape-client-reporter crash.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

If you have the right distro.py in place (as our package should do), this shouldn't be an issue, since our distro.py file explicitly disables the rpm detection. Did you have that file in place when that happened?

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

For the record, as we discussed online this is actually a problem indeed, because distro.py only acts when the configuration is *not* in read-only mode. The right fix is for the plugin itself to not do anything in case it is in read-only mode, since changing channels permanently in this case (as it attempts to do) isn't possible.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

This issue has been fixed in Smart's trunk revision 868. We must package the fix with 1.3.2.

Changed in landscape-client:
assignee: nobody → Free Ekanayaka (free.ekanayaka)
status: New → In Progress
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

The fix is now included in the smart packages in my PPA (version >= 1.2-4~4).

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

And the fix on the landscape-client side is to require the fixed version of smart.

Changed in smart:
status: New → Fix Committed
Jamu Kakar (jkakar)
tags: added: needs-testing
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

The landscape-client package now requires python-smartpm >= 1.2-0ubuntu1, which sports the required fix-

Changed in landscape-client:
status: In Progress → Fix Committed
tags: removed: needs-testing
Revision history for this message
Anders F Björklund (afb) wrote :

Already in trunk, so...

Changed in smart:
milestone: none → 1.3
Changed in smart (Ubuntu):
status: New → Invalid
Revision history for this message
Anders F Björklund (afb) wrote :

How can it be "Invalid" if it was fixed already ?

description: updated
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Sorry, it was the wrong status, just fixed it.

Changed in smart (Ubuntu):
status: Invalid → Fix Committed
Changed in landscape-client:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Is this fixed in karmic? If so, please close karmic task.

Changed in smart (Ubuntu Jaunty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted smart into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Mathias Gug (mathiaz) wrote :

In karmic - 1.2-4 - Marking Fixed Released.

Changed in smart (Ubuntu):
status: Fix Committed → Fix Released
tags: added: ubuntu
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted smart into intrepid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in smart (Ubuntu Intrepid):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package smart - 1.2-0ubuntu1.9.04.1

---------------
smart (1.2-0ubuntu1.9.04.1) jaunty-proposed; urgency=low

  * Bug fixing update (LP: #347983)
    - 04_detect_plugins.dpatch crasher fix (LP: #388577)
    - 05_curl_timeout.dpatch fix failures when downloading big packages (LP: #389001)

 -- Free Ekanayaka <email address hidden> Mon, 22 Jun 2009 18:27:19 +0200

Changed in smart (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package smart - 1.1.1~bzr20081010-0ubuntu1.8.10.0

---------------
smart (1.1.1~bzr20081010-0ubuntu1.8.10.0) intrepid-proposed; urgency=low

  * Bug-fixing SRU (LP: #347983)
    - Added timeout for smart connections (LP: #268261)
    - New landscape plugin to set proxy for smart too,
      inheriting it from the landscape config (LP: #236884)
    - Added 04_detect_plugins crasher fix (LP: #388577)
    - Added 05_curl_timeout fix for failures when downloading big
      packages (LP: #389001)

 -- Free Ekanayaka <email address hidden> Wed, 07 Oct 2009 09:16:59 +0200

Changed in smart (Ubuntu Intrepid):
status: Fix Committed → Fix Released
Changed in smart:
milestone: 1.3 → 1.2.1
Changed in smart:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.