----- Original Message -----
From: "Vivek Goyal" <vgoyal(a)redhat.com>
To: "Martin Perina" <mperina(a)redhat.com>
Cc: kexec(a)lists.fedoraproject.org
Sent: Friday, March 14, 2014 10:18:36 PM
Subject: Re: Adding support for manually configured fence_kdump v2
On Fri, Mar 14, 2014 at 03:29:31AM -0400, Martin Perina wrote:
[..]
> > > @@ -421,28 +421,41 @@ kdump_check_iscsi_targets () {
> > > # also preserve '[node list]' for 2nd kernel
/etc/fence_kdump_nodes
> > ^^^^^^^^
> > Need to change to /etc/sysconfig/fence_kdump_nodes?
>
> IMO it's standard directory for system configuration. And when fence_kdump
> config file is already there, why should fence_kdump_nodes be on different
> place?
I was referring to the fact that in the code you changed the directory
to /etc/sysconfig/ but comment was not changed to reflect that.
Actually I am not sure what's the difference between /etc/ and
/etc/sysconfig/ and which configuration file should go where. I will
try to find more about it.
>
> But if you don't like the idea we can move both files for example to
> /etc/fence_kdump directory (RPM fence-agents-kdump doensn't include any
> info about configuration, it just contains only 2 binaries and man pages).
I think fence_kdump_send might be assuming presence of /etc/fence_kdump
for any configuration. So you probably can't change that without changing
fence_kdump_send too.
No, fence_kdump and fence_kdump_send doesn't read only config files, they
completely rely on defaults and command line arguments ...
So the question is only about fence_kdump_nodes file and whether it should
be in /etc/ or /etc/sysconfig/.
Well, I don't care in which of those directories they will be, but IMO they should
be in the same directory.
[..]
> > > - echo "$nodes" > ${initdir}/$FENCE_KDUMP_NODES
> > > + mkdir -p ${initdir}$FENCE_KDUMP_NODES
> > > + rmdir ${initdir}$FENCE_KDUMP_NODES
> > > + echo "$nodes" > ${initdir}$FENCE_KDUMP_NODES
> >
> > What's that mkdir/rmdir magic. Also why are you not saving nodes into
> > ${initdir}/$FENCE_KDUMP_NODES file?
>
> ${initdir}/etc/sysconfig directory doesn't exist yet
>
> >
> > Why don't you do.
> >
> > mkdir -p ${initdir}/etc/sysconfig
> > echo "$nodes" > ${initdir}$FENCE_KDUMP_NODES
>
> If I do rmdir/mkdir I don't care what's the value of variable. In your
> case I need to know that FENCE_KDUMP_NODES contains /etc/sysconfig
> directory
> and then filename with nodes
sorry, I did not understand what you are trying to say.
If you do this:
mkdir -p ${initdir}/etc/sysconfig
echo "$nodes" > ${initdir}$FENCE_KDUMP_NODES
you have to be sure, that FENCE_KDUMP_NODES contains "/etc/sysconfig/FILENAME",
otherwise script will fail. And if you change FENCE_KDUMP_NODES (for example
to /etc/fence_kdump/fence_kdump.conf) in future, you may also need to change
mkdir command path (which may not be that obvious at the first look).
If you do this:
mkdir -p ${initdir}$FENCE_KDUMP_NODES
rmdir ${initdir}$FENCE_KDUMP_NODES
echo "$nodes" > ${initdir}$FENCE_KDUMP_NODES
you only assume that FENCE_KDUMP_NODES contains valid path ending with filename,
even if you change the path in it, you don't have to change mkdir/rmdir command
arguments.