diff --git a/include/crm/Makefile.am b/include/crm/Makefile.am index 1821579369..ec2752f433 100644 --- a/include/crm/Makefile.am +++ b/include/crm/Makefile.am @@ -1,35 +1,34 @@ # # Copyright 2004-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in headerdir=$(pkgincludedir)/crm header_HEADERS = cib.h \ cib_compat.h \ cluster.h \ - compatibility.h \ crm.h \ crm_compat.h \ lrmd.h \ lrmd_compat.h \ lrmd_events.h \ msg_xml.h \ msg_xml_compat.h \ services.h \ services_compat.h \ stonith-ng.h noinst_HEADERS = $(wildcard *_internal.h) SUBDIRS = common \ pengine \ cib \ fencing \ cluster diff --git a/include/crm/common/nodes.h b/include/crm/common/nodes.h index 5f6f25ff0c..5825e3454c 100644 --- a/include/crm/common/nodes.h +++ b/include/crm/common/nodes.h @@ -1,230 +1,188 @@ /* * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_COMMON_NODES__H #define PCMK__CRM_COMMON_NODES__H #include // bool #include // gboolean, GList, GHashTable #include // pcmk_resource_t, pcmk_scheduler_t #ifdef __cplusplus extern "C" { #endif /*! * \file * \brief Scheduler API for nodes * \ingroup core */ // Special node attributes #define PCMK_NODE_ATTR_MAINTENANCE "maintenance" #define PCMK_NODE_ATTR_STANDBY "standby" #define PCMK_NODE_ATTR_TERMINATE "terminate" // @COMPAT Make this internal when we can break API backward compatibility //!@{ //! \deprecated Do not use (public access will be removed in a future release) enum node_type { // Possible node types pcmk_node_variant_cluster = 1, // Cluster layer node pcmk_node_variant_remote = 2, // Pacemaker Remote node node_ping = 0, // deprecated #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) node_member = pcmk_node_variant_cluster, node_remote = pcmk_node_variant_remote, #endif }; //!@} // When to probe a resource on a node (as specified in location constraints) // @COMPAT Make this internal when we can break API backward compatibility //!@{ //! \deprecated Do not use (public access will be removed in a future release) enum pe_discover_e { pcmk_probe_always = 0, // Always probe resource on node pcmk_probe_never = 1, // Never probe resource on node pcmk_probe_exclusive = 2, // Probe only on designated nodes #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) pe_discover_always = pcmk_probe_always, pe_discover_never = pcmk_probe_never, pe_discover_exclusive = pcmk_probe_exclusive, #endif }; //!@} // Basic node information (all node objects for the same node share this) // @COMPAT Make this internal when we can break API backward compatibility //!@{ //! \deprecated Do not use (public access will be removed in a future release) struct pe_node_shared_s { const char *id; // Node ID at the cluster layer const char *uname; // Node name in cluster enum node_type type; // Node variant // @TODO Convert these into a flag group // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Call pcmk_node_is_online() instead gboolean online; // Whether online gboolean standby; // Whether in standby mode gboolean standby_onfail; // Whether in standby mode due to on-fail // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Call pcmk_node_is_pending() instead gboolean pending; // Whether controller membership is pending // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Call !pcmk_node_is_clean() instead gboolean unclean; // Whether node requires fencing gboolean unseen; // Whether node has never joined cluster // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Call pcmk_node_is_shutting_down() instead gboolean shutdown; // Whether shutting down gboolean expected_up; // Whether expected join state is member gboolean is_dc; // Whether node is cluster's DC // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Call pcmk_node_is_in_maintenance() instead gboolean maintenance; // Whether in maintenance mode gboolean rsc_discovery_enabled; // Whether probes are allowed on node /* * Whether this is a guest node whose guest resource must be recovered or a * remote node that must be fenced */ gboolean remote_requires_reset; /* * Whether this is a Pacemaker Remote node that was fenced since it was last * connected by the cluster */ gboolean remote_was_fenced; /* * Whether this is a Pacemaker Remote node previously marked in its * node state as being in maintenance mode */ gboolean remote_maintenance; gboolean unpacked; // Whether node history has been unpacked /* * Number of resources active on this node (valid after CIB status section * has been unpacked, as long as pcmk_sched_no_counts was not set) */ int num_resources; // Remote connection resource for node, if it is a Pacemaker Remote node pcmk_resource_t *remote_rsc; // NOTE: sbd (as of at least 1.5.2) uses this // \deprecated Call pcmk_foreach_active_resource() instead GList *running_rsc; // List of resources active on node GList *allocated_rsc; // List of resources assigned to node GHashTable *attrs; // Node attributes GHashTable *utilization; // Node utilization attributes GHashTable *digest_cache; // Cache of calculated resource digests /* * Sum of priorities of all resources active on node and on any guest nodes * connected to this node, with +1 for promoted instances (used to compare * nodes for PCMK_OPT_PRIORITY_FENCING_DELAY) */ int priority; pcmk_scheduler_t *data_set; // Cluster that node is part of }; //!@} // Implementation of pcmk_node_t // @COMPAT Make contents internal when we can break API backward compatibility //!@{ //! \deprecated Do not use (public access will be removed in a future release) struct pe_node_s { int weight; // Node score for a given resource gboolean fixed; // \deprecated Do not use int count; // Counter reused by assignment and promotion code // NOTE: sbd (as of at least 1.5.2) uses this struct pe_node_shared_s *details; // Basic node information // @COMPAT This should be enum pe_discover_e int rsc_discover_mode; // Probe mode (enum pe_discover_e) }; //!@} bool pcmk_node_is_online(const pcmk_node_t *node); bool pcmk_node_is_pending(const pcmk_node_t *node); bool pcmk_node_is_clean(const pcmk_node_t *node); bool pcmk_node_is_shutting_down(const pcmk_node_t *node); bool pcmk_node_is_in_maintenance(const pcmk_node_t *node); bool pcmk_foreach_active_resource(pcmk_node_t *node, bool (*fn)(pcmk_resource_t *, void *), void *user_data); -/*! - * \internal - * \brief Return a string suitable for logging as a node name - * - * \param[in] node Node to return a node name string for - * - * \return Node name if available, otherwise node ID if available, - * otherwise "unspecified node" if node is NULL or "unidentified node" - * if node has neither a name nor ID. - */ -static inline const char * -pcmk__node_name(const pcmk_node_t *node) -{ - if (node == NULL) { - return "unspecified node"; - - } else if (node->details->uname != NULL) { - return node->details->uname; - - } else if (node->details->id != NULL) { - return node->details->id; - - } else { - return "unidentified node"; - } -} - -/*! - * \internal - * \brief Check whether two node objects refer to the same node - * - * \param[in] node1 First node object to compare - * \param[in] node2 Second node object to compare - * - * \return true if \p node1 and \p node2 refer to the same node - */ -static inline bool -pcmk__same_node(const pcmk_node_t *node1, const pcmk_node_t *node2) -{ - return (node1 != NULL) && (node2 != NULL) - && (node1->details == node2->details); -} #ifdef __cplusplus } #endif #endif // PCMK__CRM_COMMON_NODES__H diff --git a/include/crm/common/nodes_internal.h b/include/crm/common/nodes_internal.h index 8f495662ed..f6fd5380be 100644 --- a/include/crm/common/nodes_internal.h +++ b/include/crm/common/nodes_internal.h @@ -1,27 +1,70 @@ /* * Copyright 2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__NODES_INTERNAL__H #define PCMK__NODES_INTERNAL__H /* * Special node attributes */ #define PCMK__NODE_ATTR_SHUTDOWN "shutdown" /* @COMPAT Deprecated since 2.1.8. Use a location constraint with * PCMK_XA_RSC_PATTERN=".*" and PCMK_XA_RESOURCE_DISCOVERY="never" instead of * PCMK__NODE_ATTR_RESOURCE_DISCOVERY_ENABLED="false". */ #define PCMK__NODE_ATTR_RESOURCE_DISCOVERY_ENABLED "resource-discovery-enabled" pcmk_node_t *pcmk__find_node_in_list(const GList *nodes, const char *node_name); +/*! + * \internal + * \brief Return a string suitable for logging as a node name + * + * \param[in] node Node to return a node name string for + * + * \return Node name if available, otherwise node ID if available, + * otherwise "unspecified node" if node is NULL or "unidentified node" + * if node has neither a name nor ID. + */ +static inline const char * +pcmk__node_name(const pcmk_node_t *node) +{ + if (node == NULL) { + return "unspecified node"; + + } else if (node->details->uname != NULL) { + return node->details->uname; + + } else if (node->details->id != NULL) { + return node->details->id; + + } else { + return "unidentified node"; + } +} + +/*! + * \internal + * \brief Check whether two node objects refer to the same node + * + * \param[in] node1 First node object to compare + * \param[in] node2 Second node object to compare + * + * \return true if \p node1 and \p node2 refer to the same node + */ +static inline bool +pcmk__same_node(const pcmk_node_t *node1, const pcmk_node_t *node2) +{ + return (node1 != NULL) && (node2 != NULL) + && (node1->details == node2->details); +} + #endif // PCMK__NODES_INTERNAL__H diff --git a/include/crm/compatibility.h b/include/crm/compatibility.h deleted file mode 100644 index b1a30364ed..0000000000 --- a/include/crm/compatibility.h +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright 2004-2024 the Pacemaker project contributors - * - * The version control history for this file may have further details. - * - * This source code is licensed under the GNU General Public License version 2 - * or later (GPLv2+) WITHOUT ANY WARRANTY. - */ -#ifndef PCMK__CRM_COMPATIBILITY__H -# define PCMK__CRM_COMPATIBILITY__H - -#include // PCMK_XE_PROMOTABLE_LEGACY -#include -#include // enum pe_obj_types - -#ifdef __cplusplus -extern "C" { -#endif - -/* This file allows external code that uses Pacemaker libraries to transition - * more easily from old APIs to current ones. Any code that compiled with an - * earlier API but not with the current API can include this file and have a - * good chance of compiling again. - * - * Everything here is deprecated and will be removed at the next major Pacemaker - * release (i.e. 3.0), so it should only be used during a transitionary period - * while the external code is being updated to the current API. - */ - -/* Heartbeat-specific definitions. Support for heartbeat has been removed - * entirely, so any code branches relying on these should be deleted. - */ -#define ACTIVESTATUS "active" -#define DEADSTATUS "dead" -#define PINGSTATUS "ping" -#define JOINSTATUS "join" -#define LEAVESTATUS "leave" -#define NORMALNODE "normal" -#define CRM_NODE_EVICTED "evicted" -#define CRM_LEGACY_CONFIG_DIR "/var/lib/heartbeat/crm" -#define HA_VARLIBHBDIR "/var/lib/heartbeat" -#define pcmk_cluster_heartbeat 0x0004 - -/* Corosync-version-1-specific definitions */ - -/* Support for corosync version 1 has been removed entirely, so any code - * branches relying on these should be deleted. - */ -#define PCMK_SERVICE_ID 9 -#define CRM_SERVICE PCMK_SERVICE_ID -#define XML_ATTR_EXPECTED_VOTES "expected-quorum-votes" -#define crm_class_members 1 -#define crm_class_notify 2 -#define crm_class_nodeid 3 -#define crm_class_rmpeer 4 -#define crm_class_quorum 5 -#define pcmk_cluster_classic_ais 0x0010 -#define pcmk_cluster_cman 0x0040 -#define ais_fd_sync -1 - -// These are always true now -#define CS_USES_LIBQB 1 -#define HAVE_CMAP 1 -#define SUPPORT_CS_QUORUM 1 -#define SUPPORT_AIS 1 -#define AIS_COROSYNC 1 - -// These are always false now -#define HAVE_CONFDB 0 -#define SUPPORT_CMAN 0 -#define SUPPORT_PLUGIN 0 -#define SUPPORT_STONITH_CONFIG 0 -#define is_classic_ais_cluster() 0 -#define is_cman_cluster() 0 - -// These have newer names -#define is_openais_cluster() is_corosync_cluster() -#if SUPPORT_COROSYNC -#define SUPPORT_CS -#endif - -/* Isolation-specific definitions. Support for the resource isolation feature - * has been removed * entirely, so any code branches relying on these should be - * deleted. - */ -#define XML_RSC_ATTR_ISOLATION_INSTANCE "isolation-instance" -#define XML_RSC_ATTR_ISOLATION_WRAPPER "isolation-wrapper" -#define XML_RSC_ATTR_ISOLATION_HOST "isolation-host" -#define XML_RSC_ATTR_ISOLATION "isolation" - -/* Schema-related definitions */ - -// This has been renamed -#define CRM_DTD_DIRECTORY CRM_SCHEMA_DIRECTORY - -/* Exit-code-related definitions */ - -#define DAEMON_RESPAWN_STOP CRM_EX_FATAL -#define pcmk_err_panic CRM_EX_PANIC - -// Deprecated symbols that were removed -#define APPNAME_LEN 256 -#define CRM_NODE_ACTIVE CRM_NODE_MEMBER -#define CRM_OP_DIE "die_no_respawn" -#define CRM_OP_RETRIVE_CIB "retrieve_cib" -#define CRM_OP_HBEAT "dc_beat" -#define CRM_OP_ABORT "abort" -#define CRM_OP_DEBUG_UP "debug_inc" -#define CRM_OP_DEBUG_DOWN "debug_dec" -#define CRM_OP_EVENTCC "event_cc" -#define CRM_OP_TEABORT "te_abort" -#define CRM_OP_TEABORTED "te_abort_confirmed" -#define CRM_OP_TE_HALT "te_halt" -#define CRM_OP_TECOMPLETE "te_complete" -#define CRM_OP_TETIMEOUT "te_timeout" -#define CRM_OP_TRANSITION "transition" -#define CRM_OP_NODES_PROBED "probe_nodes_complete" -#define DOT_ALL_FSA_INPUTS 1 -#define DOT_FSA_ACTIONS 1 -#define F_LRMD_CANCEL_CALLID "lrmd_cancel_callid" -#define F_LRMD_RSC_METADATA "lrmd_rsc_metadata_res" -#define F_LRMD_IPC_PROXY_NODE "lrmd_ipc_proxy_node" -#define INSTANCE(x) crm_element_value(x, XML_CIB_ATTR_INSTANCE) -#define LOG_DEBUG_2 LOG_TRACE -#define LOG_DEBUG_3 LOG_TRACE -#define LOG_DEBUG_4 LOG_TRACE -#define LOG_DEBUG_5 LOG_TRACE -#define LOG_DEBUG_6 LOG_TRACE -#define LRMD_OP_RSC_CHK_REG "lrmd_rsc_check_register" -#define MAX_IPC_FAIL 5 -#define NAME(x) crm_element_value(x, PCMK_XA_NAME) -#define MSG_LOG 1 -#define PE_OBJ_T_NATIVE "native" -#define PE_OBJ_T_GROUP "group" -#define PE_OBJ_T_INCARNATION "clone" -#define PE_OBJ_T_MASTER "master" -#define SERVICE_SCRIPT "/sbin/service" -#define SOCKET_LEN 1024 -#define TSTAMP(x) crm_element_value(x, PCMK_XA_CRM_TIMESTAMP) -#define XML_ATTR_TAGNAME F_XML_TAGNAME -#define XML_ATTR_FILTER_TYPE "type-filter" -#define XML_ATTR_FILTER_ID "id-filter" -#define XML_ATTR_FILTER_PRIORITY "priority-filter" -#define XML_ATTR_DC "is_dc" -#define XML_MSG_TAG "crm_message" -#define XML_MSG_TAG_DATA "msg_data" -#define XML_FAIL_TAG_RESOURCE "failed_resource" -#define XML_FAILRES_ATTR_RESID "resource_id" -#define XML_FAILRES_ATTR_REASON PCMK_XA_REASON -#define XML_FAILRES_ATTR_RESSTATUS "resource_status" -#define XML_ATTR_RESULT PCMK_XA_RESULT -#define XML_ATTR_SECTION "section" -#define XML_CIB_TAG_DOMAIN "domain" -#define XML_CIB_TAG_CONSTRAINT "constraint" -#define XML_RSC_ATTR_STATE "clone-state" -#define XML_RSC_ATTR_PRIORITY PCMK_META_PRIORITY -#define XML_OP_ATTR_DEPENDENT "dependent-on" -#define XML_LRM_TAG_AGENTS "lrm_agents" -#define XML_LRM_TAG_AGENT "lrm_agent" -#define XML_LRM_TAG_ATTRIBUTES "attributes" -#define XML_CIB_ATTR_HEALTH "health" -#define XML_CIB_ATTR_WEIGHT "weight" -#define XML_CIB_ATTR_CLEAR "clear_on" -#define XML_CIB_ATTR_STONITH "stonith" -#define XML_CIB_ATTR_STANDBY "standby" -#define XML_RULE_ATTR_SCORE_MANGLED "score-attribute-mangled" -#define XML_RULE_ATTR_RESULT PCMK_XA_RESULT -#define XML_NODE_ATTR_STATE "state" -#define XML_ATTR_LRM_PROBE "lrm-is-probe" -#define XML_ATTR_TE_ALLOWFAIL "op_allow_fail" -#define VALUE(x) crm_element_value(x, PCMK_XA_VALUE) -#define action_wrapper_s pe_action_wrapper_s -#define add_cib_op_callback(cib, id, flag, data, fn) do { \ - cib->cmds->register_callback(cib, id, 120, flag, data, #fn, fn); \ - } while(0) -#define cib_default_options = cib_none -#define crm_remote_baremetal 0x0004 -#define crm_remote_container 0x0002 -#define crm_element_value_const crm_element_value -#define crm_element_value_const_int crm_element_value_int -#define n_object_classes 3 -#define no_quorum_policy_e pe_quorum_policy -#define node_s pe_node_s -#define node_shared_s pe_node_shared_s -#define pe_action_failure_is_fatal 0x00020 -#define pe_rsc_munging 0x00000800ULL -#define pe_rsc_try_reload 0x00001000ULL -#define pe_rsc_shutdown 0x00020000ULL -#define pe_rsc_migrating 0x00400000ULL -#define pe_rsc_unexpectedly_running 0x02000000ULL -#define pe_rsc_have_unfencing 0x80000000ULL -#define resource_s pe_resource_s -#define ticket_s pe_ticket_s - -#define node_score_infinity 1000000 - -/* Clone terminology definitions */ - -// These can no longer be used in a switch together -#define pe_master pcmk_rsc_variant_clone - -static inline enum pe_obj_types -get_resource_type(const char *name) -{ - if (safe_str_eq(name, PCMK_XE_PRIMITIVE)) { - return pcmk_rsc_variant_primitive; - - } else if (safe_str_eq(name, PCMK_XE_GROUP)) { - return pcmk_rsc_variant_group; - - } else if (safe_str_eq(name, PCMK_XE_CLONE) - || safe_str_eq(name, PCMK_XE_PROMOTABLE_LEGACY)) { - return pcmk_rsc_variant_clone; - - } else if (safe_str_eq(name, PCMK_XE_BUNDLE)) { - return pcmk_rsc_variant_bundle; - } - - return pcmk_rsc_variant_unknown; -} - -static inline const char * -get_resource_typename(enum pe_obj_types type) -{ - switch (type) { - case pcmk_rsc_variant_primitive: - return PCMK_XE_PRIMITIVE; - case pcmk_rsc_variant_group: - return PCMK_XE_GROUP; - case pcmk_rsc_variant_clone: - return PCMK_XE_CLONE; - case pcmk_rsc_variant_bundle: - return PCMK_XE_BUNDLE; - case pcmk_rsc_variant_unknown: - return "unknown"; - } - return ""; -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/crm/pengine/Makefile.am b/include/crm/pengine/Makefile.am index 77bc28e91f..52e48240ed 100644 --- a/include/crm/pengine/Makefile.am +++ b/include/crm/pengine/Makefile.am @@ -1,23 +1,22 @@ # # Copyright 2006-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in headerdir=$(pkgincludedir)/crm/pengine noinst_HEADERS = internal.h \ $(wildcard *_internal.h) header_HEADERS = common.h \ complex.h \ pe_types.h \ rules.h \ status.h \ - common_compat.h \ pe_types_compat.h \ rules_compat.h \ status_compat.h diff --git a/include/crm/pengine/common.h b/include/crm/pengine/common.h index 57005e1047..c1048c8e69 100644 --- a/include/crm/pengine/common.h +++ b/include/crm/pengine/common.h @@ -1,62 +1,58 @@ /* * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_COMMON__H # define PCMK__CRM_PENGINE_COMMON__H # include # include # include # include #ifdef __cplusplus extern "C" { #endif typedef struct pe_re_match_data { char *string; int nregs; regmatch_t *pmatch; } pe_re_match_data_t; typedef struct pe_match_data { pe_re_match_data_t *re; GHashTable *params; GHashTable *meta; } pe_match_data_t; typedef struct pe_rsc_eval_data { const char *standard; const char *provider; const char *agent; } pe_rsc_eval_data_t; typedef struct pe_op_eval_data { const char *op_name; guint interval; } pe_op_eval_data_t; typedef struct pe_rule_eval_data { GHashTable *node_hash; // Only used with g_hash_table_lookup() enum rsc_role_e role; //!< \deprecated Ignored crm_time_t *now; // @COMPAT could be const pe_match_data_t *match_data; // @COMPAT could be const pe_rsc_eval_data_t *rsc_data; // @COMPAT could be const pe_op_eval_data_t *op_data; // @COMPAT could be const } pe_rule_eval_data_t; -#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) -#include -#endif - #ifdef __cplusplus } #endif #endif diff --git a/include/crm/pengine/common_compat.h b/include/crm/pengine/common_compat.h deleted file mode 100644 index 621df4bd06..0000000000 --- a/include/crm/pengine/common_compat.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2004-2024 the Pacemaker project contributors - * - * The version control history for this file may have further details. - * - * This source code is licensed under the GNU Lesser General Public License - * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. - */ - -#ifndef PCMK__CRM_PENGINE_COMMON_COMPAT__H -# define PCMK__CRM_PENGINE_COMMON_COMPAT__H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file - * \brief Deprecated Pacemaker scheduler utilities - * \ingroup pengine - * \deprecated Do not include this header directly. The utilities in this - * header, and the header itself, will be removed in a future - * release. - */ - -//! \deprecated Use (pcmk_role_promoted + 1) instead -#define RSC_ROLE_MAX (pcmk_role_promoted + 1) - -//! \deprecated Use pcmk_role_text(pcmk_role_unknown) instead -#define RSC_ROLE_UNKNOWN_S pcmk_role_text(pcmk_role_unknown) - -//! \deprecated Use pcmk_role_text(pcmk_role_stopped) instead -#define RSC_ROLE_STOPPED_S pcmk_role_text(pcmk_role_stopped) - -//! \deprecated Use pcmk_role_text(pcmk_role_started) instead -#define RSC_ROLE_STARTED_S pcmk_role_text(pcmk_role_started) - -//! \deprecated Use pcmk_role_text(pcmk_role_unpromoted) instead -#define RSC_ROLE_UNPROMOTED_S pcmk_role_text(pcmk_role_unpromoted) - -//! \deprecated Use pcmk_role_text(pcmk_role_promoted) instead -#define RSC_ROLE_PROMOTED_S pcmk_role_text(pcmk_role_promoted) - -//! \deprecated Do not use -#define RSC_ROLE_UNPROMOTED_LEGACY_S "Slave" - -//! \deprecated Do not use -#define RSC_ROLE_SLAVE_S RSC_ROLE_UNPROMOTED_LEGACY_S - -//! \deprecated Do not use -#define RSC_ROLE_PROMOTED_LEGACY_S "Master" - -//! \deprecated Do not use -#define RSC_ROLE_MASTER_S RSC_ROLE_PROMOTED_LEGACY_S - -//! \deprecated Use pcmk_role_text() instead -const char *role2text(enum rsc_role_e role); - -//! \deprecated Use pcmk_parse_role() instead -enum rsc_role_e text2role(const char *role); - -//! \deprecated Use pcmk_action_text() instead -const char *task2text(enum action_tasks task); - -//! \deprecated Use pcmk_parse_action() instead -enum action_tasks text2task(const char *task); - -//! \deprecated Use pcmk_on_fail_text() instead -const char *fail2text(enum action_fail_response fail); - -//! \deprecated Do not use -static inline const char * -recovery2text(enum rsc_recovery_type type) -{ - switch (type) { - case pcmk_multiply_active_stop: - return "shutting it down"; - case pcmk_multiply_active_restart: - return "attempting recovery"; - case pcmk_multiply_active_block: - return "waiting for an administrator"; - case pcmk_multiply_active_unexpected: - return "stopping unexpected instances"; - } - return "Unknown"; -} - -//! \deprecated Do not use -const char *pe_pref(GHashTable * options, const char *name); - -#ifdef __cplusplus -} -#endif - -#endif // PCMK__CRM_PENGINE_COMMON_COMPAT__H diff --git a/include/crm/pengine/pe_types_compat.h b/include/crm/pengine/pe_types_compat.h index ccd0a5fc83..9f4391b4cd 100644 --- a/include/crm/pengine/pe_types_compat.h +++ b/include/crm/pengine/pe_types_compat.h @@ -1,272 +1,215 @@ /* * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_PE_TYPES_COMPAT__H # define PCMK__CRM_PENGINE_PE_TYPES_COMPAT__H #include #ifdef __cplusplus extern "C" { #endif /** * \file * \brief Deprecated Pacemaker scheduler API * \ingroup pengine * \deprecated Do not include this header directly. The scheduler APIs in this * header, and the header itself, will be removed in a future * release. */ //! \deprecated Do not use #define pe_rsc_orphan pcmk_rsc_removed // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Do not use #define pe_rsc_managed pcmk_rsc_managed //! \deprecated Do not use #define pe_rsc_block pcmk_rsc_blocked //! \deprecated Do not use #define pe_rsc_orphan_container_filler pcmk_rsc_removed_filler //! \deprecated Do not use #define pe_rsc_notify pcmk_rsc_notify //! \deprecated Do not use #define pe_rsc_unique pcmk_rsc_unique //! \deprecated Do not use #define pe_rsc_fence_device pcmk_rsc_fence_device //! \deprecated Do not use #define pe_rsc_promotable pcmk_rsc_promotable //! \deprecated Do not use #define pe_rsc_provisional pcmk_rsc_unassigned //! \deprecated Do not use #define pe_rsc_allocating pcmk_rsc_assigning //! \deprecated Do not use #define pe_rsc_merging pcmk_rsc_updating_nodes //! \deprecated Do not use #define pe_rsc_restarting pcmk_rsc_restarting //! \deprecated Do not use #define pe_rsc_stop pcmk_rsc_stop_if_failed //! \deprecated Do not use #define pe_rsc_reload pcmk_rsc_reload //! \deprecated Do not use #define pe_rsc_allow_remote_remotes pcmk_rsc_remote_nesting_allowed //! \deprecated Do not use #define pe_rsc_critical pcmk_rsc_critical //! \deprecated Do not use #define pe_rsc_failed pcmk_rsc_failed //! \deprecated Do not use #define pe_rsc_detect_loop pcmk_rsc_detect_loop //! \deprecated Do not use #define pe_rsc_runnable pcmk_rsc_runnable //! \deprecated Do not use #define pe_rsc_start_pending pcmk_rsc_start_pending //!< \deprecated Do not use #define pe_rsc_starting pcmk_rsc_starting //!< \deprecated Do not use #define pe_rsc_stopping pcmk_rsc_stopping //! \deprecated Do not use #define pe_rsc_stop_unexpected pcmk_rsc_stop_unexpected //! \deprecated Do not use #define pe_rsc_allow_migrate pcmk_rsc_migratable //! \deprecated Do not use #define pe_rsc_failure_ignored pcmk_rsc_ignore_failure //! \deprecated Do not use #define pe_rsc_replica_container pcmk_rsc_replica_container //! \deprecated Do not use #define pe_rsc_maintenance pcmk_rsc_maintenance //! \deprecated Do not use #define pe_rsc_is_container pcmk_rsc_has_filler //! \deprecated Do not use #define pe_rsc_needs_quorum pcmk_rsc_needs_quorum //! \deprecated Do not use #define pe_rsc_needs_fencing pcmk_rsc_needs_fencing //! \deprecated Do not use #define pe_rsc_needs_unfencing pcmk_rsc_needs_unfencing // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Do not use #define pe_flag_have_quorum pcmk_sched_quorate //! \deprecated Do not use #define pe_flag_symmetric_cluster pcmk_sched_symmetric_cluster //! \deprecated Do not use #define pe_flag_maintenance_mode pcmk_sched_in_maintenance //! \deprecated Do not use #define pe_flag_stonith_enabled pcmk_sched_fencing_enabled // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Do not use #define pe_flag_have_stonith_resource pcmk_sched_have_fencing //! \deprecated Do not use #define pe_flag_enable_unfencing pcmk_sched_enable_unfencing //! \deprecated Do not use #define pe_flag_concurrent_fencing pcmk_sched_concurrent_fencing //! \deprecated Do not use #define pe_flag_stop_rsc_orphans pcmk_sched_stop_removed_resources //! \deprecated Do not use #define pe_flag_stop_action_orphans pcmk_sched_cancel_removed_actions //! \deprecated Do not use #define pe_flag_stop_everything pcmk_sched_stop_all //! \deprecated Do not use #define pe_flag_start_failure_fatal pcmk_sched_start_failure_fatal //! \deprecated Do not use #define pe_flag_remove_after_stop pcmk_sched_remove_after_stop //! \deprecated Do not use #define pe_flag_startup_fencing pcmk_sched_startup_fencing //! \deprecated Do not use #define pe_flag_shutdown_lock pcmk_sched_shutdown_lock //! \deprecated Do not use #define pe_flag_startup_probes pcmk_sched_probe_resources //! \deprecated Do not use #define pe_flag_have_status pcmk_sched_have_status //! \deprecated Do not use #define pe_flag_have_remote_nodes pcmk_sched_have_remote_nodes //! \deprecated Do not use #define pe_flag_quick_location pcmk_sched_location_only //! \deprecated Do not use #define pe_flag_sanitized pcmk_sched_sanitized //! \deprecated Do not use #define pe_flag_stdout (1ULL << 22) //! \deprecated Do not use #define pe_flag_no_counts pcmk_sched_no_counts //! \deprecated Do not use #define pe_flag_no_compat pcmk_sched_no_compat //! \deprecated Do not use #define pe_flag_show_scores pcmk_sched_output_scores //! \deprecated Do not use #define pe_flag_show_utilization pcmk_sched_show_utilization //! \deprecated Do not use #define pe_flag_check_config pcmk_sched_validate_only -//!@{ -//! \deprecated Do not use (unused by Pacemaker) -enum pe_graph_flags { - pe_graph_none = 0x00000, - pe_graph_updated_first = 0x00001, - pe_graph_updated_then = 0x00002, - pe_graph_disable = 0x00004, -}; -//!@} - -//!@{ -//! \deprecated Do not use -enum pe_check_parameters { - pe_check_last_failure, - pe_check_active, -}; -//!@} - -//! \deprecated Use pcmk_action_t instead -typedef struct pe_action_s action_t; - -//! \deprecated Use pcmk_action_t instead -typedef struct pe_action_s pe_action_t; - -//! \deprecated Do not use -typedef struct pe_action_wrapper_s action_wrapper_t; - -//! \deprecated Do not use -typedef struct pe_action_wrapper_s pe_action_wrapper_t; - // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Use pcmk_node_t instead typedef struct pe_node_s node_t; -//! \deprecated Use pcmk_node_t instead -typedef struct pe_node_s pe_node_t; - -//! \deprecated Use enum pe_quorum_policy instead -typedef enum pe_quorum_policy no_quorum_policy_t; - // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated use pcmk_resource_t instead typedef struct pe_resource_s resource_t; -//! \deprecated use pcmk_resource_t instead -typedef struct pe_resource_s pe_resource_t; - -//! \deprecated Do not use -typedef struct pe_tag_s tag_t; - -//! \deprecated Do not use -typedef struct pe_tag_s pe_tag_t; - -//! \deprecated Do not use -typedef struct pe_ticket_s ticket_t; - -//! \deprecated Do not use -typedef struct pe_ticket_s pe_ticket_t; - // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Use pcmk_scheduler_t instead typedef struct pe_working_set_s pe_working_set_t; -//! \deprecated This type should be treated as internal to Pacemaker -typedef struct resource_alloc_functions_s resource_alloc_functions_t; - -//! \deprecated Use pcmk_rsc_methods_t instead -typedef struct resource_object_functions_s resource_object_functions_t; - #ifdef __cplusplus } #endif #endif // PCMK__CRM_PENGINE_PE_TYPES_COMPAT__H diff --git a/lib/pengine/Makefile.am b/lib/pengine/Makefile.am index 2bb50da581..c2dfe463d8 100644 --- a/lib/pengine/Makefile.am +++ b/lib/pengine/Makefile.am @@ -1,82 +1,80 @@ # # Copyright 2004-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # include $(top_srcdir)/mk/common.mk # Without "." here, check-recursive will run through the subdirectories first # and then run "make check" here. This will fail, because there's things in # the subdirectories that need check_LTLIBRARIES built first. Adding "." here # changes the order so the subdirectories are processed afterwards. SUBDIRS = . tests ## libraries lib_LTLIBRARIES = libpe_rules.la \ libpe_status.la check_LTLIBRARIES = libpe_status_test.la noinst_HEADERS = pe_status_private.h libpe_rules_la_LDFLAGS = -version-info 30:2:4 libpe_rules_la_CFLAGS = $(CFLAGS_HARDENED_LIB) libpe_rules_la_LDFLAGS += $(LDFLAGS_HARDENED_LIB) libpe_rules_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la ## Library sources (*must* use += format for bumplibs) -libpe_rules_la_SOURCES = common.c -libpe_rules_la_SOURCES += rules.c +libpe_rules_la_SOURCES = rules.c libpe_rules_la_SOURCES += rules_alerts.c libpe_status_la_LDFLAGS = -version-info 35:1:7 libpe_status_la_CFLAGS = $(CFLAGS_HARDENED_LIB) libpe_status_la_LDFLAGS += $(LDFLAGS_HARDENED_LIB) libpe_status_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la ## Library sources (*must* use += format for bumplibs) libpe_status_la_SOURCES = libpe_status_la_SOURCES += bundle.c libpe_status_la_SOURCES += clone.c -libpe_status_la_SOURCES += common.c libpe_status_la_SOURCES += complex.c libpe_status_la_SOURCES += failcounts.c libpe_status_la_SOURCES += group.c libpe_status_la_SOURCES += native.c libpe_status_la_SOURCES += pe_actions.c libpe_status_la_SOURCES += pe_health.c libpe_status_la_SOURCES += pe_digest.c libpe_status_la_SOURCES += pe_notif.c libpe_status_la_SOURCES += pe_output.c libpe_status_la_SOURCES += remote.c libpe_status_la_SOURCES += rules.c libpe_status_la_SOURCES += status.c libpe_status_la_SOURCES += tags.c libpe_status_la_SOURCES += unpack.c libpe_status_la_SOURCES += utils.c # # libpe_status_test is only used with unit tests, so we can # mock system calls. See lib/common/mock.c for details. # include $(top_srcdir)/mk/tap.mk libpe_status_test_la_SOURCES = $(libpe_status_la_SOURCES) libpe_status_test_la_LDFLAGS = $(libpe_status_la_LDFLAGS) \ -rpath $(libdir) \ $(LDFLAGS_WRAP) # See comments on libcrmcommon_test_la in lib/common/Makefile.am regarding these flags. libpe_status_test_la_CFLAGS = $(libpe_status_la_CFLAGS) \ -DPCMK__UNIT_TESTING \ -fno-builtin \ -fno-inline libpe_status_test_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon_test.la \ -lcmocka \ -lm diff --git a/lib/pengine/common.c b/lib/pengine/common.c deleted file mode 100644 index 6351bac004..0000000000 --- a/lib/pengine/common.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2004-2024 the Pacemaker project contributors - * - * The version control history for this file may have further details. - * - * This source code is licensed under the GNU Lesser General Public License - * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. - */ - -#include -#include -#include -#include - -#include - -#include -#include - -// Deprecated functions kept only for backward API compatibility -// LCOV_EXCL_START - -#include - -const char * -role2text(enum rsc_role_e role) -{ - return pcmk_role_text(role); -} - -enum rsc_role_e -text2role(const char *role) -{ - return pcmk_parse_role(role); -} - -const char * -task2text(enum action_tasks task) -{ - return pcmk_action_text(task); -} - -enum action_tasks -text2task(const char *task) -{ - return pcmk_parse_action(task); -} - -const char * -pe_pref(GHashTable * options, const char *name) -{ - return pcmk__cluster_option(options, name); -} - -const char * -fail2text(enum action_fail_response fail) -{ - return pcmk_on_fail_text(fail); -} - -// LCOV_EXCL_STOP -// End deprecated API diff --git a/po/POTFILES.in b/po/POTFILES.in index fdb95c4cd5..792df70429 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,9 +1,8 @@ # Alphabetically sorted list of source files that contain translatable strings daemons/based/pacemaker-based.c daemons/controld/controld_control.c daemons/fenced/pacemaker-fenced.c lib/cib/cib_utils.c lib/common/options.c lib/common/cmdline.c -lib/pengine/common.c tools/crm_resource.c diff --git a/po/zh_CN.po b/po/zh_CN.po index d79554c3d5..9434210056 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1,1452 +1,1452 @@ # # Copyright 2003-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU Lesser General Public License # version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Pacemaker 2\n" "Report-Msgid-Bugs-To: developers@clusterlabs.org\n" -"POT-Creation-Date: 2024-05-13 16:10-0500\n" +"POT-Creation-Date: 2024-05-22 09:04-0500\n" "PO-Revision-Date: 2021-11-08 11:04+0800\n" "Last-Translator: Vivi \n" "Language-Team: CHINESE \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: daemons/fenced/pacemaker-fenced.c:498 msgid "Instance attributes available for all \"stonith\"-class resources" msgstr " 可用于所有stonith类资源的实例属性" #: daemons/fenced/pacemaker-fenced.c:500 msgid "" "Instance attributes available for all \"stonith\"-class resources and used " "by Pacemaker's fence daemon, formerly known as stonithd" msgstr "" " 可用于所有stonith类资源的实例属性,并由Pacemaker的fence守护程序使用(以前称" "为stonithd)" #: daemons/fenced/pacemaker-fenced.c:511 msgid "Deprecated (will be removed in a future release)" msgstr "已弃用(将在未来版本中删除)" #: daemons/fenced/pacemaker-fenced.c:514 msgid "Intended for use in regression testing only" msgstr "仅适用于回归测试" #: daemons/fenced/pacemaker-fenced.c:517 msgid "Send logs to the additional named logfile" msgstr "将日志发送到其他命名日志文件" #: lib/common/options.c:57 msgid "Pacemaker version on cluster node elected Designated Controller (DC)" msgstr "集群选定的控制器节点(DC)的 Pacemaker 版本" #: lib/common/options.c:59 #, fuzzy msgid "" "Includes a hash which identifies the exact revision the code was built from. " "Used for diagnostic purposes." msgstr "它包含一个标识所构建代码修订版本的哈希值. 其可用于诊断." #: lib/common/options.c:66 #, fuzzy msgid "The messaging layer on which Pacemaker is currently running" msgstr "Pacemaker 当前运行的消息传递层" #: lib/common/options.c:67 msgid "Used for informational and diagnostic purposes." msgstr "用于提供信息和诊断." #: lib/common/options.c:73 msgid "An arbitrary name for the cluster" msgstr "任意的集群名称" #: lib/common/options.c:74 msgid "" "This optional value is mostly for users' convenience as desired in " "administration, but may also be used in Pacemaker configuration rules via " "the #cluster-name node attribute, and by higher-level tools and resource " "agents." msgstr "" "该可选值主要是为了方便用户根据管理的需要使用, 可以通过 #cluster-name 节点属性" "在 Pacemaker 配置规则中使用, 以及被更高级的工具和资源代理使用." #: lib/common/options.c:83 msgid "How long to wait for a response from other nodes during start-up" msgstr "启动过程中等待其他节点响应的时间" #: lib/common/options.c:84 msgid "" "The optimal value will depend on the speed and load of your network and the " "type of switches used." msgstr "其最佳值将取决于您的网络速度和负载以及使用的交换机类型." #: lib/common/options.c:91 msgid "" "Polling interval to recheck cluster state and evaluate rules with date " "specifications" msgstr "重新检查集群状态及评估日期规范规则的轮询间隔" #: lib/common/options.c:93 #, fuzzy msgid "" "Pacemaker is primarily event-driven, and looks ahead to know when to recheck " "cluster state for failure-timeout settings and most time-based rules. " "However, it will also recheck the cluster after this amount of inactivity, " "to evaluate rules with date specifications and serve as a fail-safe for " "certain types of scheduler bugs. A value of 0 disables polling. A positive " "value sets an interval in seconds, unless other units are specified (for " "example, \"5min\")." msgstr "" "Pacemaker 主要是通过事件驱动的, 并会提前预测何时重新检查集群状态以评估大多数" "基于时间的规则以及 failure-timeout 配置, 然而无论如何, 经过指定的时间后如果没" "有活动, 它将重新检查集群, 以评估具有日期规范的规则, 并为某些类型的调度程序缺" "陷提供故障保护. 如果值为0, 将禁用轮询. 如果值为正数, 则设置以秒为单位的时间间" "隔, 除非指定了其它单位 (例如, \"5min\")." #: lib/common/options.c:107 msgid "How a cluster node should react if notified of its own fencing" msgstr "集群节点在收到针对自己的 fence 操作结果通知时应如何反应" #: lib/common/options.c:108 #, fuzzy msgid "" "A cluster node may receive notification of a \"succeeded\" fencing that " "targeted it if fencing is misconfigured, or if fabric fencing is in use that " "doesn't cut cluster communication. Use \"stop\" to attempt to immediately " "stop Pacemaker and stay stopped, or \"panic\" to attempt to immediately " "reboot the local node, falling back to stop on failure." msgstr "" "如果有错误的 fence 配置, 或者在使用 fabric fence 机制 (并不会切断集群通信), " "则集群节点可能会收到针对自己的 \"succeeded\" fence 结果通知. 使用 \"stop\" 尝" "试立即停止 pacemaker 并保持停止状态,或者使用 \"panic\" 尝试立即重新启动本地节" "点,如果失败则返回执行 stop." #: lib/common/options.c:119 msgid "" "Declare an election failed if it is not decided within this much time. If " "you need to adjust this value, it probably indicates the presence of a bug." msgstr "" "如果集群在本项设置时间内没有作出决定则宣布选举失败. 这可能表明当前存在错误, " "您需要调整该值." #: lib/common/options.c:128 msgid "" "Exit immediately if shutdown does not complete within this much time. If you " "need to adjust this value, it probably indicates the presence of a bug." msgstr "" "如果在这段时间内关机仍未完成, pacemaker 将立即退出. 这可能表明当前存在错误, " "您需要调整该值." #: lib/common/options.c:138 lib/common/options.c:147 msgid "" "If you need to adjust this value, it probably indicates the presence of a " "bug." msgstr "这可能表明当前存在错误, 您需要调整该值." #: lib/common/options.c:156 #, fuzzy msgid "" "Enabling this option will slow down cluster recovery under all conditions" msgstr "启用此选项将在所有情况下减慢集群恢复的速度" #: lib/common/options.c:158 msgid "" "Delay cluster recovery for this much time to allow for additional events to " "occur. Useful if your configuration is sensitive to the order in which ping " "updates arrive." msgstr "" "集群恢复将被推迟指定的时间间隔, 以等待更多事件发生. 如果您的配置对 ping 更新" "到达的顺序很敏感, 则可以使用此选项." #: lib/common/options.c:168 msgid "What to do when the cluster does not have quorum" msgstr "当集群没有达到必需票数时该如何做" #: lib/common/options.c:175 msgid "Whether to lock resources to a cleanly shut down node" msgstr "是否锁定资源到完全关闭的节点" #: lib/common/options.c:176 msgid "" "When true, resources active on a node when it is cleanly shut down are kept " "\"locked\" to that node (not allowed to run elsewhere) until they start " "again on that node after it rejoins (or for at most shutdown-lock-limit, if " "set). Stonith resources and Pacemaker Remote connections are never locked. " "Clone and bundle instances and the promoted role of promotable clones are " "currently never locked, though support could be added in a future release." msgstr "" "设置为 true 时, 在完全关闭的节点上活动的资源将被 \"locked\" 到该节点 (不允许" "在其它方运行), 直到该节点重新加入后它们再次在该节点上启动 (最长为 shutdown-" "lock-limit,如果已设置). Stonith 资源和 Pacemaker Remote 连接永远不会被锁定. " "克隆和捆绑实例以及可提升克隆的提升角色目前不会被锁定, 尽管可能在未来的发行版" "中添加支持. " #: lib/common/options.c:189 msgid "Do not lock resources to a cleanly shut down node longer than this" msgstr "资源会被锁定到完全关闭的节点的最长时间" #: lib/common/options.c:191 msgid "" "If shutdown-lock is true and this is set to a nonzero time duration, " "shutdown locks will expire after this much time has passed since the " "shutdown was initiated, even if the node has not rejoined." msgstr "" "如果 shutdown-lock 为 true, 并且将此选项设置为非零时间间隔, 则自关闭操作执行" "经过此时间后,shutdown lock 将过期, 即使该节点尚未重新加入也是如此. " #: lib/common/options.c:200 msgid "Enable Access Control Lists (ACLs) for the CIB" msgstr "为 CIB 启用访问控制列表 (ACL) " #: lib/common/options.c:207 msgid "Whether resources can run on any node by default" msgstr "默认情况下资源是否可以在任何节点上运行" #: lib/common/options.c:214 msgid "" "Whether the cluster should refrain from monitoring, starting, and stopping " "resources" msgstr "集群是否应避免监视, 启动和停止资源" #: lib/common/options.c:222 msgid "" "Whether a start failure should prevent a resource from being recovered on " "the same node" msgstr "资源启动失败是否应阻止在同一节点上恢复该资源" #: lib/common/options.c:224 msgid "" "When true, the cluster will immediately ban a resource from a node if it " "fails to start there. When false, the cluster will instead check the " "resource's fail count against its migration-threshold." msgstr "" "当为true, 如果资源启动失败, 集群将立即禁止节点启动该资源, 当为false, 集群将检" "查资源的失败次数是否超过了其 migration-threshold. " #: lib/common/options.c:232 msgid "Whether the cluster should check for active resources during start-up" msgstr "集群是否在启动期间检查活动的资源" #: lib/common/options.c:242 #, fuzzy msgid "Whether nodes may be fenced as part of recovery" msgstr "节点是否可以被 fence 作为集群恢复的一部分" #: lib/common/options.c:243 msgid "" "If false, unresponsive nodes are immediately assumed to be harmless, and " "resources that were active on them may be recovered elsewhere. This can " "result in a \"split-brain\" situation, potentially leading to data loss and/" "or service unavailability." msgstr "" "如果为 false, 则立即假定无响应的节点是无害的, 并且可以在其它位置恢复在其上活" "动的资源. 这可能会导致 \"split-brain\" 情况, 从而可能导致数据丢失和(或)服务不" "可用. " #: lib/common/options.c:253 msgid "" "Action to send to fence device when a node needs to be fenced (\"poweroff\" " "is a deprecated alias for \"off\")" msgstr "" "当节点需要被 fence 时, 向 fence 设备发送的操作 (\"poweroff\" 作为 \"off\" 的" "别名已被弃用)" #: lib/common/options.c:261 msgid "" "How long to wait for on, off, and reboot fence actions to complete by default" msgstr "默认情况下, 等待 on, off, 和 reboot fence 操作完成的时间" #: lib/common/options.c:269 msgid "Whether watchdog integration is enabled" msgstr "是否启用 watchdog 集成设置" #: lib/common/options.c:270 msgid "" "This is set automatically by the cluster according to whether SBD is " "detected to be in use. User-configured values are ignored. The value `true` " "is meaningful if diskless SBD is used and `stonith-watchdog-timeout` is " "nonzero. In that case, if fencing is required, watchdog-based self-fencing " "will be performed via SBD without requiring a fencing resource explicitly " "configured." msgstr "" "集群会根据是否检测到 SBD 正在使用来自动设置此值. 用户配置的值将被忽略. 如果使" "用了无盘 SBD 并且 `stonith-watchdog-timeout` 不为零, 则值 `true` 才有实际意" "义. 在这种情况下, 如果需要fence, 将通过 SBD 执行基于 watchdog 的自我 fence, " "而不需要明确配置 fence 资源." #: lib/common/options.c:291 #, fuzzy msgid "" "How long before nodes can be assumed to be safely down when watchdog-based " "self-fencing via SBD is in use" msgstr "" "当基于 watchdog 的自我 fence 机制通过SBD 被执行时, 节点被认为安全下线的等待时" "间有多长" #: lib/common/options.c:293 #, fuzzy msgid "" "If this is set to a positive value, lost nodes are assumed to achieve self-" "fencing using watchdog-based SBD within this much time. This does not " "require a fencing resource to be explicitly configured, though a " "fence_watchdog resource can be configured, to limit use to specific nodes. " "If this is set to 0 (the default), the cluster will never assume watchdog-" "based self-fencing. If this is set to a negative value, the cluster will use " "twice the local value of the `SBD_WATCHDOG_TIMEOUT` environment variable if " "that is positive, or otherwise treat this as 0. WARNING: When used, this " "timeout must be larger than `SBD_WATCHDOG_TIMEOUT` on all nodes that use " "watchdog-based SBD, and Pacemaker will refuse to start on any of those nodes " "where this is not true for the local value or SBD is not active. When this " "is set to a negative value, `SBD_WATCHDOG_TIMEOUT` must be set to the same " "value on all nodes that use SBD, otherwise data corruption or loss could " "occur." msgstr "" "如果设为正值, 丢失的节点将在设定的时间内被认定使用基于 watchdog 的 SBD 完成自" "我 fence. 这不需要明确配置一个 fence 资源, 但可以配置一个 fence_watchdog 资源" "来限制对特定节点使用. 如果设为0 (默认值), 集群将永远不会认定节点使用基于 " "watchdog 的自我 fence. 如果设为负值, 集群将使用本地 `SBD_WATCHDOG_TIMEOUT` 环" "境变量的两倍值(如果该值为正), 否则会将该值视为0. 警告: 在所有使用基于 " "watchdog 的 SBD 的节点上, 此超时值需大于 `SBD_WATCHDOG_TIMEOUT` 的值, 否则 " "Pacemaker 不会在任何不符合此条件的节点上启动, 也不会在任何未启用 SBD 的节点上" "启动. 当设为负值时所有使用 SBD 的节点上 `SBD_WATCHDOG_TIMEOUT` 的值必须设置为" "相同的值, 否则可能导致数据损坏或丢失." #: lib/common/options.c:313 msgid "" "How many times fencing can fail before it will no longer be immediately re-" "attempted on a target" msgstr "fence 操作失败多少次会停止立即尝试" #: lib/common/options.c:321 msgid "Allow performing fencing operations in parallel" msgstr "允许并行执行 fencing 操作" #: lib/common/options.c:328 #, fuzzy msgid "Whether to fence unseen nodes at start-up" msgstr "*** 仅高级使用 *** 是否在启动时fence不可见节点" #: lib/common/options.c:329 #, fuzzy msgid "" "Setting this to false may lead to a \"split-brain\" situation, potentially " "leading to data loss and/or service unavailability." msgstr "" "将此设置为 false 可能会导致 \"split-brain\" 的情况,可能导致数据丢失和(或)服" "务不可用。" #: lib/common/options.c:336 msgid "" "Apply fencing delay targeting the lost nodes with the highest total resource " "priority" msgstr "针对具有最高总资源优先级的丢失节点应用fencing延迟" #: lib/common/options.c:338 msgid "" "Apply specified delay for the fencings that are targeting the lost nodes " "with the highest total resource priority in case we don't have the majority " "of the nodes in our cluster partition, so that the more significant nodes " "potentially win any fencing match, which is especially meaningful under " "split-brain of 2-node cluster. A promoted resource instance takes the base " "priority + 1 on calculation if the base priority is not 0. Any static/random " "delays that are introduced by `pcmk_delay_base/max` configured for the " "corresponding fencing resources will be added to this delay. This delay " "should be significantly greater than, safely twice, the maximum " "`pcmk_delay_base/max`. By default, priority fencing delay is disabled." msgstr "" "如果我们所在的集群分区并不拥有大多数集群节点,则针对丢失节点的fence操作应用指" "定的延迟,这样更重要的节点就能够赢得fence竞赛。这对于双节点集群在split-brain" "状况下尤其有意义。如果基本优先级不为0,在计算时主资源实例获得基本优先级+1。任" "何对于相应的 fence 资源由 pcmk_delay_base/max 配置所引入的静态/随机延迟会被添" "加到此延迟。为了安全, 这个延迟应该明显大于 pcmk_delay_base/max 的最大设置值," "例如两倍。默认情况下,优先级fencing延迟已禁用。" #: lib/common/options.c:355 msgid "" "How long to wait for a node that has joined the cluster to join the " "controller process group" msgstr "等待已加入集群的节点加入控制器进程组的时间" #: lib/common/options.c:357 msgid "" "Fence nodes that do not join the controller process group within this much " "time after joining the cluster, to allow the cluster to continue managing " "resources. A value of 0 means never fence pending nodes. Setting the value " "to 2h means fence nodes after 2 hours." msgstr "" "如果节点加入集群后在此时间内不加入控制器进程组,Fence该节点,以便群集继续管理" "资源。值为0表示永远不 fence 待定节点。将值设置为2h表示2小时后 fence 待定节" "点。" #: lib/common/options.c:367 msgid "Maximum time for node-to-node communication" msgstr "最大节点间通信时间" #: lib/common/options.c:368 msgid "" "The node elected Designated Controller (DC) will consider an action failed " "if it does not get a response from the node executing the action within this " "time (after considering the action's own timeout). The \"correct\" value " "will depend on the speed and load of your network and cluster nodes." msgstr "" "如果一个操作未在该时间内(并且考虑操作本身的超时时长)从执行该操作的节点获得" "响应,则会被选为指定控制器(DC)的节点认定为失败。\"正确\" 值将取决于速度和您" "的网络和集群节点的负载。" #: lib/common/options.c:380 msgid "Maximum amount of system load that should be used by cluster nodes" msgstr "集群节点应该使用的最大系统负载量" #: lib/common/options.c:382 msgid "" "The cluster will slow down its recovery process when the amount of system " "resources used (currently CPU) approaches this limit" msgstr "当使用的系统资源量(当前指 CPU)接近此限制时, 集群将减慢其恢复过程" #: lib/common/options.c:389 msgid "" "Maximum number of jobs that can be scheduled per node (defaults to 2x cores)" msgstr "每个节点可以调度的最大作业数(默认为2x内核数)" #: lib/common/options.c:397 #, fuzzy msgid "" "Maximum number of jobs that the cluster may execute in parallel across all " "nodes" msgstr "集群可以在所有节点上并发执行的最大作业数" #: lib/common/options.c:399 msgid "" "The \"correct\" value will depend on the speed and load of your network and " "cluster nodes. If set to 0, the cluster will impose a dynamically calculated " "limit when any node has a high load." msgstr "" "\"正确\" 值将取决于速度和您的网络与集群节点的负载。如果设置为0,当任何节点具" "有高负载时,集群将施加一个动态计算的限制。" #: lib/common/options.c:408 msgid "" "The number of live migration actions that the cluster is allowed to execute " "in parallel on a node (-1 means no limit)" msgstr "允许集群在一个节点上并行执行的实时迁移操作的数量(-1表示没有限制)" #: lib/common/options.c:427 msgid "Maximum IPC message backlog before disconnecting a cluster daemon" msgstr "断开集群守护程序之前的最大IPC消息积压" #: lib/common/options.c:428 msgid "" "Raise this if log has \"Evicting client\" messages for cluster daemon PIDs " "(a good value is the number of resources in the cluster multiplied by the " "number of nodes)." msgstr "" "如果日志中有针对集群守护程序PID的消息“Evicting client”,(则建议将值设为集群" "中的资源数量乘以节点数量)" #: lib/common/options.c:438 #, fuzzy msgid "Whether the cluster should stop all active resources" msgstr "集群是否在启动期间检查运行资源" #: lib/common/options.c:445 msgid "Whether to stop resources that were removed from the configuration" msgstr "是否停止配置已被删除的资源" #: lib/common/options.c:453 msgid "Whether to cancel recurring actions removed from the configuration" msgstr "是否取消配置已被删除的的重复操作" #: lib/common/options.c:461 #, fuzzy msgid "Whether to remove stopped resources from the executor" msgstr "是否从pacemaker-execd 守护进程中清除已停止的资源" #: lib/common/options.c:462 #, fuzzy msgid "Values other than default are poorly tested and potentially dangerous." msgstr "非默认值未经过充分的测试,有潜在的风险。该选项将在未来的版本中删除。" #: lib/common/options.c:471 msgid "The number of scheduler inputs resulting in errors to save" msgstr "保存导致错误的调度程序输入的数量" #: lib/common/options.c:472 lib/common/options.c:479 lib/common/options.c:486 msgid "Zero to disable, -1 to store unlimited." msgstr "零表示禁用,-1表示存储不受限制。" #: lib/common/options.c:478 msgid "The number of scheduler inputs resulting in warnings to save" msgstr "保存导致警告的调度程序输入的数量" #: lib/common/options.c:485 msgid "The number of scheduler inputs without errors or warnings to save" msgstr "保存没有错误或警告的调度程序输入的数量" #: lib/common/options.c:497 #, fuzzy msgid "How cluster should react to node health attributes" msgstr "集群节点对节点健康属性如何反应" #: lib/common/options.c:498 msgid "" "Requires external entities to create node attributes (named with the prefix " "\"#health\") with values \"red\", \"yellow\", or \"green\"." msgstr "" "需要外部实体创建具有“red”,“yellow”或“green”值的节点属性(前缀为“#health”)" #: lib/common/options.c:506 msgid "Base health score assigned to a node" msgstr "分配给节点的基本健康分数" #: lib/common/options.c:507 msgid "Only used when \"node-health-strategy\" is set to \"progressive\"." msgstr "仅在“node-health-strategy”设置为“progressive”时使用。" #: lib/common/options.c:514 msgid "The score to use for a node health attribute whose value is \"green\"" msgstr "为节点健康属性值为“green”所使用的分数" #: lib/common/options.c:516 lib/common/options.c:525 lib/common/options.c:534 msgid "" "Only used when \"node-health-strategy\" is set to \"custom\" or \"progressive" "\"." msgstr "仅在“node-health-strategy”设置为“custom”或“progressive”时使用。" #: lib/common/options.c:523 msgid "The score to use for a node health attribute whose value is \"yellow\"" msgstr "为节点健康属性值为“yellow”所使用的分数" #: lib/common/options.c:532 msgid "The score to use for a node health attribute whose value is \"red\"" msgstr "为节点健康属性值为“red”所使用的分数" #: lib/common/options.c:545 #, fuzzy msgid "How the cluster should allocate resources to nodes" msgstr "集群应该如何分配资源到节点" #: lib/common/options.c:563 #, fuzzy msgid "An alternate parameter to supply instead of 'port'" msgstr "用于替代 'port' 的其它参数" #: lib/common/options.c:564 #, fuzzy msgid "" "Some devices do not support the standard 'port' parameter or may provide " "additional ones. Use this to specify an alternate, device-specific, " "parameter that should indicate the machine to be fenced. A value of \"none\" " "can be used to tell the cluster not to supply any additional parameters." msgstr "" "一些设备不支持标准的 'port' 参数, 或者可能会提供其它的参数. 使用此选项可指定" "一个替代的, 该设备专用的参数, 该参数应该指出需要 fence 的机器. 可以使用 " "\"none\" 值用于告诉集群不要提供任何其它的参数. " #: lib/common/options.c:574 #, fuzzy msgid "" "A mapping of node names to port numbers for devices that do not support node " "names." msgstr "为不支持主机名的设备提供主机名到端口号的映射. " #: lib/common/options.c:576 #, fuzzy msgid "" "For example, \"node1:1;node2:2,3\" would tell the cluster to use port 1 for " "node1 and ports 2 and 3 for node2." msgstr "" "例如, \"node1:1;node2:2,3\" 将会告诉集群对node1使用端口1, 对node2使用端口2和" "3." #: lib/common/options.c:583 msgid "Nodes targeted by this device" msgstr "此设备针对的节点" #: lib/common/options.c:584 #, fuzzy msgid "" "Comma-separated list of nodes that can be targeted by this device (for " "example, \"node1,node2,node3\"). If pcmk_host_check is \"static-list\", " "either this or pcmk_host_map must be set." msgstr "" "此设备可以针对的节点列表,节点之间用逗号分隔(例如,node1,node2, node3).如果" "pcmk_host_list=\"static-list\")" #: lib/common/options.c:594 #, fuzzy msgid "How to determine which nodes can be targeted by the device" msgstr "如何确定设备可以针对哪些节点" #: lib/common/options.c:595 #, fuzzy msgid "" "Use \"dynamic-list\" to query the device via the 'list' command; \"static-" "list\" to check the pcmk_host_list attribute; \"status\" to query the device " "via the 'status' command; or \"none\" to assume every device can fence every " "node. The default value is \"static-list\" if pcmk_host_map or " "pcmk_host_list is set; otherwise \"dynamic-list\" if the device supports the " "list operation; otherwise \"status\" if the device supports the status " "operation; otherwise \"none\"" msgstr "" "选项值 \"dynamic-list\" 表示通过 'list' 命令查询设备; 选项值 \"static-list" "\"表示检查 pcmk_host_list 属性; 选项值 \"status\" 表示通过 'status' 命令查询" "设备; 或使用选项值 \"none\" 假设每个设备都可以 fence 所有节点. 如果" "\"pcmk_host_map\"或\"pcmk_host_list\"被设置,默认值为\"static-list\";否则," "如果设备支持列表操作,则为\"dynamic-list\";如果设备支持状态操作,则为" "\"status\";否则为\"none\"" #: lib/common/options.c:608 msgid "" "Enable a delay of no more than the time specified before executing fencing " "actions." msgstr "在执行 fence 操作前启用不超过指定时间的延迟" #: lib/common/options.c:610 msgid "" "Enable a delay of no more than the time specified before executing fencing " "actions. Pacemaker derives the overall delay by taking the value of " "pcmk_delay_base and adding a random delay value such that the sum is kept " "below this maximum." msgstr "" "在执行 fence 操作前启用不超过指定时间的延迟. Pacemaker通过获取 " "pcmk_delay_base 的值并添加随机延迟值来得出总延迟, 并且确保总和不超过此最大值." #: lib/common/options.c:619 msgid "Enable a base delay for fencing actions and specify base delay value." msgstr "为 fence 操作启用一个指定的基础延迟. " #: lib/common/options.c:621 #, fuzzy msgid "" "This enables a static delay for fencing actions, which can help avoid " "\"death matches\" where two nodes try to fence each other at the same time. " "If pcmk_delay_max is also used, a random delay will be added such that the " "total delay is kept below that value. This can be set to a single time value " "to apply to any node targeted by this device (useful if a separate device is " "configured for each target), or to a node map (for example, \"node1:1s;" "node2:5\") to set a different value for each target." msgstr "" "这为 fence 操作启用一个静态延迟, 这有助于避免 \"death matches\" 即两个节点同" "时尝试互相 fence. 如果还同时使用了pcmk_delay_max, 则会添加一个随机延迟, 并确" "保总延迟保持在该值以下. 可以将其设置为单个时间值, 以应用于该设备的所有目标节" "点 (如果为每个目标节点都配置了单独的设备的情况下, 这很有用) 或设置成一个节点" "映射形式 (例如,\"node1:1s;node2:5\") 从而为每个目标节点设置不同值. " #: lib/common/options.c:634 msgid "" "The maximum number of actions can be performed in parallel on this device" msgstr "可以在该设备上并发执行的最多操作数量" #: lib/common/options.c:636 #, fuzzy msgid "" "Cluster property concurrent-fencing=\"true\" needs to be configured first. " "Then use this to specify the maximum number of actions can be performed in " "parallel on this device. A value of -1 means an unlimited number of actions " "can be performed in parallel." msgstr "" "需要先配置集群属性 concurrent-fencing=\"true\". 然后使用此参数指定可以在该设" "备上并发执行的最多操作数量. -1 表示可以并行执行无限数量的操作. " #: lib/common/options.c:646 #, fuzzy msgid "An alternate command to run instead of 'reboot'" msgstr "运行替代命令,而不是'reboot'" #: lib/common/options.c:647 #, fuzzy msgid "" "Some devices do not support the standard commands or may provide additional " "ones. Use this to specify an alternate, device-specific, command that " "implements the 'reboot' action." msgstr "" "一些设备不支持标准命令或可能提供其他命令,使用此选项可以指定一个该设备特定的" "替代命令,用来实现'reboot'操作。" #: lib/common/options.c:655 #, fuzzy msgid "" "Specify an alternate timeout to use for 'reboot' actions instead of stonith-" "timeout" msgstr "指定用于'reboot' 操作的替代超时,而不是stonith-timeout" #: lib/common/options.c:657 #, fuzzy msgid "" "Some devices need much more/less time to complete than normal. Use this to " "specify an alternate, device-specific, timeout for 'reboot' actions." msgstr "" "一些设备需要比正常情况下更多或更少的时间来完成操作,使用此选项指定一个用" "于'reboot'操作的该设备特定的替代超时。" #: lib/common/options.c:665 #, fuzzy msgid "" "The maximum number of times to try the 'reboot' command within the timeout " "period" msgstr "在超时前重试'reboot'命令的最大次数" #: lib/common/options.c:667 #, fuzzy msgid "" "Some devices do not support multiple connections. Operations may \"fail\" if " "the device is busy with another task. In that case, Pacemaker will " "automatically retry the operation if there is time remaining. Use this " "option to alter the number of times Pacemaker tries a 'reboot' action before " "giving up." msgstr "" "一些设备不支持多个连接。 如果设备忙于另一个任务,则操作可能会'失败' ,因此" "Pacemaker将自动重试(如果时间允许)。 使用此选项更改Pacemaker在放弃之前重" "试'reboot' 操作的次数." #: lib/common/options.c:677 #, fuzzy msgid "An alternate command to run instead of 'off'" msgstr "运行替代命令,而不是'off'" #: lib/common/options.c:678 #, fuzzy msgid "" "Some devices do not support the standard commands or may provide additional " "ones. Use this to specify an alternate, device-specific, command that " "implements the 'off' action." msgstr "" "一些设备不支持标准命令或可能提供其他命令,使用此选项可指定一个该设备专用的替代" "命令,用来实现'off'操作。" #: lib/common/options.c:686 #, fuzzy msgid "" "Specify an alternate timeout to use for 'off' actions instead of stonith-" "timeout" msgstr "指定用于off 操作的替代超时,而不是stonith-timeout" #: lib/common/options.c:688 #, fuzzy msgid "" "Some devices need much more/less time to complete than normal. Use this to " "specify an alternate, device-specific, timeout for 'off' actions." msgstr "" "一些设备需要比正常情况下更多或更少的时间来完成操作,使用此选项指定一个用" "于'off'操作的该设备特定的替代超时。" #: lib/common/options.c:696 #, fuzzy msgid "" "The maximum number of times to try the 'off' command within the timeout " "period" msgstr "在超时前重试'off'命令的最大次数" #: lib/common/options.c:698 #, fuzzy msgid "" "Some devices do not support multiple connections. Operations may \"fail\" if " "the device is busy with another task. In that case, Pacemaker will " "automatically retry the operation if there is time remaining. Use this " "option to alter the number of times Pacemaker tries a 'off' action before " "giving up." msgstr "" " 一些设备不支持多个连接。 如果设备忙于另一个任务,则操作可能会'失败' , 因此" "Pacemaker将自动重试(如果时间允许)。 使用此选项更改Pacemaker在放弃之前重" "试'off' 操作的次数." #: lib/common/options.c:708 #, fuzzy msgid "An alternate command to run instead of 'on'" msgstr "仅高级使用:运行替代命令,而不是'on'" #: lib/common/options.c:709 #, fuzzy msgid "" "Some devices do not support the standard commands or may provide additional " "ones. Use this to specify an alternate, device-specific, command that " "implements the 'on' action." msgstr "" "一些设备不支持标准命令或可能提供其他命令,使用此选项可指定一个该设备特定的替" "代命令,用来实现'on'操作。" #: lib/common/options.c:717 #, fuzzy msgid "" "Specify an alternate timeout to use for 'on' actions instead of stonith-" "timeout" msgstr "指定用于on 操作的替代超时,而不是stonith-timeout" #: lib/common/options.c:719 #, fuzzy msgid "" "Some devices need much more/less time to complete than normal. Use this to " "specify an alternate, device-specific, timeout for 'on' actions." msgstr "" "一些设备需要比正常情况下更多或更少的时间来完成操作,使用此选项指定一个用" "于'on'操作的该设备特定的替代超时。" #: lib/common/options.c:727 #, fuzzy msgid "" "The maximum number of times to try the 'on' command within the timeout period" msgstr "在超时前重试'on'命令的最大次数" #: lib/common/options.c:729 #, fuzzy msgid "" "Some devices do not support multiple connections. Operations may \"fail\" if " "the device is busy with another task. In that case, Pacemaker will " "automatically retry the operation if there is time remaining. Use this " "option to alter the number of times Pacemaker tries a 'on' action before " "giving up." msgstr "" " 一些设备不支持多个连接。 如果设备忙于另一个任务,则操作可能会'失败' , 因此" "Pacemaker将自动重试(如果时间允许)。 使用此选项更改Pacemaker在放弃之前重" "试'on' 操作的次数." #: lib/common/options.c:739 #, fuzzy msgid "An alternate command to run instead of 'list'" msgstr "运行替代命令,而不是'list'" #: lib/common/options.c:740 #, fuzzy msgid "" "Some devices do not support the standard commands or may provide additional " "ones. Use this to specify an alternate, device-specific, command that " "implements the 'list' action." msgstr "" "一些设备不支持标准命令或可能提供其他命令,使用此选项可指定一个该设备特定的替" "代命令,用来实现'list'操作。" #: lib/common/options.c:748 #, fuzzy msgid "" "Specify an alternate timeout to use for 'list' actions instead of stonith-" "timeout" msgstr "指定用于list 操作的替代超时,而不是stonith-timeout" #: lib/common/options.c:750 #, fuzzy msgid "" "Some devices need much more/less time to complete than normal. Use this to " "specify an alternate, device-specific, timeout for 'list' actions." msgstr "" "一些设备需要比正常情况下更多或更少的时间来完成操作,使用此选项指定一个用" "于'list'操作的该设备特定的替代超时。" #: lib/common/options.c:758 #, fuzzy msgid "" "The maximum number of times to try the 'list' command within the timeout " "period" msgstr "在超时前重试'list'命令的最大次数" #: lib/common/options.c:760 #, fuzzy msgid "" "Some devices do not support multiple connections. Operations may \"fail\" if " "the device is busy with another task. In that case, Pacemaker will " "automatically retry the operation if there is time remaining. Use this " "option to alter the number of times Pacemaker tries a 'list' action before " "giving up." msgstr "" " 一些设备不支持多个连接。 如果设备忙于另一个任务,则操作可能会'失败' , 因此" "Pacemaker将自动重试(如果时间允许)。 使用此选项更改Pacemaker在放弃之前重" "试'list' 操作的次数." #: lib/common/options.c:770 #, fuzzy msgid "An alternate command to run instead of 'monitor'" msgstr "运行替代命令,而不是'monitor'" #: lib/common/options.c:771 #, fuzzy msgid "" "Some devices do not support the standard commands or may provide additional " "ones. Use this to specify an alternate, device-specific, command that " "implements the 'monitor' action." msgstr "" "一些设备不支持标准命令或可能提供其他命令,使用此选项可指定一个该设备特定的替" "代命令,用来实现'monitor'操作。" #: lib/common/options.c:779 #, fuzzy msgid "" "Specify an alternate timeout to use for 'monitor' actions instead of stonith-" "timeout" msgstr "指定用于monitor 操作的替代超时,而不是stonith-timeout" #: lib/common/options.c:781 #, fuzzy msgid "" "Some devices need much more/less time to complete than normal. Use this to " "specify an alternate, device-specific, timeout for 'monitor' actions." msgstr "" "一些设备需要比正常情况下更多或更少的时间来完成操作,使用此选项指定一个用" "于'monitor'操作的该设备特定的替代超时。" #: lib/common/options.c:789 #, fuzzy msgid "" "The maximum number of times to try the 'monitor' command within the timeout " "period" msgstr "在超时前重试'monitor'命令的最大次数" #: lib/common/options.c:791 #, fuzzy msgid "" "Some devices do not support multiple connections. Operations may \"fail\" if " "the device is busy with another task. In that case, Pacemaker will " "automatically retry the operation if there is time remaining. Use this " "option to alter the number of times Pacemaker tries a 'monitor' action " "before giving up." msgstr "" " 一些设备不支持多个连接。 如果设备忙于另一个任务,则操作可能会'失败' , 因此" "Pacemaker将自动重试(如果时间允许)。 使用此选项更改Pacemaker在放弃之前重" "试'monitor' 操作的次数." #: lib/common/options.c:801 #, fuzzy msgid "An alternate command to run instead of 'status'" msgstr "运行替代命令,而不是'status'" #: lib/common/options.c:802 #, fuzzy msgid "" "Some devices do not support the standard commands or may provide additional " "ones. Use this to specify an alternate, device-specific, command that " "implements the 'status' action." msgstr "" "一些设备不支持标准命令或可能提供其他命令,使用此选项可指定一个该设备特定的替" "代命令,用来实现'status'操作。" #: lib/common/options.c:810 #, fuzzy msgid "" "Specify an alternate timeout to use for 'status' actions instead of stonith-" "timeout" msgstr "指定用于status 操作的替代超时,而不是stonith-timeout" #: lib/common/options.c:812 #, fuzzy msgid "" "Some devices need much more/less time to complete than normal. Use this to " "specify an alternate, device-specific, timeout for 'status' actions." msgstr "" "一些设备需要比正常情况下更多或更少的时间来完成操作,使用此选项指定一个用" "于'status'操作的该设备特定的替代超时" #: lib/common/options.c:820 #, fuzzy msgid "" "The maximum number of times to try the 'status' command within the timeout " "period" msgstr "仅高级使用:在超时前重试'status'命令的最大次数" #: lib/common/options.c:822 #, fuzzy msgid "" "Some devices do not support multiple connections. Operations may \"fail\" if " "the device is busy with another task. In that case, Pacemaker will " "automatically retry the operation if there is time remaining. Use this " "option to alter the number of times Pacemaker tries a 'status' action before " "giving up." msgstr "" " 一些设备不支持多个连接。 如果设备忙于另一个任务,则操作可能会'失败' , 因此" "Pacemaker将自动重试(如果时间允许)。 使用此选项更改Pacemaker在放弃之前重" "试'status' 操作的次数." #: lib/common/options.c:843 msgid "Resource assignment priority" msgstr "" #: lib/common/options.c:844 msgid "" "If not all resources can be active, the cluster will stop lower-priority " "resources in order to keep higher-priority ones active." msgstr "" #: lib/common/options.c:852 msgid "Default value for influence in colocation constraints" msgstr "" #: lib/common/options.c:853 msgid "" "Use this value as the default for influence in all colocation constraints " "involving this resource, as well as in the implicit colocation constraints " "created if this resource is in a group." msgstr "" #: lib/common/options.c:863 #, fuzzy msgid "State the cluster should attempt to keep this resource in" msgstr "集群是否在启动期间检查运行资源" #: lib/common/options.c:864 msgid "" "\"Stopped\" forces the resource to be stopped. \"Started\" allows the " "resource to be started (and in the case of promotable clone resources, " "promoted if appropriate). \"Unpromoted\" allows the resource to be started, " "but only in the unpromoted role if the resource is promotable. \"Promoted\" " "is equivalent to \"Started\"." msgstr "" #: lib/common/options.c:875 #, fuzzy msgid "Whether the cluster is allowed to actively change the resource's state" msgstr "集群是否在启动期间检查运行资源" #: lib/common/options.c:877 msgid "" "If false, the cluster will not start, stop, promote, or demote the resource " "on any node. Recurring actions for the resource are unaffected. If true, a " "true value for the maintenance-mode cluster option, the maintenance node " "attribute, or the maintenance resource meta-attribute overrides this." msgstr "" #: lib/common/options.c:887 msgid "" "If true, the cluster will not schedule any actions involving the resource" msgstr "" #: lib/common/options.c:889 msgid "" "If true, the cluster will not start, stop, promote, or demote the resource " "on any node, and will pause any recurring monitors (except those specifying " "role as \"Stopped\"). If false, a true value for the maintenance-mode " "cluster option or maintenance node attribute overrides this." msgstr "" #: lib/common/options.c:899 msgid "Score to add to the current node when a resource is already active" msgstr "" #: lib/common/options.c:901 msgid "" "Score to add to the current node when a resource is already active. This " "allows running resources to stay where they are, even if they would be " "placed elsewhere if they were being started from a stopped state. The " "default is 1 for individual clone instances, and 0 for all other resources." msgstr "" #: lib/common/options.c:914 msgid "Conditions under which the resource can be started" msgstr "" #: lib/common/options.c:915 msgid "" "Conditions under which the resource can be started. \"nothing\" means the " "cluster can always start this resource. \"quorum\" means the cluster can " "start this resource only if a majority of the configured nodes are active. " "\"fencing\" means the cluster can start this resource only if a majority of " "the configured nodes are active and any failed or unknown nodes have been " "fenced. \"unfencing\" means the cluster can start this resource only if a " "majority of the configured nodes are active and any failed or unknown nodes " "have been fenced, and only on nodes that have been unfenced. The default is " "\"quorum\" for resources with a class of stonith; otherwise, \"unfencing\" " "if unfencing is active in the cluster; otherwise, \"fencing\" if the stonith-" "enabled cluster option is true; otherwise, \"quorum\"." msgstr "" #: lib/common/options.c:936 msgid "" "Number of failures on a node before the resource becomes ineligible to run " "there." msgstr "" #: lib/common/options.c:938 msgid "" "Number of failures that may occur for this resource on a node, before that " "node is marked ineligible to host this resource. A value of 0 indicates that " "this feature is disabled (the node will never be marked ineligible). By " "contrast, the cluster treats \"INFINITY\" (the default) as a very large but " "finite number. This option has an effect only if the failed operation " "specifies its on-fail attribute as \"restart\" (the default), and " "additionally for failed start operations, if the start-failure-is-fatal " "cluster property is set to false." msgstr "" #: lib/common/options.c:952 msgid "Number of seconds before acting as if a failure had not occurred" msgstr "" #: lib/common/options.c:953 msgid "" "Number of seconds after a failed action for this resource before acting as " "if the failure had not occurred, and potentially allowing the resource back " "to the node on which it failed. A value of 0 indicates that this feature is " "disabled." msgstr "" #: lib/common/options.c:964 msgid "" "What to do if the cluster finds the resource active on more than one node" msgstr "" #: lib/common/options.c:966 msgid "" "What to do if the cluster finds the resource active on more than one node. " "\"block\" means to mark the resource as unmanaged. \"stop_only\" means to " "stop all active instances of this resource and leave them stopped. " "\"stop_start\" means to stop all active instances of this resource and start " "the resource in one location only. \"stop_unexpected\" means to stop all " "active instances of this resource except where the resource should be " "active. (This should be used only when extra instances are not expected to " "disrupt existing instances, and the resource agent's monitor of an existing " "instance is capable of detecting any problems that could be caused. Note " "that any resources ordered after this one will still need to be restarted.)" msgstr "" #: lib/common/options.c:985 #, fuzzy msgid "" "Whether the cluster should try to \"live migrate\" this resource when it " "needs to be moved" msgstr "集群是否在启动期间检查运行资源" #: lib/common/options.c:987 msgid "" "Whether the cluster should try to \"live migrate\" this resource when it " "needs to be moved. The default is true for ocf:pacemaker:remote resources, " "and false otherwise." msgstr "" #: lib/common/options.c:996 msgid "" "Whether the resource should be allowed to run on a node even if the node's " "health score would otherwise prevent it" msgstr "" #: lib/common/options.c:1004 #, fuzzy msgid "Where to check user-defined node attributes" msgstr "*** 仅高级使用 *** 是否在启动时fence不可见节点" #: lib/common/options.c:1005 msgid "" "Whether to check user-defined node attributes on the physical host where a " "container is running or on the local node. This is usually set for a bundle " "resource and inherited by the bundle's primitive resource. A value of \"host" "\" means to check user-defined node attributes on the underlying physical " "host. Any other value means to check user-defined node attributes on the " "local node (for a bundled primitive resource, this is the bundle node)." msgstr "" #: lib/common/options.c:1018 msgid "" "Name of the Pacemaker Remote guest node this resource is associated with, if " "any" msgstr "" #: lib/common/options.c:1020 msgid "" "Name of the Pacemaker Remote guest node this resource is associated with, if " "any. If specified, this both enables the resource as a guest node and " "defines the unique name used to identify the guest node. The guest must be " "configured to run the Pacemaker Remote daemon when it is started. WARNING: " "This value cannot overlap with any resource or node IDs." msgstr "" #: lib/common/options.c:1032 msgid "" "If remote-node is specified, the IP address or hostname used to connect to " "the guest via Pacemaker Remote" msgstr "" #: lib/common/options.c:1034 msgid "" "If remote-node is specified, the IP address or hostname used to connect to " "the guest via Pacemaker Remote. The Pacemaker Remote daemon on the guest " "must be configured to accept connections on this address. The default is the " "value of the remote-node meta-attribute." msgstr "" #: lib/common/options.c:1044 msgid "" "If remote-node is specified, port on the guest used for its Pacemaker Remote " "connection" msgstr "" #: lib/common/options.c:1046 msgid "" "If remote-node is specified, the port on the guest used for its Pacemaker " "Remote connection. The Pacemaker Remote daemon on the guest must be " "configured to listen on this port." msgstr "" #: lib/common/options.c:1054 msgid "" "If remote-node is specified, how long before a pending Pacemaker Remote " "guest connection times out." msgstr "" #: lib/common/options.c:1062 msgid "" "If remote-node is specified, this acts as the allow-migrate meta-attribute " "for the implicit remote connection resource (ocf:pacemaker:remote)." msgstr "" #: lib/common/cmdline.c:70 msgid "Display software version and exit" msgstr "显示软件版本信息" #: lib/common/cmdline.c:73 msgid "Increase debug output (may be specified multiple times)" msgstr "显示更多调试信息(可多次指定)" #: lib/common/cmdline.c:92 msgid "FORMAT" msgstr "格式" #: lib/common/cmdline.c:94 msgid "Specify file name for output (or \"-\" for stdout)" msgstr "指定输出的文件名 或指定'-' 表示标准输出" #: lib/common/cmdline.c:94 msgid "DEST" msgstr "目标" #: lib/common/cmdline.c:100 msgid "Output Options:" msgstr "输出选项" #: lib/common/cmdline.c:100 msgid "Show output help" msgstr "显示输出帮助" #: tools/crm_resource.c:204 #, c-format msgid "Aborting because no messages received in %d seconds" msgstr "中止,因为在%d秒内没有接收到消息" #: tools/crm_resource.c:374 #, c-format msgid "Invalid check level setting: %s" msgstr "无效的检查级别设置:%s" #: tools/crm_resource.c:891 #, c-format msgid "" "Resource '%s' not moved: active in %d locations (promoted in %d).\n" "To prevent '%s' from running on a specific location, specify a node.To " "prevent '%s' from being promoted at a specific location, specify a node and " "the --promoted option." msgstr "" "资源'%s'未移动:在%d个位置运行(其中在%d个位置为主实例)\n" "若要阻止'%s'在特定位置运行,请指定一个节点。若要防止'%s'在指定位置升级,指定" "一个节点并使用--promoted选项" #: tools/crm_resource.c:902 #, c-format msgid "" "Resource '%s' not moved: active in %d locations.\n" "To prevent '%s' from running on a specific location, specify a node." msgstr "" "资源%s未移动:在%d个位置运行\n" "若要防止'%s'运行在特定位置,指定一个节点" #: tools/crm_resource.c:979 #, c-format msgid "Could not get modified CIB: %s\n" msgstr "无法获得修改的CIB:%s\n" #: tools/crm_resource.c:1077 #, c-format msgid "No cluster connection to Pacemaker Remote node %s detected" msgstr "未检测到至pacemaker远程节点%s的集群连接" #: tools/crm_resource.c:1138 msgid "Must specify -t with resource type" msgstr "需要使用-t指定资源类型" #: tools/crm_resource.c:1144 msgid "Must supply -v with new value" msgstr "必须使用-v指定新值" #: tools/crm_resource.c:1176 msgid "Could not create executor connection" msgstr "无法创建到pacemaker-execd守护进程的连接" #: tools/crm_resource.c:1201 #, fuzzy, c-format msgid "Metadata query for %s failed: %s" msgstr ",查询%s的元数据失败: %s\n" #: tools/crm_resource.c:1207 #, c-format msgid "'%s' is not a valid agent specification" msgstr "'%s' 是一个无效的代理" #: tools/crm_resource.c:1220 msgid "--resource cannot be used with --class, --agent, and --provider" msgstr "--resource 不能与 --class, --agent, --provider一起使用" #: tools/crm_resource.c:1225 msgid "" "--class, --agent, and --provider can only be used with --validate and --" "force-*" msgstr "--class, --agent和--provider只能被用于--validate和--force-*" #: tools/crm_resource.c:1234 msgid "stonith does not support providers" msgstr "stonith 不支持提供者" #: tools/crm_resource.c:1238 #, c-format msgid "%s is not a known stonith agent" msgstr "%s 不是一个已知stonith代理" #: tools/crm_resource.c:1243 #, c-format msgid "%s:%s:%s is not a known resource" msgstr "%s:%s:%s 不是一个已知资源" #: tools/crm_resource.c:1551 #, c-format msgid "Error creating output format %s: %s" msgstr "创建输出格式错误 %s:%s" #: tools/crm_resource.c:1572 msgid "--expired requires --clear or -U" msgstr "--expired需要和--clear或-U一起使用" #: tools/crm_resource.c:1589 #, c-format msgid "Error parsing '%s' as a name=value pair" msgstr "'%s'解析错误,格式为name=value" #: tools/crm_resource.c:1688 msgid "Must supply a resource id with -r" msgstr "必须使用-r指定资源id" #: tools/crm_resource.c:1694 msgid "Must supply a node name with -N" msgstr "必须使用-N指定节点名称" #: tools/crm_resource.c:1708 msgid "Could not create CIB connection" msgstr "无法创建到CIB的连接" #: tools/crm_resource.c:1716 #, c-format msgid "Could not connect to the CIB: %s" msgstr "不能连接到CIB:%s" #: tools/crm_resource.c:1739 #, c-format msgid "Resource '%s' not found" msgstr "没有发现'%s'资源" #: tools/crm_resource.c:1751 #, c-format msgid "Cannot operate on clone resource instance '%s'" msgstr "不能操作克隆资源实例'%s'" #: tools/crm_resource.c:1763 #, c-format msgid "Node '%s' not found" msgstr "没有发现%s节点" #: tools/crm_resource.c:1774 #, c-format msgid "Error connecting to the controller: %s" msgstr "连接到控制器错误:%s" #: tools/crm_resource.c:1783 #, fuzzy, c-format msgid "Error connecting to %s: %s" msgstr "连接到控制器错误:%s" #: tools/crm_resource.c:2052 msgid "You need to supply a value with the -v option" msgstr "需要使用-v选项提供一个值" #: tools/crm_resource.c:2106 msgid "You need to specify a resource type with -t" msgstr "需要使用-t指定资源类型" #: tools/crm_resource.c:2113 #, fuzzy, c-format msgid "Could not delete resource %s: %s" msgstr "无法删除资源:%s:%s" #: tools/crm_resource.c:2123 #, c-format msgid "Unimplemented command: %d" msgstr "无效的命令:%d" #: tools/crm_resource.c:2153 #, c-format msgid "Error performing operation: %s" msgstr "执行操作错误:%s" #, fuzzy #~ msgid "For example, \"node1,node2,node3\"." #~ msgstr "例如, \"node1,node2,node3\"." #, fuzzy #~ msgid "*** Advanced Use Only ***" #~ msgstr "*** Advanced Use Only(仅限高级用户使用) ***" #, fuzzy #~ msgid "" #~ "Zero disables polling, while positive values are an interval in seconds " #~ "(unless other units are specified, for example \"5min\")" #~ msgstr "" #~ "0 表示禁用轮询,而正值表示以秒为单位的时间间隔(除非指定了其他单位, 例如 " #~ "\"5min\" 表示5分钟)" #~ msgid " Allowed values: " #~ msgstr " 允许的值: " #~ msgid "" #~ "This value is not used by Pacemaker, but is kept for backward " #~ "compatibility, and certain legacy fence agents might use it." #~ msgstr "" #~ "Pacemaker不使用此值,但保留此值是为了向后兼容,某些传统的fence 代理可能会" #~ "使用它。" #~ msgid "No agents found for standard '%s'" #~ msgstr "没有发现指定的'%s'标准代理" #, fuzzy #~ msgid "No agents found for standard '%s' and provider '%s'" #~ msgstr "没有发现指定的标准%s和提供者%S的资源代理" #~ msgid "No %s found for %s" #~ msgstr "没有发现%s符合%s" #~ msgid "No %s found" #~ msgstr "没有发现%s" #~ msgid "" #~ "If nonzero, along with `have-watchdog=true` automatically set by the " #~ "cluster, when fencing is required, watchdog-based self-fencing will be " #~ "performed via SBD without requiring a fencing resource explicitly " #~ "configured. If `stonith-watchdog-timeout` is set to a positive value, " #~ "unseen nodes are assumed to self-fence within this much time. +WARNING:+ " #~ "It must be ensured that this value is larger than the " #~ "`SBD_WATCHDOG_TIMEOUT` environment variable on all nodes. Pacemaker " #~ "verifies the settings individually on all nodes and prevents startup or " #~ "shuts down if configured wrongly on the fly. It's strongly recommended " #~ "that `SBD_WATCHDOG_TIMEOUT` is set to the same value on all nodes. If " #~ "`stonith-watchdog-timeout` is set to a negative value, and " #~ "`SBD_WATCHDOG_TIMEOUT` is set, twice that value will be used. +WARNING:+ " #~ "In this case, it's essential (currently not verified by Pacemaker) that " #~ "`SBD_WATCHDOG_TIMEOUT` is set to the same value on all nodes." #~ msgstr "" #~ "如果值非零,且集群设置了 `have-watchdog=true` ,当需要 fence 操作时,基于 " #~ "watchdog 的自我 fence 机制将通过SBD执行,而不需要显式配置 fence 资源。如" #~ "果 `stonith-watchdog-timeout` 被设为正值,则假定不可见的节点在这段时间内自" #~ "我fence。 +WARNING:+ 必须确保该值大于所有节点上的`SBD_WATCHDOG_TIMEOUT` 环" #~ "境变量。Pacemaker将在所有节点上单独验证设置,如发现有错误的动态配置,将防" #~ "止节点启动或关闭。强烈建议在所有节点上将 `SBD_WATCHDOG_TIMEOUT` 设置为相同" #~ "的值。如果 `stonith-watchdog-timeout` 设置为负值。并且设置了 " #~ "`SBD_WATCHDOG_TIMEOUT` ,则将使用该值的两倍, +WARNING:+ 在这种情况下,必" #~ "须将所有节点上 `SBD_WATCHDOG_TIMEOUT` 设置为相同的值(目前没有通过pacemaker" #~ "验证)。"