Bug 852033

Summary: After uninstalling the glusterfs RPMs, files and directories are left behind
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: buildAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Turner <bturner>
Severity: low Docs Contact:
Priority: low    
Version: pre-releaseCC: bturner, gluster-bugs
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 829734 Environment:
Last Closed: 2013-07-24 17:25:07 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 829734    

Description Niels de Vos 2012-08-27 11:53:22 UTC
+++ This bug was initially created as a clone of Bug #829734 +++

Description of problem:
When uninstalling the glusterfs RPMs, files and directories under /var/lib/glusterd are not removed, not renamed to have a .rpmsave extension.

Version-Release number of selected component (if applicable):
glusterfs-3.2.6 but also glusterfs-3.3.0-1

How reproducible:
100%

Steps to Reproduce:
1. install some glusterfs RPMs, or install the RHS-2.0
2. yum remove glusterfs
  
Actual results:

# yum remove glusterfs
...
Removed:
  glusterfs.x86_64 0:3.3.0-1                                                    

Dependency Removed:
  glusterfs-fuse.x86_64 0:3.3.0-1   glusterfs-geo-replication.x86_64 0:3.3.0-1  

Complete!

# find /var/lib/glusterd
/var/lib/glusterd
/var/lib/glusterd/hooks
/var/lib/glusterd/hooks/1
/var/lib/glusterd/hooks/1/stop
/var/lib/glusterd/hooks/1/stop/post
/var/lib/glusterd/hooks/1/stop/pre
/var/lib/glusterd/hooks/1/start
/var/lib/glusterd/hooks/1/start/post
/var/lib/glusterd/hooks/1/start/pre
/var/lib/glusterd/hooks/1/remove-brick
/var/lib/glusterd/hooks/1/remove-brick/post
/var/lib/glusterd/hooks/1/remove-brick/pre
/var/lib/glusterd/hooks/1/add-brick
/var/lib/glusterd/hooks/1/add-brick/post
/var/lib/glusterd/hooks/1/add-brick/pre
/var/lib/glusterd/hooks/1/set
/var/lib/glusterd/hooks/1/set/post
/var/lib/glusterd/hooks/1/set/pre
/var/lib/glusterd/hooks/1/create
/var/lib/glusterd/hooks/1/create/post
/var/lib/glusterd/hooks/1/create/pre
/var/lib/glusterd/hooks/1/delete
/var/lib/glusterd/hooks/1/delete/post
/var/lib/glusterd/hooks/1/delete/pre
/var/lib/glusterd/glusterd.info
/var/lib/glusterd/glustershd
/var/lib/glusterd/geo-replication
/var/lib/glusterd/geo-replication/gsyncd.conf
/var/lib/glusterd/vols
/var/lib/glusterd/nfs
/var/lib/glusterd/peers


Expected results:
All important configuration files should be kept and automatically have a .rpmsave extension added (marked as %config in the .spec).

Any empty directories available under /var/lib/glusterd should be removed automatically.

--- Additional comment from pm-rhel on 2012-06-07 15:04:01 CEST ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from ndevos on 2012-06-07 18:30:22 CEST ---

Created attachment 590243 [details]
proposed changes to the spec file

These changes for the spec file make sure that all files and directories under /var/lib/glusterd are removed. Tests on one of my RHS installations were successful.

A test-build based on glusterfs-3.3.0qa45-1.el6 is underway:
- http://brewweb.devel.redhat.com/brew/taskinfo?taskID=4491266

--- Additional comment from ndevos on 2012-06-07 18:32:45 CEST ---

The customer who filed this problem is running 3.2.6 on Amazon. Shall I clone this bug for 3.2.6 and propose a fix there as well?

--- Additional comment from ndevos on 2012-06-08 12:01:54 CEST ---

Filed for review upstream as http://review.gluster.com/3539

--- Additional comment from vbellur on 2012-07-03 18:45:03 CEST ---

CHANGE: http://review.gluster.com/3539 (Mark /var/lib/glusterd as owned by glusterfs, subdirs belong to -server) merged in master by Anand Avati (avati)

--- Additional comment from amarts on 2012-07-04 11:15:52 CEST ---

Niels sent a patch to upstream, which got accepted. changing bug owner to ndevos as he fixed it :-)

Comment 1 Niels de Vos 2013-01-02 15:42:56 UTC
Additional files should be owned by the RPMs as well. Change submitted for
review:
- http://review.gluster.org/4361