path: root/build-gluster-org/scripts
diff options
authorMichael Scherer <>2018-10-19 16:38:16 +0200
committerMichael Scherer <>2018-10-19 16:38:16 +0200
commit8f708f2e393aa512f70a673246618285de187b3c (patch)
tree050000115461eda6ac6566f10a4806cf5b8adcca /build-gluster-org/scripts
parente1792cd73bb6e3bb960f7efae1e08a2a7d5bc213 (diff)
Add a cleanup function, fix #1641021
The script first try to cleanly remove process, and then is more forceful. The list of process have been taken from failure in the bugs, but maybe a reboot is better, as it would also get ride of mount. Change-Id: Ib775eef63aecb048afbc6c74b6c9603831eba352
Diffstat (limited to 'build-gluster-org/scripts')
1 files changed, 8 insertions, 0 deletions
diff --git a/build-gluster-org/scripts/ b/build-gluster-org/scripts/
index ade6c12..b69c1bb 100644
--- a/build-gluster-org/scripts/
+++ b/build-gluster-org/scripts/
@@ -2,6 +2,14 @@
set -e
+function cleanup() {
+ killall glusterfs etcd make glusterd2
+ sleep 5
+ killall -9 glusterfs etcd make glusterd2
+trap cleanup ERR
JDIRS="/var/log/glusterfs /var/lib/glusterd /var/run/gluster /build"
sudo rm -rf $JDIRS
sudo mkdir -p $JDIRS || true