dhodovsk / source-git / pacemaker

Forked from source-git/pacemaker 3 years ago
Clone

Blame include/crm/fencing/internal.h

rpm-build 3ee90c
/*
rpm-build 3ee90c
 * Copyright 2011-2019 the Pacemaker project contributors
rpm-build 3ee90c
 *
rpm-build 3ee90c
 * The version control history for this file may have further details.
rpm-build 3ee90c
 *
rpm-build 3ee90c
 * This source code is licensed under the GNU Lesser General Public License
rpm-build 3ee90c
 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
rpm-build 3ee90c
 */
rpm-build 3ee90c
rpm-build 3ee90c
#ifndef STONITH_NG_INTERNAL__H
rpm-build 3ee90c
#  define STONITH_NG_INTERNAL__H
rpm-build 3ee90c
rpm-build 3ee90c
#  include <glib.h>
rpm-build 3ee90c
#  include <crm/common/ipc.h>
rpm-build 3ee90c
#  include <crm/common/output.h>
rpm-build 3ee90c
#  include <crm/common/xml.h>
rpm-build 3ee90c
rpm-build 3ee90c
struct stonith_action_s;
rpm-build 3ee90c
typedef struct stonith_action_s stonith_action_t;
rpm-build 3ee90c
rpm-build 3ee90c
stonith_action_t *stonith_action_create(const char *agent,
rpm-build 3ee90c
                                        const char *_action,
rpm-build 3ee90c
                                        const char *victim,
rpm-build 3ee90c
                                        uint32_t victim_nodeid,
rpm-build 3ee90c
                                        int timeout,
rpm-build 3ee90c
                                        GHashTable * device_args, GHashTable * port_map);
rpm-build 3ee90c
void stonith__destroy_action(stonith_action_t *action);
rpm-build 3ee90c
void stonith__action_result(stonith_action_t *action, int *rc, char **output,
rpm-build 3ee90c
                            char **error_output);
rpm-build 3ee90c
rpm-build 3ee90c
int
rpm-build 3ee90c
stonith_action_execute_async(stonith_action_t * action,
rpm-build 3ee90c
                             void *userdata,
rpm-build 3ee90c
                             void (*done) (GPid pid, int rc, const char *output,
rpm-build 3ee90c
                                           gpointer user_data),
rpm-build 3ee90c
                             void (*fork_cb) (GPid pid, gpointer user_data));
rpm-build 3ee90c
rpm-build 3ee90c
int stonith__execute(stonith_action_t *action);
rpm-build 3ee90c
rpm-build 3ee90c
xmlNode *create_level_registration_xml(const char *node, const char *pattern,
rpm-build 3ee90c
                                       const char *attr, const char *value,
rpm-build 3ee90c
                                       int level,
rpm-build 3ee90c
                                       stonith_key_value_t *device_list);
rpm-build 3ee90c
rpm-build 3ee90c
xmlNode *create_device_registration_xml(const char *id,
rpm-build 3ee90c
                                        enum stonith_namespace namespace,
rpm-build 3ee90c
                                        const char *agent,
rpm-build 3ee90c
                                        stonith_key_value_t *params,
rpm-build 3ee90c
                                        const char *rsc_provides);
