Add autogenerated fence-amt manifest
Add another autogenerated fence-amt manifest in order to to create stonith resources for AMT devices. Set the corresponding package to 'None' as fence-agents-amt does not exist yet in CentOS. Change-Id: I5db9300f8f5857bc5762a6658ea981d3ef01238b
This commit is contained in:
parent
a4aa655a3f
commit
782f4a1a5f
172
agent_generator/src_xml/fence_amt.xml
Normal file
172
agent_generator/src_xml/fence_amt.xml
Normal file
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" ?>
|
||||
<resource-agent name="fence_amt" shortdesc="Fence agent for AMT" >
|
||||
<longdesc>fence_amt is an I/O Fencing agent which can be used with Intel AMT. This agent calls support software amttool(http://www.kraxel.org/cgit/amtterm/).</longdesc>
|
||||
<vendor-url>http://www.intel.com/</vendor-url>
|
||||
<parameters>
|
||||
<parameter name="ipport" unique="0" required="0">
|
||||
<getopt mixed="-u, --ipport=[port]" />
|
||||
<content type="integer" default="16994" />
|
||||
<shortdesc lang="en">TCP/UDP port to use for connection with device</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="port" unique="0" required="0" deprecated="1">
|
||||
<getopt mixed="-n, --plug=[ip]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">IP address or hostname of fencing device (together with --port-as-ip)</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="inet6_only" unique="0" required="0">
|
||||
<getopt mixed="-6, --inet6-only" />
|
||||
<content type="boolean" />
|
||||
<shortdesc lang="en">Forces agent to use IPv6 addresses only</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="ipaddr" unique="0" required="0" deprecated="1">
|
||||
<getopt mixed="-a, --ip=[ip]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">IP Address or Hostname</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="inet4_only" unique="0" required="0">
|
||||
<getopt mixed="-4, --inet4-only" />
|
||||
<content type="boolean" />
|
||||
<shortdesc lang="en">Forces agent to use IPv4 addresses only</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="method" unique="0" required="0">
|
||||
<getopt mixed="-m, --method=[method]" />
|
||||
<content type="select" default="onoff" >
|
||||
<option value="onoff" />
|
||||
<option value="cycle" />
|
||||
</content>
|
||||
<shortdesc lang="en">Method to fence (onoff|cycle)</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="passwd_script" unique="0" required="0" deprecated="1">
|
||||
<getopt mixed="-S, --password-script=[script]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">Script to retrieve password</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="passwd" unique="0" required="0" deprecated="1">
|
||||
<getopt mixed="-p, --password=[password]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">Login password or passphrase</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="boot_option" unique="0" required="0">
|
||||
<getopt mixed="-b, --boot-option=[option]" />
|
||||
<content type="select" >
|
||||
<option value="pxe" />
|
||||
<option value="hd" />
|
||||
<option value="hdsafe" />
|
||||
<option value="cd" />
|
||||
<option value="diag" />
|
||||
</content>
|
||||
<shortdesc lang="en">Change the default boot behavior of the machine.</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="action" unique="0" required="1">
|
||||
<getopt mixed="-o, --action=[action]" />
|
||||
<content type="string" default="reboot" />
|
||||
<shortdesc lang="en">Fencing Action</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="plug" unique="0" required="0" obsoletes="port">
|
||||
<getopt mixed="-n, --plug=[ip]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">IP address or hostname of fencing device (together with --port-as-ip)</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="ip" unique="0" required="0" obsoletes="ipaddr">
|
||||
<getopt mixed="-a, --ip=[ip]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">IP Address or Hostname</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="password" unique="0" required="0" obsoletes="passwd">
|
||||
<getopt mixed="-p, --password=[password]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">Login password or passphrase</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="password_script" unique="0" required="0" obsoletes="passwd_script">
|
||||
<getopt mixed="-S, --password-script=[script]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">Script to retrieve password</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="verbose" unique="0" required="0">
|
||||
<getopt mixed="-v, --verbose" />
|
||||
<content type="boolean" />
|
||||
<shortdesc lang="en">Verbose mode</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="debug" unique="0" required="0" deprecated="1">
|
||||
<getopt mixed="-D, --debug-file=[debugfile]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">Write debug information to given file</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="debug_file" unique="0" required="0" obsoletes="debug">
|
||||
<getopt mixed="-D, --debug-file=[debugfile]" />
|
||||
<content type="string" />
|
||||
<shortdesc lang="en">Write debug information to given file</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="version" unique="0" required="0">
|
||||
<getopt mixed="-V, --version" />
|
||||
<content type="boolean" />
|
||||
<shortdesc lang="en">Display version information and exit</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="help" unique="0" required="0">
|
||||
<getopt mixed="-h, --help" />
|
||||
<content type="boolean" />
|
||||
<shortdesc lang="en">Display help and exit</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="power_wait" unique="0" required="0">
|
||||
<getopt mixed="--power-wait=[seconds]" />
|
||||
<content type="second" default="0" />
|
||||
<shortdesc lang="en">Wait X seconds after issuing ON/OFF</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="login_timeout" unique="0" required="0">
|
||||
<getopt mixed="--login-timeout=[seconds]" />
|
||||
<content type="second" default="5" />
|
||||
<shortdesc lang="en">Wait X seconds for cmd prompt after login</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="power_timeout" unique="0" required="0">
|
||||
<getopt mixed="--power-timeout=[seconds]" />
|
||||
<content type="second" default="20" />
|
||||
<shortdesc lang="en">Test X seconds for status change after ON/OFF</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="delay" unique="0" required="0">
|
||||
<getopt mixed="--delay=[seconds]" />
|
||||
<content type="second" default="0" />
|
||||
<shortdesc lang="en">Wait X seconds before fencing is started</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="shell_timeout" unique="0" required="0">
|
||||
<getopt mixed="--shell-timeout=[seconds]" />
|
||||
<content type="second" default="3" />
|
||||
<shortdesc lang="en">Wait X seconds for cmd prompt after issuing command</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="amttool_path" unique="0" required="0">
|
||||
<getopt mixed="--amttool-path=[path]" />
|
||||
<content type="string" default="/usr/bin/amttool" />
|
||||
<shortdesc lang="en">Path to amttool binary</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="port_as_ip" unique="0" required="0">
|
||||
<getopt mixed="--port-as-ip" />
|
||||
<content type="boolean" />
|
||||
<shortdesc lang="en">Make "port/plug" to be an alias to IP address</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="retry_on" unique="0" required="0">
|
||||
<getopt mixed="--retry-on=[attempts]" />
|
||||
<content type="integer" default="1" />
|
||||
<shortdesc lang="en">Count of attempts to retry power on</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="sudo" unique="0" required="0" deprecated="1">
|
||||
<getopt mixed="--use-sudo" />
|
||||
<content type="boolean" />
|
||||
<shortdesc lang="en">Use sudo (without password) when calling 3rd party sotfware.</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="use_sudo" unique="0" required="0" obsoletes="sudo">
|
||||
<getopt mixed="--use-sudo" />
|
||||
<content type="boolean" />
|
||||
<shortdesc lang="en">Use sudo (without password) when calling 3rd party sotfware.</shortdesc>
|
||||
</parameter>
|
||||
</parameters>
|
||||
<actions>
|
||||
<action name="on" automatic="0"/>
|
||||
<action name="off" />
|
||||
<action name="reboot" />
|
||||
<action name="status" />
|
||||
<action name="list" />
|
||||
<action name="list-status" />
|
||||
<action name="monitor" />
|
||||
<action name="metadata" />
|
||||
<action name="validate-all" />
|
||||
</actions>
|
||||
</resource-agent>
|
@ -3,6 +3,7 @@
|
||||
cmd_pkg_map=(
|
||||
"fence_apc:fence-agents-apc"
|
||||
"fence_apc_snmp:fence-agents-apc-snmp"
|
||||
"fence_amt:None"
|
||||
"fence_bladecenter:fence-agents-bladecenter"
|
||||
"fence_brocade:fence-agents-brocade"
|
||||
"fence_cisco_mds:fence-agents-cisco-mds"
|
||||
|
308
manifests/stonith/fence_amt.pp
Normal file
308
manifests/stonith/fence_amt.pp
Normal file
@ -0,0 +1,308 @@
|
||||
# == Define: pacemaker::stonith::fence_amt
|
||||
#
|
||||
# Module for managing Stonith for fence_amt.
|
||||
#
|
||||
# WARNING: Generated by "rake generate_stonith", manual changes will
|
||||
# be lost.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*ipport*]
|
||||
# TCP/UDP port to use for connection with device
|
||||
#
|
||||
# [*port*]
|
||||
# IP address or hostname of fencing device (together with --port-as-ip)
|
||||
#
|
||||
# [*inet6_only*]
|
||||
# Forces agent to use IPv6 addresses only
|
||||
#
|
||||
# [*ipaddr*]
|
||||
# IP Address or Hostname
|
||||
#
|
||||
# [*inet4_only*]
|
||||
# Forces agent to use IPv4 addresses only
|
||||
#
|
||||
# [*method*]
|
||||
# Method to fence (onoff|cycle)
|
||||
#
|
||||
# [*passwd_script*]
|
||||
# Script to retrieve password
|
||||
#
|
||||
# [*passwd*]
|
||||
# Login password or passphrase
|
||||
#
|
||||
# [*boot_option*]
|
||||
# Change the default boot behavior of the machine.
|
||||
#
|
||||
# [*action*]
|
||||
# Fencing Action
|
||||
#
|
||||
# [*plug*]
|
||||
# IP address or hostname of fencing device (together with --port-as-ip)
|
||||
#
|
||||
# [*ip*]
|
||||
# IP Address or Hostname
|
||||
#
|
||||
# [*password*]
|
||||
# Login password or passphrase
|
||||
#
|
||||
# [*password_script*]
|
||||
# Script to retrieve password
|
||||
#
|
||||
# [*verbose*]
|
||||
# Verbose mode
|
||||
#
|
||||
# [*debug*]
|
||||
# Write debug information to given file
|
||||
#
|
||||
# [*debug_file*]
|
||||
# Write debug information to given file
|
||||
#
|
||||
# [*power_wait*]
|
||||
# Wait X seconds after issuing ON/OFF
|
||||
#
|
||||
# [*login_timeout*]
|
||||
# Wait X seconds for cmd prompt after login
|
||||
#
|
||||
# [*power_timeout*]
|
||||
# Test X seconds for status change after ON/OFF
|
||||
#
|
||||
# [*delay*]
|
||||
# Wait X seconds before fencing is started
|
||||
#
|
||||
# [*shell_timeout*]
|
||||
# Wait X seconds for cmd prompt after issuing command
|
||||
#
|
||||
# [*amttool_path*]
|
||||
# Path to amttool binary
|
||||
#
|
||||
# [*port_as_ip*]
|
||||
# Make "port/plug" to be an alias to IP address
|
||||
#
|
||||
# [*retry_on*]
|
||||
# Count of attempts to retry power on
|
||||
#
|
||||
# [*sudo*]
|
||||
# Use sudo (without password) when calling 3rd party sotfware.
|
||||
#
|
||||
# [*use_sudo*]
|
||||
# Use sudo (without password) when calling 3rd party sotfware.
|
||||
#
|
||||
# [*interval*]
|
||||
# Interval between tries.
|
||||
#
|
||||
# [*ensure*]
|
||||
# The desired state of the resource.
|
||||
#
|
||||
# [*tries*]
|
||||
# The number of tries.
|
||||
#
|
||||
# [*try_sleep*]
|
||||
# Time to sleep between tries.
|
||||
#
|
||||
# [*pcmk_host_list*]
|
||||
# List of Pacemaker hosts.
|
||||
#
|
||||
# [*meta_attr*]
|
||||
# (optional) String of meta attributes
|
||||
# Defaults to undef
|
||||
#
|
||||
# === Dependencies
|
||||
# None
|
||||
#
|
||||
# === Authors
|
||||
#
|
||||
# Generated by rake generate_stonith task.
|
||||
#
|
||||
# === Copyright
|
||||
#
|
||||
# Copyright (C) 2016 Red Hat Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
define pacemaker::stonith::fence_amt (
|
||||
$ipport = undef,
|
||||
$port = undef,
|
||||
$inet6_only = undef,
|
||||
$ipaddr = undef,
|
||||
$inet4_only = undef,
|
||||
$method = undef,
|
||||
$passwd_script = undef,
|
||||
$passwd = undef,
|
||||
$boot_option = undef,
|
||||
$action = undef,
|
||||
$plug = undef,
|
||||
$ip = undef,
|
||||
$password = undef,
|
||||
$password_script = undef,
|
||||
$verbose = undef,
|
||||
$debug = undef,
|
||||
$debug_file = undef,
|
||||
$power_wait = undef,
|
||||
$login_timeout = undef,
|
||||
$power_timeout = undef,
|
||||
$delay = undef,
|
||||
$shell_timeout = undef,
|
||||
$amttool_path = undef,
|
||||
$port_as_ip = undef,
|
||||
$retry_on = undef,
|
||||
$sudo = undef,
|
||||
$use_sudo = undef,
|
||||
|
||||
$meta_attr = undef,
|
||||
$interval = '60s',
|
||||
$ensure = present,
|
||||
$pcmk_host_list = undef,
|
||||
|
||||
$tries = undef,
|
||||
$try_sleep = undef,
|
||||
|
||||
) {
|
||||
$ipport_chunk = $ipport ? {
|
||||
undef => '',
|
||||
default => "ipport=\"${ipport}\"",
|
||||
}
|
||||
$port_chunk = $port ? {
|
||||
undef => '',
|
||||
default => "port=\"${port}\"",
|
||||
}
|
||||
$inet6_only_chunk = $inet6_only ? {
|
||||
undef => '',
|
||||
default => "inet6_only=\"${inet6_only}\"",
|
||||
}
|
||||
$ipaddr_chunk = $ipaddr ? {
|
||||
undef => '',
|
||||
default => "ipaddr=\"${ipaddr}\"",
|
||||
}
|
||||
$inet4_only_chunk = $inet4_only ? {
|
||||
undef => '',
|
||||
default => "inet4_only=\"${inet4_only}\"",
|
||||
}
|
||||
$method_chunk = $method ? {
|
||||
undef => '',
|
||||
default => "method=\"${method}\"",
|
||||
}
|
||||
$passwd_script_chunk = $passwd_script ? {
|
||||
undef => '',
|
||||
default => "passwd_script=\"${passwd_script}\"",
|
||||
}
|
||||
$passwd_chunk = $passwd ? {
|
||||
undef => '',
|
||||
default => "passwd=\"${passwd}\"",
|
||||
}
|
||||
$boot_option_chunk = $boot_option ? {
|
||||
undef => '',
|
||||
default => "boot_option=\"${boot_option}\"",
|
||||
}
|
||||
$action_chunk = $action ? {
|
||||
undef => '',
|
||||
default => "action=\"${action}\"",
|
||||
}
|
||||
$plug_chunk = $plug ? {
|
||||
undef => '',
|
||||
default => "plug=\"${plug}\"",
|
||||
}
|
||||
$ip_chunk = $ip ? {
|
||||
undef => '',
|
||||
default => "ip=\"${ip}\"",
|
||||
}
|
||||
$password_chunk = $password ? {
|
||||
undef => '',
|
||||
default => "password=\"${password}\"",
|
||||
}
|
||||
$password_script_chunk = $password_script ? {
|
||||
undef => '',
|
||||
default => "password_script=\"${password_script}\"",
|
||||
}
|
||||
$verbose_chunk = $verbose ? {
|
||||
undef => '',
|
||||
default => "verbose=\"${verbose}\"",
|
||||
}
|
||||
$debug_chunk = $debug ? {
|
||||
undef => '',
|
||||
default => "debug=\"${debug}\"",
|
||||
}
|
||||
$debug_file_chunk = $debug_file ? {
|
||||
undef => '',
|
||||
default => "debug_file=\"${debug_file}\"",
|
||||
}
|
||||
$power_wait_chunk = $power_wait ? {
|
||||
undef => '',
|
||||
default => "power_wait=\"${power_wait}\"",
|
||||
}
|
||||
$login_timeout_chunk = $login_timeout ? {
|
||||
undef => '',
|
||||
default => "login_timeout=\"${login_timeout}\"",
|
||||
}
|
||||
$power_timeout_chunk = $power_timeout ? {
|
||||
undef => '',
|
||||
default => "power_timeout=\"${power_timeout}\"",
|
||||
}
|
||||
$delay_chunk = $delay ? {
|
||||
undef => '',
|
||||
default => "delay=\"${delay}\"",
|
||||
}
|
||||
$shell_timeout_chunk = $shell_timeout ? {
|
||||
undef => '',
|
||||
default => "shell_timeout=\"${shell_timeout}\"",
|
||||
}
|
||||
$amttool_path_chunk = $amttool_path ? {
|
||||
undef => '',
|
||||
default => "amttool_path=\"${amttool_path}\"",
|
||||
}
|
||||
$port_as_ip_chunk = $port_as_ip ? {
|
||||
undef => '',
|
||||
default => "port_as_ip=\"${port_as_ip}\"",
|
||||
}
|
||||
$retry_on_chunk = $retry_on ? {
|
||||
undef => '',
|
||||
default => "retry_on=\"${retry_on}\"",
|
||||
}
|
||||
$sudo_chunk = $sudo ? {
|
||||
undef => '',
|
||||
default => "sudo=\"${sudo}\"",
|
||||
}
|
||||
$use_sudo_chunk = $use_sudo ? {
|
||||
undef => '',
|
||||
default => "use_sudo=\"${use_sudo}\"",
|
||||
}
|
||||
|
||||
$pcmk_host_value_chunk = $pcmk_host_list ? {
|
||||
undef => '$(/usr/sbin/crm_node -n)',
|
||||
default => $pcmk_host_list,
|
||||
}
|
||||
|
||||
$meta_attr_value_chunk = $meta_attr ? {
|
||||
undef => '',
|
||||
default => "meta ${meta_attr}",
|
||||
}
|
||||
|
||||
# $title can be a mac address, remove the colons for pcmk resource name
|
||||
$safe_title = regsubst($title, ':', '', 'G')
|
||||
|
||||
# On Pacemaker Remote nodes we don't want a full corosync
|
||||
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
|
||||
|
||||
$param_string = "${ipport_chunk} ${port_chunk} ${inet6_only_chunk} ${ipaddr_chunk} ${inet4_only_chunk} ${method_chunk} ${passwd_script_chunk} ${passwd_chunk} ${boot_option_chunk} ${action_chunk} ${plug_chunk} ${ip_chunk} ${password_chunk} ${password_script_chunk} ${verbose_chunk} ${debug_chunk} ${debug_file_chunk} ${power_wait_chunk} ${login_timeout_chunk} ${power_timeout_chunk} ${delay_chunk} ${shell_timeout_chunk} ${amttool_path_chunk} ${port_as_ip_chunk} ${retry_on_chunk} ${sudo_chunk} ${use_sudo_chunk} op monitor interval=${interval} ${meta_attr_value_chunk}"
|
||||
|
||||
|
||||
pcmk_stonith { "stonith-fence_amt-${safe_title}":
|
||||
ensure => $ensure,
|
||||
stonith_type => 'fence_amt',
|
||||
pcmk_host_list => $pcmk_host_value_chunk,
|
||||
pcs_param_string => $param_string,
|
||||
require => $pcmk_require,
|
||||
tries => $tries,
|
||||
try_sleep => $try_sleep,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user