From 137983a2058d512a280039e98581c590f1334431 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 06 2016 15:40:33 +0000 Subject: import resource-agents-3.9.5-82.el7_3.1 --- diff --git a/SOURCES/bz1391495-nfsserver-keep-options.patch b/SOURCES/bz1391495-nfsserver-keep-options.patch new file mode 100644 index 0000000..2889084 --- /dev/null +++ b/SOURCES/bz1391495-nfsserver-keep-options.patch @@ -0,0 +1,54 @@ +diff -uNr a/heartbeat/nfsserver b/heartbeat/nfsserver +--- a/heartbeat/nfsserver 2016-10-28 10:51:35.357385160 +0200 ++++ b/heartbeat/nfsserver 2016-10-28 13:22:16.844380108 +0200 +@@ -434,7 +434,12 @@ + # only write to the tmp /etc/sysconfig/nfs if sysconfig exists. + # otherwise this distro does not support setting these options. + if [ -d "/etc/sysconfig" ]; then +- echo "${key}=\"${value}\"" >> $file ++ # replace if the value exists, append otherwise ++ if grep "^\s*${key}=" $file ; then ++ sed -i "s/\s*${key}=.*$/${key}=\"${value}\"/" $file ++ else ++ echo "${key}=\"${value}\"" >> $file ++ fi + elif [ "$requires_sysconfig" = "true" ]; then + ocf_log warn "/etc/sysconfig/nfs not found, unable to set port and nfsd args." + fi +@@ -447,6 +452,11 @@ + local tmpconfig=$(mktemp ${HA_RSCTMP}/nfsserver-tmp-XXXXX) + local statd_args + ++ if [ -f "$NFS_SYSCONFIG" ]; then ++ ## Take the $NFS_SYSCONFIG file as our skeleton ++ cp $NFS_SYSCONFIG $tmpconfig ++ fi ++ + # nfsd args + set_arg "RPCNFSDARGS" "$OCF_RESKEY_nfsd_args" "$tmpconfig" "true" + +@@ -477,14 +487,20 @@ + + # override local nfs config. preserve previous local config though. + if [ -s $tmpconfig ]; then +- cat $NFS_SYSCONFIG | grep -e "$NFS_SYSCONFIG_AUTOGEN_TAG" ++ cat $NFS_SYSCONFIG | grep -q -e "$NFS_SYSCONFIG_AUTOGEN_TAG" > /dev/null 2>&1 + if [ $? -ne 0 ]; then + # backup local nfs config if it doesn't have our HA autogen tag in it. + mv -f $NFS_SYSCONFIG $NFS_SYSCONFIG_LOCAL_BACKUP + fi +- echo "# $NFS_SYSCONFIG_AUTOGEN_TAG" > $NFS_SYSCONFIG +- echo "# local config backup stored here, '$NFS_SYSCONFIG_LOCAL_BACKUP'" >> $NFS_SYSCONFIG +- cat $tmpconfig >> $NFS_SYSCONFIG ++ ++ cat $tmpconfig | grep -q -e "$NFS_SYSCONFIG_AUTOGEN_TAG" > /dev/null 2>&1 ++ if [ $? -ne 0 ]; then ++ echo "# $NFS_SYSCONFIG_AUTOGEN_TAG" > $NFS_SYSCONFIG ++ echo "# local config backup stored here, '$NFS_SYSCONFIG_LOCAL_BACKUP'" >> $NFS_SYSCONFIG ++ cat $tmpconfig >> $NFS_SYSCONFIG ++ else ++ cat $tmpconfig > $NFS_SYSCONFIG ++ fi + fi + rm -f $tmpconfig + } diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index 04b8f00..08a6617 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -32,7 +32,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 3.9.5 -Release: 82%{?dist} +Release: 82%{?dist}.1 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -168,6 +168,7 @@ Patch123: bz1328386-2-oracle-monprofile-container-databases.patch Patch124: bz1328386-3-oracle-monprofile-container-databases.patch Patch125: bz1303037-2-portblock.patch Patch126: bz1249430-2-tomcat-fix-selinux-enforced.patch +Patch127: bz1391495-nfsserver-keep-options.patch Obsoletes: heartbeat-resources <= %{version} Provides: heartbeat-resources = %{version} @@ -401,6 +402,7 @@ exit 1 %patch124 -p1 -F2 %patch125 -p1 %patch126 -p1 +%patch127 -p1 %build if [ ! -f configure ]; then @@ -655,6 +657,11 @@ ccs_update_schema > /dev/null 2>&1 ||: %endif %changelog +* Fri Nov 4 2016 Oyvind Albrigtsen - 3.9.5-82.1 +- nfsserver: fix to preserve options in /etc/sysconfig/nfs + + Resolves: rhbz#1391495 + * Tue Sep 20 2016 Oyvind Albrigtsen - 3.9.5-82 - portblock: create tickle_dir if it doesn't exist - tomcat: use systemd if available