rpm-build 3ee90c
rpm-build 3ee90c
void stonith__register_messages(pcmk__output_t *out);
rpm-build 3ee90c
rpm-build 3ee90c
GList *stonith__parse_targets(const char *hosts);
rpm-build 3ee90c
rpm-build 3ee90c
gboolean stonith__later_succeeded(stonith_history_t *event, stonith_history_t *top_history);
rpm-build 3ee90c
stonith_history_t *stonith__sort_history(stonith_history_t *history);
rpm-build 3ee90c
rpm-build 3ee90c
#  define ST_LEVEL_MAX 10
rpm-build 3ee90c
rpm-build 3ee90c
#  define F_STONITH_CLIENTID      "st_clientid"
rpm-build 3ee90c
#  define F_STONITH_CALLOPTS      "st_callopt"
rpm-build 3ee90c
#  define F_STONITH_CALLID        "st_callid"
rpm-build 3ee90c
#  define F_STONITH_CALLDATA      "st_calldata"
rpm-build 3ee90c
#  define F_STONITH_OPERATION     "st_op"
rpm-build 3ee90c
#  define F_STONITH_TARGET        "st_target"
rpm-build 3ee90c
#  define F_STONITH_REMOTE_OP_ID  "st_remote_op"
rpm-build 3ee90c
#  define F_STONITH_RC            "st_rc"
rpm-build 3ee90c
/*! Timeout period per a device execution */
rpm-build 3ee90c
#  define F_STONITH_TIMEOUT       "st_timeout"
rpm-build 3ee90c
#  define F_STONITH_TOLERANCE     "st_tolerance"
rpm-build 3ee90c
/*! Action specific timeout period returned in query of fencing devices. */
rpm-build 3ee90c
#  define F_STONITH_ACTION_TIMEOUT       "st_action_timeout"
rpm-build 3ee90c
/*! Host in query result is not allowed to run this action */
rpm-build 3ee90c
#  define F_STONITH_ACTION_DISALLOWED     "st_action_disallowed"
rpm-build 3ee90c
/*! Maximum of random fencing delay for a device */
rpm-build 3ee90c
#  define F_STONITH_DELAY_MAX            "st_delay_max"
rpm-build 3ee90c
/*! Base delay used for a fencing delay */
rpm-build 3ee90c
#  define F_STONITH_DELAY_BASE           "st_delay_base"
rpm-build 3ee90c
/*! Has this device been verified using a monitor type
rpm-build 3ee90c
 *  operation (monitor, list, status) */
rpm-build 3ee90c
#  define F_STONITH_DEVICE_VERIFIED   "st_monitor_verified"
rpm-build 3ee90c
/*! device is required for this action */
rpm-build 3ee90c
#  define F_STONITH_DEVICE_REQUIRED   "st_required"
rpm-build 3ee90c
/*! number of available devices in query result */
rpm-build 3ee90c
#  define F_STONITH_AVAILABLE_DEVICES "st-available-devices"
rpm-build 3ee90c
#  define F_STONITH_CALLBACK_TOKEN    "st_async_id"
rpm-build 3ee90c
#  define F_STONITH_CLIENTNAME        "st_clientname"
rpm-build 3ee90c
#  define F_STONITH_CLIENTNODE        "st_clientnode"
rpm-build 3ee90c
#  define F_STONITH_NOTIFY_ACTIVATE   "st_notify_activate"
rpm-build 3ee90c
#  define F_STONITH_NOTIFY_DEACTIVATE "st_notify_deactivate"
rpm-build 3ee90c
#  define F_STONITH_DELEGATE      "st_delegate"
rpm-build 3ee90c
/*! The node initiating the stonith operation.  If an operation
rpm-build 3ee90c
 * is relayed, this is the last node the operation lands on. When
rpm-build 3ee90c
 * in standalone mode, origin is the client's id that originated the
rpm-build 3ee90c
 * operation. */
rpm-build 3ee90c
#  define F_STONITH_ORIGIN        "st_origin"
rpm-build 3ee90c
#  define F_STONITH_HISTORY_LIST  "st_history"
rpm-build 3ee90c
#  define F_STONITH_DATE          "st_date"
rpm-build 3ee90c
#  define F_STONITH_STATE         "st_state"
rpm-build 3ee90c
#  define F_STONITH_ACTIVE        "st_active"
rpm-build 3ee90c
#  define F_STONITH_DIFFERENTIAL  "st_differential"
rpm-build 3ee90c
rpm-build 3ee90c
#  define F_STONITH_DEVICE        "st_device_id"
rpm-build 3ee90c
#  define F_STONITH_ACTION        "st_device_action"
rpm-build 3ee90c
#  define F_STONITH_MODE          "st_mode"
rpm-build 3ee90c
rpm-build 3ee90c
#  define T_STONITH_NG        "stonith-ng"
rpm-build 3ee90c
#  define T_STONITH_REPLY     "st-reply"
rpm-build 3ee90c
/*! For async operations, an event from the server containing
rpm-build 3ee90c
 * the total amount of time the server is allowing for the operation
rpm-build 3ee90c
 * to take place is returned to the client. */
