** Description changed:
- If the /var/lib/rpm directory exists on the system (this happens if
- the "rpm" package is installed), the call to smart.initPlugins() in
- landscape/package/facade.py makes the reporter crash with:
+ The Landscape Team has proposed a SRU to fix this bug.
- Traceback (most recent call last):
- File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line
328, in _runCallbacks
- self.result = callback(self.result, *args, **kw)
- File "./landscape/package/reporter.py", line 52, in <lambda>
- result.addCallback(lambda x: self.request_unknown_hashes())
- File "./landscape/package/reporter.py", line 278, in request_unknown_hashes
- self.ensure_channels_reloaded()
- File "./landscape/package/taskhandler.py", line 30, in
ensure_channels_reloaded
- self._facade.reload_channels()
- File "./landscape/package/facade.py", line 94, in reload_channels
- ctrl = self._get_ctrl()
- File "./landscape/package/facade.py", line 73, in _get_ctrl
- smart.initPlugins()
- File "/usr/lib/python2.6/dist-packages/smart/__init__.py", line 185, in
initPlugins
- __import__("smart.plugins."+entry[:-3])
- File "/usr/lib/python2.6/dist-packages/smart/plugins/detectsys.py", line
66, in <module>
- detectRPMSystem()
- File "/usr/lib/python2.6/dist-packages/smart/plugins/detectsys.py", line
34, in detectRPMSystem
- "name": "RPM System"
- File "/usr/lib/python2.6/dist-packages/smart/sysconfig.py", line 226, in set
- self.assertWritable()
- File "/usr/lib/python2.6/dist-packages/smart/sysconfig.py", line 66, in
assertWritable
- raise Error, _("Configuration is in readonly mode.")
- Error: Configuration is in readonly mode.
+ Statement explaining the impact
+ =====================
- Looking at the smart code shows that the problem is in
- plugins/detectsys.py:
+ 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.
- def detectRPMSystem():
- dir = os.path.join(sysconf.get("rpm-root", "/"), "var/lib/rpm")
- if os.path.isdir(dir):
- for alias in sysconf.keys("channels"):
- if sysconf.get(("channels", alias, "type")) == "rpm-sys":
- break
- else:
- sysconf.set("channels.rpm-sys", {
- "type": "rpm-sys",
- "name": "RPM System"
- })
+ How the bug has been addressed
+ ======================
- because of the sysconf.set call in the else: branch.
+ By conditionally loading the rpm smart plugin if it's available.
- affects landscape-client
- importance medium
- milestone 1.3.2
+ 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.
--
The presence of /var/lib/rpm makes the reporter crash
https://bugs.launchpad.net/bugs/388577
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs