Bug 56363 - Update Agent falsely reports successful installation of RPMs
Update Agent falsely reports successful installation of RPMs
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: up2date (Show other bugs)
7.1
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-16 00:52 EST by Robert Nichols
Modified: 2015-01-07 18:52 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-12-03 16:03:30 EST
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 Robert Nichols 2001-11-16 00:52:11 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.9-12.rkn-02 i586; Nav)

Description of problem:
The update agent reports RPMs installed successfully even when the /usr
filesystem is mounted read-only and the installation actually failed.

Version-Release number of selected component (if applicable):
up2date-2.5.4-1.i386

How reproducible:
Always

Steps to Reproduce:
1.Mount the /usr filesystem read-only.
2.Run up2date and update any package requiring files on /usr to be
rewritten.
3.Observe that the update agent proclaims, "The Red Hat Update Agent has
finished installing the following packages successfully: ..."
4. Run "rpm -q" and observe that the RPMs have in fact not been updated.
	

Actual Results:  

"The Red Hat Update Agent has finished installing
 the following packages successfully:

pam-0.75-18.7
usermode-1.46-1"

# rpm -q pam usermode
pam-0.74-22
usermode-1.42-1
# mount | grep /usr
/dev/hda5 on /usr type ext2 (ro)
#


Additional info:

One could argue that the bug is actually in the rpm utility, since it
returns a zero completion code after the unsuccessful install, but "rpm"
does at least generate error messages on stderr in this case.
Comment 1 Adrian Likins 2001-12-03 13:23:37 EST
I need to dig into rpm and see why librpm isnt complaining about this.

And just to be sure, has up2date been configured to just download
packages?

Comment 2 Robert Nichols 2001-12-03 16:03:25 EST
The configuration for up2date is to auto-install after download.  However, I've
been unable to reproduce the "0" return code from rpm after the failed install.
The behavior of up2date claiming that the failed install was successful _is_
100% repeatable, even when running up2date in text mode:

# rpm -q devfsd
devfsd-2.4.2-2
# up2date -p
Updating package profile...
# up2date -v devfsd

Retrieving list of all available packages...

Removing installed packages from list of updates...
########################################

Removing packages with files not specified from list...

Removing packages marked to skip from list...
########################################

Getting headers for available packages...
########################################

Removing packages with files marked to skip from list...
########################################

Testing package set / solving RPM inter-dependencies...
########################################
Retrieving selected packages...
devfsd:                     ########################## Done.                   
Preparing...                ########################################### [100%]
   1:devfsd                 error: can't rename /usr/share/man/man8/devfsd.8.gz
to /usr/share/man/man8/devfsd.8.gz-RPMDELETE: Read-only file system
error: unpacking of archive failed on file /usr/share/man/man8/devfsd.8.gz:
cpio: unlink failed - Read-only file system
# echo $?
0

When the above update is performed using the GUI Update Agent, the messages from
rpm are not shown and there is no clue that the install failed.  Here is what
running rpm directly does:

# cd /var/spool/up2date/
/var/spool/up2date # ls
devfsd-2.4.3-12.i386.hdr  devfsd-2.4.3-12.i386.rpm
/var/spool/up2date # rpm -U devfsd-2.4.3-12.i386.rpm 
error: can't rename /usr/share/man/man8/devfsd.8.gz to
/usr/share/man/man8/devfsd.8.gz-RPMDELETE: Read-only file system
error: unpacking of archive failed on file /usr/share/man/man8/devfsd.8.gz:
cpio: unlink failed - Read-only file system
/var/spool/up2date # echo $?
1
/var/spool/up2date # rpm -q up2date rpm
up2date-2.5.4-1
rpm-4.0.2-8



Comment 3 Adrian Likins 2002-05-08 17:44:56 EDT
This should be fixed in 7.3. Better error reporting was added
to librpm, and up2date makes use of it.

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