Bug 730737

Summary: candlepin-tomcat6 rpm is leaving around old files
Product: [Community] Candlepin Reporter: Jesus M. Rodriguez <jesusr>
Component: candlepinAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.5   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 13:03:10 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:
Attachments:
Description Flags
list of files not cleaned up from previous installations
none
tomcat log file
none
rpm -ql listing of candlepin-tomcat6
none
listing of exploded files in tomcat webapps dir for candlepin none

Description Jesus M. Rodriguez 2011-08-15 15:05:50 UTC
Description of problem:
When upgrading candlepin-tomcat6 (or any of the candlepin-* subpackages)
we are leaving around lingering files from the previous installs.

Version-Release number of selected component (if applicable):


How reproducible:
Install candlepin < 0.4.10. Then upgrade to 0.4.10. Then run:

find /var/lib/tomcat6/webapps/candlepin -type f -exec rpm -q --whatprovides {} \; | grep "not owned by any package"

That should list out all the files that were left behind.

Comment 1 Jesus M. Rodriguez 2011-08-15 15:06:19 UTC
Created attachment 518271 [details]
list of files not cleaned up from previous installations

Comment 2 Jesus M. Rodriguez 2011-08-15 15:07:09 UTC
Created attachment 518272 [details]
tomcat log file

Notice in the log file, that we are looking for a non-existent database table: cp_subscription_token.

Comment 3 Jesus M. Rodriguez 2011-08-15 15:07:33 UTC
Created attachment 518273 [details]
rpm -ql listing of candlepin-tomcat6

Comment 4 Jesus M. Rodriguez 2011-08-15 15:08:11 UTC
Created attachment 518274 [details]
listing of exploded files in tomcat webapps dir for candlepin

Comment 5 Jesus M. Rodriguez 2011-08-15 15:11:42 UTC
tarball of exploded tomcat webapps dir: 

http://jmrodri.fedorapeople.org/tomcat-webapps-dir.tgz

Comment 6 Jesus M. Rodriguez 2011-11-21 18:59:52 UTC
fixed by e167a8d580192ca97adab8db3240e7091386e587 in master.
Requires candlepin-tomcat6 0.5.1 or greater.

Comment 7 Jesus M. Rodriguez 2011-11-21 19:07:07 UTC
test plan
--------------
* install Candlepin 0.4.25 or 0.4.27, get a list of files from both
  candlepin and candlepin-tomcat6 packages

  * rpm -ql candlepin | xargs -n 1 ls -la > /tmp/candlepin-files.txt
  * rpm -ql candlepin-tomcat6 | xargs -n 1 ls -la > /tmp/candlepin-tomcat6-files.txt

* Now upgrade to candlepin-* 0.5.1 or newer
  * rpm -ql candlepin | xargs -n 1 ls -la > /tmp/candlepin-files.txt
  * rpm -ql candlepin-tomcat6 | xargs -n 1 ls -la > /tmp/candlepin-tomcat6-files.txt

Compare the files. Ensure that files from 0.4.x are not still around.

Comment 8 Bryan Kearney 2012-07-17 13:03:10 UTC
Marking all community bugs modified or beyong as closed.