From: Fabio M. Di Nitto <fabbione@fabbione.net>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 1/2] fence_scsi: move key file to /var/run/cluster
Date: Tue, 01 Mar 2011 17:04:32 +0100 [thread overview]
Message-ID: <4D6D1910.7050605@fabbione.net> (raw)
In-Reply-To: <1298994907-32464-1-git-send-email-rohara@redhat.com>
Only one comment here, before attempting to read or write to
/var/run/cluster, your script needs to make sure that the directory
exists (same for the other patch).
/var/run/cluster is created only via cman init at the moment and if
fence_scsi is used outside that context, it will fail on distribution
where /var/run is on tmpfs and cluster/ does not exists.
some distributions are deploying methods to populate
/var/run/some_dir_name at boot time, but they are not consistent enough
to be trusted to behave all the same way yet.
Fabio
On 3/1/2011 4:55 PM, Ryan O'Hara wrote:
> Since the contents of /var/run/cluster/ directory are cleared on each
> reboot, move the fence_scsi.key file to that directory. This is useful
> for watchdog checks as a means to avoid watchdog reboots when a node has
> not yet unfenced or unfencing fails.
>
> Signed-off-by: Ryan O'Hara <rohara@redhat.com>
> ---
> fence/agents/scsi/fence_scsi.pl | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
> index ae658ab..e162dfe 100644
> --- a/fence/agents/scsi/fence_scsi.pl
> +++ b/fence/agents/scsi/fence_scsi.pl
> @@ -342,7 +342,7 @@ sub key_read ()
> my $self = (caller(0))[3];
> my $key;
>
> - open (\*FILE, "</var/lib/cluster/fence_scsi.key") or die "$!\n";
> + open (\*FILE, "</var/run/cluster/fence_scsi.key") or die "$!\n";
> chomp ($key = <FILE>);
> close (FILE);
>
> @@ -353,7 +353,7 @@ sub key_write ($)
> {
> my $self = (caller(0))[3];
>
> - open (\*FILE, ">/var/lib/cluster/fence_scsi.key") or die "$!\n";
> + open (\*FILE, ">/var/run/cluster/fence_scsi.key") or die "$!\n";
> print FILE "$_[0]\n";
> close (FILE);
>
prev parent reply other threads:[~2011-03-01 16:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 15:55 [Cluster-devel] [PATCH 1/2] fence_scsi: move key file to /var/run/cluster Ryan O'Hara
2011-03-01 16:04 ` Fabio M. Di Nitto [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D6D1910.7050605@fabbione.net \
--to=fabbione@fabbione.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.