Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 7a14f9ba5c72ad4857cbf108ab28e2fe84cee91b
Parent: 70a68558c7be349cfd33486026895ed13e2e5253
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Aug 24 16:37:28 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Thu Sep 2 06:43:27 2010 +0200
fence_na: fix last installation bits required to work in our build env
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
fence/agents/node_assassin/Makefile | 16 ++++-
fence/agents/node_assassin/fence_na.conf | 84 ---------------------------
fence/agents/node_assassin/fence_na.conf.in | 84 +++++++++++++++++++++++++++
fence/agents/node_assassin/fence_na.pl | 2 +-
4 files changed, 98 insertions(+), 88 deletions(-)
diff --git a/fence/agents/node_assassin/Makefile b/fence/agents/node_assassin/Makefile
index 1587158..ce0a095 100644
--- a/fence/agents/node_assassin/Makefile
+++ b/fence/agents/node_assassin/Makefile
@@ -10,14 +10,23 @@ NACONFFILE = $(TARGET).conf
PODFILE = $(TARGET).pod
-EXTRACONFFILE = $(S)/$(NACONFFILE)
+EXTRACONFFILE = $(NACONFFILE)
-all: $(TARGET) $(PODFILE) $(MANTARGET) $(FENCEAGENTSLIB)
+SBINDIRT = $(TARGET)
+
+all: $(TARGET) $(PODFILE) $(MANTARGET) $(FENCEAGENTSLIB) $(NACONFFILE)
include $(OBJDIR)/make/clean.mk
include $(OBJDIR)/make/install.mk
include $(OBJDIR)/make/uninstall.mk
+$(NACONFFILE): $(S)/$(NACONFFILE).in
+ cat $^ | sed \
+ -e 's#@LOGDIR@#${logdir}#g' \
+ -e 's#@CONFDIR@#${CONFDIR}#g' \
+ -e 's#@CONFFILE@#${CONFFILE}#g' \
+ > $@
+
$(PODFILE): $(S)/$(PODFILE).in
cat $^ | sed \
-e 's#@NACONFFILE@#${CONFDIR}/$(NACONFFILE)#g' \
@@ -34,7 +43,8 @@ $(FENCEAGENTSLIB): $(S)/$(FENCEAGENTSLIB).in
$(TARGET): $(S)/$(TARGET).pl
cat $^ | sed \
-e 's#@NACONFFILE@#${CONFDIR}/$(NACONFFILE)#g' \
+ -e 's#@FENCEAGENTSLIBDIR@#${fenceagentslibdir}#g' \
$@
clean: generalclean
- rm -rf $(MANTARGET) $(FENCEAGENTSLIB) $(PODFILE)
+ rm -rf $(MANTARGET) $(FENCEAGENTSLIB) $(PODFILE) $(NACONFFILE)
diff --git a/fence/agents/node_assassin/fence_na.conf
b/fence/agents/node_assassin/fence_na.conf
deleted file mode 100644
index 3dced71..0000000
--- a/fence/agents/node_assassin/fence_na.conf
+++ /dev/null
@@ -1,84 +0,0 @@
-# This is the main configuration file for the Node Assassin fence device.
-#
-# This can support one or more fence devices.
-#
-# Node Assassin - Fence Agent
-# Digimer; digimer(a)alteeve.com
-# Jun. 27, 2010
-# Version: 1.1.5
-
-
-###############################################################################
-# System: #
-# - Here you setup general values for the fence agent and any/all nodes. #
-###############################################################################
-
-# This must be set to the number of Node Assassin devices you are using. It
-# must be a positive integer.
-#system::na_num = 1
-system::na_num = 1
-
-# Version of the fence_na fence agent.
-system::agent_version = 1.1.5.1
-
-# This is the log file. If unset, no logging will occur. If using '/var/log/',
-# be sure that this agent is able to create or edit the file. The default is to
-# write to '/tmp' to prevent accidental failure of the agent due to
-# misconfiguration.
-#system::log = /var/log/fence_na.log
-system::log = /var/log/fence_na.log
-
-# If set to '1', messages to STDOUT will be surpressed except in the event of
-# errors. This can be overridden at the command line with the '-q' switch.
-system::quiet = 0
-
-# Set this to '1' to enable extra debug information. Ignored if
'system::quiet'
-# is set.
-system::debug = 0
-
-# This is the authentication information... It is currently a simple plain text
-# compare, but this will change prior to first release.
-system::username = motoko
-system::password = secret
-
-
-###############################################################################
-# Devices: #
-# - Here you setup each fence device. There must be a corresponding #
-# 'node::X::var' for each node where 'X' is between 1 and
'system::na_num'. #
-###############################################################################
-
-### Define values for Node 1.
-
-# The nodes name. This must match exactly with the name set in the given node.
-na::1::na_name = Motoko
-
-# This is the IP address and port where I will connect to this node at.
-# NOTE: THIS MUST MATCH THE VALUE USED IN '/etc/cluster.conf'! If you used a
-# resolvable name there, use the same name here. Vice versa for IP addresses.
-# If this doesn't match the 'ipaddr' argument sent by the 'fenced'
daemon the
-# fence will not work properly!
-na::1::ipaddr =
motoko.alteeve.com
-na::1::tcp_port = 238
-
-# This is the number of nodes supported by this Node Assassin
-# (1 node = 2 ports; odd # = reset, even # = power)
-na::1::max_nodes = 4
-
-# These values are set when the node assassin program switch is run.
-# NOT YET IMPLEMENTED.
-na::1::mac = 02:00:00:FF:F0:AA
-na::1::netmask = 255.255.255.0
-na::1::gateway = 192.168.1.1
-
-# These are aliases for each Node Assassin port. They should match the name or
-# URI of the node connected to the given port. This is optional but will make
-# the fenced 'list' argument more accurate and sane. If a port is listed here,
-# then the 'list' action will return '<node_id>,<value>'. If
a port is not
-# defined, 'list' will return
'<node_id>,<node::X::name-node_id>'. If a port is
-# set to 'unused', it will be skipped when replying to a 'list'.
-na::1::alias::1 =
an_node01.alteeve.com
-na::1::alias::2 =
an_node02.alteeve.com
-na::1::alias::3 = unused
-na::1::alias::4 = unused
-
diff --git a/fence/agents/node_assassin/fence_na.conf.in
b/fence/agents/node_assassin/fence_na.conf.in
new file mode 100644
index 0000000..3ae6866
--- /dev/null
+++ b/fence/agents/node_assassin/fence_na.conf.in
@@ -0,0 +1,84 @@
+# This is the main configuration file for the Node Assassin fence device.
+#
+# This can support one or more fence devices.
+#
+# Node Assassin - Fence Agent
+# Digimer; digimer(a)alteeve.com
+# Jun. 27, 2010
+# Version: 1.1.5
+
+
+###############################################################################
+# System: #
+# - Here you setup general values for the fence agent and any/all nodes. #
+###############################################################################
+
+# This must be set to the number of Node Assassin devices you are using. It
+# must be a positive integer.
+#system::na_num = 1
+system::na_num = 1
+
+# Version of the fence_na fence agent.
+system::agent_version = 1.1.5.1
+
+# This is the log file. If unset, no logging will occur. If using '@LOGDIR@',
+# be sure that this agent is able to create or edit the file. The default is to
+# write to '/tmp' to prevent accidental failure of the agent due to
+# misconfiguration.
+#system::log = @LOGDIR(a)/fence_na.log
+system::log = @LOGDIR(a)/fence_na.log
+
+# If set to '1', messages to STDOUT will be surpressed except in the event of
+# errors. This can be overridden at the command line with the '-q' switch.
+system::quiet = 0
+
+# Set this to '1' to enable extra debug information. Ignored if
'system::quiet'
+# is set.
+system::debug = 0
+
+# This is the authentication information... It is currently a simple plain text
+# compare, but this will change prior to first release.
+system::username = motoko
+system::password = secret
+
+
+###############################################################################
+# Devices: #
+# - Here you setup each fence device. There must be a corresponding #
+# 'node::X::var' for each node where 'X' is between 1 and
'system::na_num'. #
+###############################################################################
+
+### Define values for Node 1.
+
+# The nodes name. This must match exactly with the name set in the given node.
+na::1::na_name = Motoko
+
+# This is the IP address and port where I will connect to this node at.
+# NOTE: THIS MUST MATCH THE VALUE USED IN '@CONFDIR@/@CONFFILE@'! If you used a
+# resolvable name there, use the same name here. Vice versa for IP addresses.
+# If this doesn't match the 'ipaddr' argument sent by the 'fenced'
daemon the
+# fence will not work properly!
+na::1::ipaddr =
motoko.alteeve.com
+na::1::tcp_port = 238
+
+# This is the number of nodes supported by this Node Assassin
+# (1 node = 2 ports; odd # = reset, even # = power)
+na::1::max_nodes = 4
+
+# These values are set when the node assassin program switch is run.
+# NOT YET IMPLEMENTED.
+na::1::mac = 02:00:00:FF:F0:AA
+na::1::netmask = 255.255.255.0
+na::1::gateway = 192.168.1.1
+
+# These are aliases for each Node Assassin port. They should match the name or
+# URI of the node connected to the given port. This is optional but will make
+# the fenced 'list' argument more accurate and sane. If a port is listed here,
+# then the 'list' action will return '<node_id>,<value>'. If
a port is not
+# defined, 'list' will return
'<node_id>,<node::X::name-node_id>'. If a port is
+# set to 'unused', it will be skipped when replying to a 'list'.
+na::1::alias::1 =
an_node01.alteeve.com
+na::1::alias::2 =
an_node02.alteeve.com
+na::1::alias::3 = unused
+na::1::alias::4 = unused
+
diff --git a/fence/agents/node_assassin/fence_na.pl
b/fence/agents/node_assassin/fence_na.pl
index 0a3503b..0d272b3 100644
--- a/fence/agents/node_assassin/fence_na.pl
+++ b/fence/agents/node_assassin/fence_na.pl
@@ -14,7 +14,7 @@ use strict;
use warnings;
# Load our library.
-require '/etc/fence_na/fence_na.lib';
+require '@FENCEAGENTSLIBDIR(a)/fence_na.lib';
# IO::Handle is used for logging and Net::Telnet is used for communicating with
# the Node Assassin(s).