Bug 479026

Summary: rhn_check fails if rpmdb is corrupted
Product: Red Hat Enterprise Linux 5 Reporter: Karel Volný <kvolny>
Component: rhnsdAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: cperry
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-21 04:05:35 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:

Description Karel Volný 2009-01-06 16:01:34 UTC
Description of problem:
When rpmdb is corrupted, rhn_check fails to contact RHN.

Version-Release number of selected component (if applicable):
rhn_check (Red Hat Network Client Tools) 0.4.17-8.el5

How reproducible:
always


Steps to Reproduce:
1. Register a system to RHN
2. Schedule a reboot for that system
3. Corrupt rpmdb (deleting /var/lib/rpm/__db.002 worked for me)
4. run rhn_check
  

Actual results:
.qa.[root@dellgx240 ~]# rhn_check
rpmdb: /var/lib/rpm/__db.002: No such file or directory
error: db4 error(2) from dbenv->open: No such file or directory
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
An error has occurred:
exceptions.TypeError
See /var/log/up2date for more information

the "Checked In:" date in RHN webinterface does not change


Expected results:
.qa.[root@dellgx240 sysconfig]# rhn_check 

Broadcast message from root (pts/0) (Tue Jan  6 08:59:36 2009):

The system is going DOWN for reboot in 3 minutes!

the "Checked In:" date in RHN webinterface changes


Additional info:
This bug prevents a damaged system to be repaired by scheduling a kickstart reinstall using RHN, for example.

Comment 1 Clifford Perry 2009-02-21 04:04:34 UTC
We have no chance of performing an rpm transaction to install the needed rhn-kickstart or auto-kickstart packages if the rpm db is corrupted. There is very few things I would expect to work in picking up an event. The use case of reinstall OS for corrupt rpm DB is very very bad... always try and fix/repair the rpm db.

Cliff

Comment 2 RHEL Program Management 2009-02-21 04:05:35 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.