On Fri, Mar 14, 2014 at 11:18:06AM +0100, Martin Perina wrote:
fence_kdump configuration and list of nodes should be in the same
directory:
/etc/sysconfig/fence_kdump
Thinking more about these files.
This is a general question for anybody who can answer. So which package
owns fence_kdump file?
IIUC, nobody owns it and current uderstanding seems to be that a user
will drop fence_kdump file and any fence_kdump_send options in there.
I think it is a bad idea. If fence_kdump_send needs options, then it
probably should create this config file and own it.
/etc/sysconfig/fence_kdump_nodes
And which package will own this file? Again looks like nobody.
I don't think we can go about dumping files in /etc/ and /etc/sysconfig
which are not owned by any package.
I guess we need to then go back to the idea of invoking some kind of
tool which can give a list of nodes or retrieve a file containing
nodes or whatever.
Or vdsm package can own a config file which is present somewhere in
the system say /var/vdsm/list-of-nodes.
Thanks
Vivek
Signed-off-by: Martin Perina <mperina(a)redhat.com>
---
dracut-module-setup.sh | 5 +++--
kdump-lib.sh | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index bdadf7c..eae7cc4 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -418,7 +418,7 @@ kdump_check_iscsi_targets () {
# setup fence_kdump in cluster
# setup proper network and install needed files
-# also preserve '[node list]' for 2nd kernel /etc/fence_kdump_nodes
+# also preserve '[node list]' for 2nd kerneli in $FENCE_KDUMP_NODES
kdump_check_fence_kdump () {
local nodes
is_fence_kdump || return 1
@@ -442,7 +442,8 @@ kdump_check_fence_kdump () {
done
echo
- echo "$nodes" > ${initdir}/$FENCE_KDUMP_NODES
+ mkdir -p ${initdir}$FENCE_KDUMP_CFG_DIR
+ echo "$nodes" > ${initdir}$FENCE_KDUMP_NODES
dracut_install $FENCE_KDUMP_SEND
dracut_install -o $FENCE_KDUMP_CONFIG
}
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 384f7b4..cdffe35 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -3,9 +3,10 @@
# Kdump common variables and functions
#
-FENCE_KDUMP_CONFIG="/etc/sysconfig/fence_kdump"
+FENCE_KDUMP_CFG_DIR="/etc/sysconfig"
+FENCE_KDUMP_CONFIG="$FENCE_KDUMP_CFG_DIR/fence_kdump"
FENCE_KDUMP_SEND="/usr/libexec/fence_kdump_send"
-FENCE_KDUMP_NODES="/etc/fence_kdump_nodes"
+FENCE_KDUMP_NODES="$FENCE_KDUMP_CFG_DIR/fence_kdump_nodes"
is_ssh_dump_target()
{
--
1.8.3.1