Bug 814770

Summary: TPS failure - open-vm-tools %preuninstall references vmtoolsd service, but doesn't provide it
Product: [Retired] CloudForms Cloud Engine Reporter: James Laska <jlaska>
Component: open-vm-toolsAssignee: John Eckersberg <jeckersb>
Status: CLOSED WONTFIX QA Contact: wes hayutin <whayutin>
Severity: low Docs Contact:
Priority: medium    
Version: 1.0.0CC: jturner, morazi, rlandy
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 20:54:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description James Laska 2012-04-20 15:45:50 UTC
Description of problem:

TPS (tps-rpmtest) performs a 'rpm -e --nodeps' while validating package install/upgrade/downgrade.  While the package %requires are properly setup to ensure proper install and removal ordering when using rpm or yum, TPS has exposed that the %scripts between open-vm-tools and open-vm-toolsd may not be correctly defined.

It appears the %postuninstall scripts on the open-vm-tools package control a SysV service that it does not provide.  The vmtoolsd service is provided by open-vm-toolsd.  Any references to enabling/disabling or starting/stopping that service should happen in the open-vm-toolsd package (not open-vm-tools).

Version-Release number of selected component (if applicable):
 * open-vm-tools-8.8.0-7.el5.

Steps to Reproduce:
1. yum install open-vm-tools open-vm-toolsd
2. rpm -e --nodeps open-vm-tools open-vm-toolsd
  
Actual results:

> doRpmCommand-result (65280): error reading information on service vmtoolsd: No such file or directory
> error: %preun(open-vm-tools-8.8.0-7.el5.x86_64) scriptlet failed, exit status 1

Additionally, the following %scripts are involved:

> # rpm -q --scripts open-vm-tools
> preuninstall scriptlet (using /bin/sh):
> if [ $1 -eq 0 ] ; then
>   /sbin/service vmtoolsd stop >/dev/null 2>&1
>   /sbin/chkconfig --del vmtoolsd
> fi
> postuninstall scriptlet (using /bin/sh):
> if [ "$1" -ge "1" ] ; then
>   /sbin/service vmtoolsd condrestart >/dev/null 2>&1 || :
> fi

> # rpm -q --scripts open-vm-toolsd
> postinstall scriptlet (using /bin/sh):
> /sbin/chkconfig --add vmtoolsd
> if [ "$1" -ge "1" ] ; then
>   /sbin/service vmtoolsd restart >/dev/null 2>&1 || :
> fi


Expected results:

No removal failures, and any scripts handling vmtoolsd should be in the package that provides it.

> # rpm -q --scripts open-vm-tools

> # rpm -q --scripts open-vm-toolsd
> postinstall scriptlet (using /bin/sh):
> /sbin/chkconfig --add vmtoolsd
> if [ "$1" -ge "1" ] ; then
>   /sbin/service vmtoolsd restart >/dev/null 2>&1 || :
> fi
> preuninstall scriptlet (using /bin/sh):
> if [ $1 -eq 0 ] ; then
>   /sbin/service vmtoolsd stop >/dev/null 2>&1
>   /sbin/chkconfig --del vmtoolsd
> fi
> postuninstall scriptlet (using /bin/sh):
> if [ "$1" -ge "1" ] ; then
>   /sbin/service vmtoolsd condrestart >/dev/null 2>&1 || :
> fi

Additional info:

Comment 1 James Laska 2012-04-20 17:29:53 UTC
Given this package only fails when [un]installed in an unsupported manner, I'm inclined to request deferring resolution until a future release.