|
|
233933 |
From 8a3035bf612943694a3cd1c6a857bd009e84f55d Mon Sep 17 00:00:00 2001
|
|
|
233933 |
From: Milind Changire <mchangir@redhat.com>
|
|
|
233933 |
Date: Tue, 10 Oct 2017 09:58:24 +0530
|
|
|
233933 |
Subject: [PATCH 19/52] build: launch glusterd upgrade after all new bits are
|
|
|
233933 |
installed
|
|
|
233933 |
|
|
|
233933 |
Problem:
|
|
|
233933 |
glusterd upgrade mode needs new bits from glusterfs-rdma which
|
|
|
233933 |
optional and causes the dependency graph to break since it is
|
|
|
233933 |
not tied into glusterfs-server requirements
|
|
|
233933 |
|
|
|
233933 |
Solution:
|
|
|
233933 |
Run glusterd upgrade mode after all new bits are installed
|
|
|
233933 |
i.e. in %posttrans server section
|
|
|
233933 |
|
|
|
233933 |
Label: DOWNSTREAM ONLY
|
|
|
233933 |
|
|
|
233933 |
Change-Id: I356e02d0bf0eaaef43c20ce07b388262f63093a4
|
|
|
233933 |
Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
233933 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/120094
|
|
|
233933 |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
233933 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
233933 |
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
|
|
|
233933 |
---
|
|
|
233933 |
glusterfs.spec.in | 51 +++++++++++++++++++++++++++++----------------------
|
|
|
233933 |
1 file changed, 29 insertions(+), 22 deletions(-)
|
|
|
233933 |
|
|
|
233933 |
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
|
|
|
233933 |
index 3a98822..208a82d 100644
|
|
|
233933 |
--- a/glusterfs.spec.in
|
|
|
233933 |
+++ b/glusterfs.spec.in
|
|
|
233933 |
@@ -946,28 +946,6 @@ fi
|
|
|
233933 |
%firewalld_reload
|
|
|
233933 |
%endif
|
|
|
233933 |
|
|
|
233933 |
-pidof -c -o %PPID -x glusterd &> /dev/null
|
|
|
233933 |
-if [ $? -eq 0 ]; then
|
|
|
233933 |
- kill -9 `pgrep -f gsyncd.py` &> /dev/null
|
|
|
233933 |
-
|
|
|
233933 |
- killall --wait glusterd &> /dev/null
|
|
|
233933 |
- glusterd --xlator-option *.upgrade=on -N
|
|
|
233933 |
-
|
|
|
233933 |
- #Cleaning leftover glusterd socket file which is created by glusterd in
|
|
|
233933 |
- #rpm_script_t context.
|
|
|
233933 |
- rm -f %{_rundir}/glusterd.socket
|
|
|
233933 |
-
|
|
|
233933 |
- # glusterd _was_ running, we killed it, it exited after *.upgrade=on,
|
|
|
233933 |
- # so start it again
|
|
|
233933 |
- %service_start glusterd
|
|
|
233933 |
-else
|
|
|
233933 |
- glusterd --xlator-option *.upgrade=on -N
|
|
|
233933 |
-
|
|
|
233933 |
- #Cleaning leftover glusterd socket file which is created by glusterd in
|
|
|
233933 |
- #rpm_script_t context.
|
|
|
233933 |
- rm -f %{_rundir}/glusterd.socket
|
|
|
233933 |
-fi
|
|
|
233933 |
-exit 0
|
|
|
233933 |
%endif
|
|
|
233933 |
|
|
|
233933 |
##-----------------------------------------------------------------------------
|
|
|
233933 |
@@ -2027,6 +2005,35 @@ os.remove(tmpname)
|
|
|
233933 |
if not (ok == 0) then
|
|
|
233933 |
error("Detected running glusterfs processes", ok)
|
|
|
233933 |
end
|
|
|
233933 |
+
|
|
|
233933 |
+%posttrans server
|
|
|
233933 |
+pidof -c -o %PPID -x glusterd &> /dev/null
|
|
|
233933 |
+if [ $? -eq 0 ]; then
|
|
|
233933 |
+ kill -9 `pgrep -f gsyncd.py` &> /dev/null
|
|
|
233933 |
+
|
|
|
233933 |
+ killall --wait -SIGTERM glusterd &> /dev/null
|
|
|
233933 |
+
|
|
|
233933 |
+ if [ "$?" != "0" ]; then
|
|
|
233933 |
+ echo "killall failed while killing glusterd"
|
|
|
233933 |
+ fi
|
|
|
233933 |
+
|
|
|
233933 |
+ glusterd --xlator-option *.upgrade=on -N
|
|
|
233933 |
+
|
|
|
233933 |
+ #Cleaning leftover glusterd socket file which is created by glusterd in
|
|
|
233933 |
+ #rpm_script_t context.
|
|
|
233933 |
+ rm -rf /var/run/glusterd.socket
|
|
|
233933 |
+
|
|
|
233933 |
+ # glusterd _was_ running, we killed it, it exited after *.upgrade=on,
|
|
|
233933 |
+ # so start it again
|
|
|
233933 |
+ %service_start glusterd
|
|
|
233933 |
+else
|
|
|
233933 |
+ glusterd --xlator-option *.upgrade=on -N
|
|
|
233933 |
+
|
|
|
233933 |
+ #Cleaning leftover glusterd socket file which is created by glusterd in
|
|
|
233933 |
+ #rpm_script_t context.
|
|
|
233933 |
+ rm -rf /var/run/glusterd.socket
|
|
|
233933 |
+fi
|
|
|
233933 |
+
|
|
|
233933 |
%endif
|
|
|
233933 |
|
|
|
233933 |
%changelog
|
|
|
233933 |
--
|
|
|
233933 |
1.8.3.1
|
|
|
233933 |
|