Bug 1281534

Summary: apt-get purge glusterfs-server removes non-empty /var/log/glusterfs directory
Product: [Community] GlusterFS Reporter: Tom Downes <thomas.downes>
Component: packagingAssignee: Kaleb KEITHLEY <kkeithle>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.6CC: glusterbugs, pmatthaei
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-17 13:39:04 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:

Description Tom Downes 2015-11-12 16:53:11 UTC
Description of problem:

Purging a glusterfs client of the glusterfs-server package will remove a non-empty /var/log/glusterfs directory. This directory is needed by the glusterfs-client and its non-existence will cause glusterfs mount attempts to fail.

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

How reproducible: 100%


Steps to Reproduce:
1. apt-get install glusterfs-client glusterfs-server
2. attempt to mount a glusterfs
3. unmount it
4. apt-get purge glusterfs-server
5. will not be able to mount same glusterfs (active mounts will remain OK)

Expected results: /var/log/glusterfs should not be deleted by a purge of glusterfs-server because the package depends on glusterfs-client and glusterfs-client requires the existence of this directory. /var/log/glusterfs should probably only be deleted when purging glusterfs-client.

Comment 1 Tom Downes 2015-11-12 17:02:52 UTC
Should have fully specified platform: Debian wheezy.

Comment 2 Patrick Matthäi 2015-12-16 09:24:47 UTC
Hello,

in Debian itself it is not the case. /var/log/glusterfs is included in the glusterfs-common package, where -client and -server depend on it.
So the log directory is just deleted, if you purge the -common package (which will remove also the -client and -server package).

Comment 3 Tom Downes 2015-12-27 20:53:23 UTC
Hi Patrick / Kaleb:

Back from Christmas break... :) I didn't get the notifications from Kaleb.

Patrick's comments seem to deny that this problem affected version 3.6.6 although there is a clear change from 3.6.6 to 3.6.7 that seems to be the fix I wanted. These lines were removed from the "postrm" script.

#! /bin/sh

set -e

case "$1" in
        purge)
                rm -rf /var/log/glusterfs
        ;;
...

In any instance, thank you for being responsive.

Tom