rpm-build 3ee90c
#  define T_STONITH_TIMEOUT_VALUE "st-async-timeout-value"
rpm-build 3ee90c
#  define T_STONITH_NOTIFY    "st_notify"
rpm-build 3ee90c
rpm-build 3ee90c
#  define STONITH_ATTR_HOSTARG   "pcmk_host_argument"
rpm-build 3ee90c
#  define STONITH_ATTR_HOSTMAP   "pcmk_host_map"
rpm-build 3ee90c
#  define STONITH_ATTR_HOSTLIST  "pcmk_host_list"
rpm-build 3ee90c
#  define STONITH_ATTR_HOSTCHECK "pcmk_host_check"
rpm-build 3ee90c
#  define STONITH_ATTR_DELAY_MAX "pcmk_delay_max"
rpm-build 3ee90c
#  define STONITH_ATTR_DELAY_BASE   "pcmk_delay_base"
rpm-build 3ee90c
#  define STONITH_ATTR_ACTION_LIMIT "pcmk_action_limit"
rpm-build 3ee90c
rpm-build 3ee90c
#  define STONITH_ATTR_ACTION_OP   "action"
rpm-build 3ee90c
rpm-build 3ee90c
#  define STONITH_OP_EXEC        "st_execute"
rpm-build 3ee90c
#  define STONITH_OP_TIMEOUT_UPDATE        "st_timeout_update"
rpm-build 3ee90c
#  define STONITH_OP_QUERY       "st_query"
rpm-build 3ee90c
#  define STONITH_OP_FENCE       "st_fence"
rpm-build 3ee90c
#  define STONITH_OP_RELAY       "st_relay"
rpm-build 3ee90c
#  define STONITH_OP_DEVICE_ADD      "st_device_register"
rpm-build 3ee90c
#  define STONITH_OP_DEVICE_DEL      "st_device_remove"
rpm-build 3ee90c
#  define STONITH_OP_FENCE_HISTORY   "st_fence_history"
rpm-build 3ee90c
#  define STONITH_OP_LEVEL_ADD       "st_level_add"
rpm-build 3ee90c
#  define STONITH_OP_LEVEL_DEL       "st_level_remove"
rpm-build 3ee90c
rpm-build 3ee90c
#  define STONITH_WATCHDOG_AGENT  "#watchdog"
rpm-build 3ee90c
rpm-build 3ee90c
#  ifdef HAVE_STONITH_STONITH_H
rpm-build 3ee90c
// utilities from st_lha.c
rpm-build 3ee90c
int stonith__list_lha_agents(stonith_key_value_t **devices);
rpm-build 3ee90c
int stonith__lha_metadata(const char *agent, int timeout, char **output);
rpm-build 3ee90c
bool stonith__agent_is_lha(const char *agent);
rpm-build 3ee90c
int stonith__lha_validate(stonith_t *st, int call_options, const char *target,
rpm-build 3ee90c
                          const char *agent, GHashTable *params,
rpm-build 3ee90c
                          int timeout, char **output, char **error_output);
rpm-build 3ee90c
#  endif
rpm-build 3ee90c
rpm-build 3ee90c
// utilities from st_rhcs.c
rpm-build 3ee90c
int stonith__list_rhcs_agents(stonith_key_value_t **devices);
rpm-build 3ee90c
int stonith__rhcs_metadata(const char *agent, int timeout, char **output);
rpm-build 3ee90c
bool stonith__agent_is_rhcs(const char *agent);
rpm-build 3ee90c
int stonith__rhcs_validate(stonith_t *st, int call_options, const char *target,
rpm-build 3ee90c
                           const char *agent, GHashTable *params,
rpm-build 3ee90c
                           int timeout, char **output, char **error_output);
rpm-build 3ee90c
rpm-build 3ee90c
#endif