From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek 'marx' Grac Date: Thu, 18 Oct 2012 11:38:55 +0200 Subject: [Cluster-devel] [PATCH] fence_na: Add support for XML metadata output Message-ID: <1350553135-2248-1-git-send-email-mgrac@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Adding a skelet for XML metadata output so fence_na can be used with corosync. Resolves: rhbz#864028 --- fence/agents/node_assassin/fence_na.lib.in | 57 ++++++++++++++++++++++++++++ fence/agents/node_assassin/fence_na.pl | 6 +++ 2 files changed, 63 insertions(+), 0 deletions(-) diff --git a/fence/agents/node_assassin/fence_na.lib.in b/fence/agents/node_assassin/fence_na.lib.in index 67d5367..dec734a 100644 --- a/fence/agents/node_assassin/fence_na.lib.in +++ b/fence/agents/node_assassin/fence_na.lib.in @@ -918,4 +918,61 @@ sub _make_hash_reference _add_hash_reference($href, $_href); } +sub show_metadata +{ + print < + +fence_na is an I/O Fencing agent which can be used with the Node Assassin network power switch. It logs into device via telnet and reboots a specified outlet. Lengthy telnet/ssh connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. +http://www.altavee.ca/w/Node_Assassin_v1.1.4 + + + + + Fencing Action + + + + + IP Address or Hostname + + + + + Login Name + + + + + Login password or passphrase + + + + + Physical plug number + + + + + Display version information and exit + + + + + Display help and exit + + + + + + + + + + + + +METADATA +} + 1; diff --git a/fence/agents/node_assassin/fence_na.pl b/fence/agents/node_assassin/fence_na.pl index bc7fb00..bdcaf69 100644 --- a/fence/agents/node_assassin/fence_na.pl +++ b/fence/agents/node_assassin/fence_na.pl @@ -106,6 +106,12 @@ foreach my $i (1..$conf->{'system'}{na_num}) } die "Exiting on errors.\n" if $bad; + +if ($conf->{na}{action} eq "metadata") { + show_metadata(); + do_exit($conf, $log, 0); +} + my @ny=("no", "yes"); record($conf, $log, "Node Assassin: . [$conf->{na}{ipaddr}].\n"); record($conf, $log, "TCP Port: ...... [$conf->{na}{tcp_port}].\n"); -- 1.7.7.6