diff options
author | anand <anekkunt@redhat.com> | 2015-05-29 13:57:00 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-06-01 01:25:38 -0700 |
commit | 4fda438a0aa55e2cb0412f8c800d01f81fe4bbbe (patch) | |
tree | 9c1b314a2ff718d14042a3bd0d5ad6408efd65c7 /glusterfs.spec.in | |
parent | e9a37d5a3471db02e1c7922cee93bf290e2f326d (diff) |
Build: glusterd socket file cleanup to set SElinux context properly.
Issue : glusterd runs as rpm_script_t when it's executed from the rpm scriptlet, socket file
created in this context is set as rpm_script_t type, glusterd unable to access socket file
when it runs in glusterd_t context (glusted not cleaning socket file while stoping due to
some cleanup issues, so cleanup required in rpm install).
Fix: In rpm post upgrade,remove the glusterd.socket file which is created by glusterd in rpm context.
so that glusterd recreates socket file when it runs in glusterd_t context.
Backport of:
>Change-Id: I57041e2e0f9d3e74e12198507a9bd47d09f4a132
>BUG: 1223185
>Signed-off-by: anand <anekkunt@redhat.com>
>Reviewed-on: http://review.gluster.org/10815
>Reviewed-by: Niels de Vos <ndevos@redhat.com>
>Tested-by: NetBSD Build System
>Tested-by: Gluster Build System <jenkins@build.gluster.com>
Change-Id: Ic97458f41e1184054cbedbeb547118b217768bbd
BUG: 1222869
Signed-off-by: anand <anekkunt@redhat.com>
Reviewed-on: http://review.gluster.org/10996
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r-- | glusterfs.spec.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 8bdcb124dd0..374435f5772 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -862,11 +862,20 @@ if [ $? -eq 0 ]; then killall --wait glusterd &> /dev/null glusterd --xlator-option *.upgrade=on -N + + #Cleaning leftover glusterd socket file which is created by glusterd in + #rpm_script_t context. + rm -rf /var/run/glusterd.socket + # glusterd _was_ running, we killed it, it exited after *.upgrade=on, # so start it again %_init_start glusterd else glusterd --xlator-option *.upgrade=on -N + + #Cleaning leftover glusterd socket file which is created by glusterd in + #rpm_script_t context. + rm -rf /var/run/glusterd.socket fi ##----------------------------------------------------------------------------- @@ -1196,6 +1205,9 @@ fi * Sat May 31 2015 Aravinda VK <avishwan@redhat.com> - Added stop-all-gluster-processes.sh in glusterfs-server section (#1225331) +* Fri May 29 2015 Anand Nekkunti <anekkunt@redhat.com> +- glusterd.socket file cleanup during post run upgrade (#1222869) + * Fri May 08 2015 Niels de Vos <ndevos@redhat.com> - Introduce glusterfs-client-xlators to reduce dependencies (#1219089) |