diff --git a/lib/crm/pengine/Makefile.am b/lib/crm/pengine/Makefile.am index 21a79e4d00..9e721b9d97 100644 --- a/lib/crm/pengine/Makefile.am +++ b/lib/crm/pengine/Makefile.am @@ -1,69 +1,69 @@ # # Copyright (C) 2004 Andrew Beekhof # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # MAINTAINERCLEANFILES = Makefile.in INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \ -I$(top_builddir)/linux-ha -I$(top_srcdir)/linux-ha \ -I$(top_builddir) -I$(top_srcdir) hadir = $(sysconfdir)/ha.d halibdir = $(libdir)/@HB_PKG@ commmoddir = $(halibdir)/modules/comm havarlibdir = $(localstatedir)/lib/@HB_PKG@ pe_varlibdir = $(HA_VARLIBDIR)/$(HB_PKG)/pengine # sockets with path crmdir = $(havarlibdir)/crm apigid = @HA_APIGID@ crmuid = @HA_CCMUID@ COMMONLIBS = $(CRM_DEBUG_LIBS) \ $(top_builddir)/lib/clplumbing/libplumb.la \ $(top_builddir)/lib/crm/common/libcrmcommon.la \ $(GLIBLIB) \ $(CURSESLIBS) \ $(LIBRT) LIBRT = @LIBRT@ AM_CFLAGS = @CFLAGS@ $(CRM_DEBUG_FLAGS) ## libraries lib_LTLIBRARIES = libpe_rules.la libpe_status.la ## SOURCES -noinst_HEADERS = unpack.h utils.h pengine.h +noinst_HEADERS = unpack.h utils.h rule_files = rules.c common.c status_files = status.c unpack.c utils.c complex.c native.c group.c clone.c libpe_rules_la_LDFLAGS = -version-info 1:0:0 libpe_rules_la_SOURCES = $(rule_files) libpe_status_la_LDFLAGS = -version-info 1:0:0 libpe_status_la_SOURCES = $(rule_files) $(status_files) clean-generic: rm -f *.log *.debug *~ install-exec-local: uninstall-local: diff --git a/lib/crm/pengine/pengine.h b/lib/crm/pengine/pengine.h deleted file mode 100644 index 119b2f5166..0000000000 --- a/lib/crm/pengine/pengine.h +++ /dev/null @@ -1,227 +0,0 @@ -/* $Id: pengine.h,v 1.1 2006/06/07 12:46:56 andrew Exp $ */ -/* - * Copyright (C) 2004 Andrew Beekhof - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef PENGINE__H -#define PENGINE__H - -#include - -typedef struct rsc_to_node_s rsc_to_node_t; -typedef struct rsc_colocation_s rsc_colocation_t; -typedef struct lrm_agent_s lrm_agent_t; -typedef struct order_constraint_s order_constraint_t; -typedef struct action_s action_t; -typedef struct action_wrapper_s action_wrapper_t; - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -enum con_strength { - pecs_ignore, - pecs_must, - pecs_must_not, - pecs_startstop -}; - - -enum pe_stop_fail { - pesf_block, - pesf_stonith, - pesf_ignore -}; - -enum pe_ordering { - pe_ordering_manditory, - pe_ordering_restart, - pe_ordering_recover, - pe_ordering_postnotify, - pe_ordering_optional -}; - -struct rsc_colocation_s { - const char *id; - resource_t *rsc_lh; - resource_t *rsc_rh; - - const char *state_lh; - const char *state_rh; - - enum con_strength strength; -}; - -struct rsc_to_node_s { - const char *id; - resource_t *rsc_lh; - - enum rsc_role_e role_filter; - GListPtr node_list_rh; /* node_t* */ -}; - - -struct action_wrapper_s -{ - enum pe_ordering type; - action_t *action; -}; - - -struct action_s -{ - int id; - int priority; - resource_t *rsc; - void *rsc_opaque; - node_t *node; - const char *task; - - char *uuid; - crm_data_t *op_entry; - - gboolean pseudo; - gboolean runnable; - gboolean optional; - gboolean failure_is_fatal; - - enum rsc_start_requirement needs; - enum action_fail_response on_fail; - enum rsc_role_e fail_role; - - gboolean dumped; - gboolean processed; - - action_t *pre_notify; - action_t *pre_notified; - action_t *post_notify; - action_t *post_notified; - - int seen_count; - - GHashTable *meta; - GHashTable *extra; - GHashTable *notify_keys; /* do NOT free */ - - GListPtr actions_before; /* action_warpper_t* */ - GListPtr actions_after; /* action_warpper_t* */ -}; - -struct order_constraint_s -{ - int id; - enum pe_ordering type; - - void *lh_opaque; - resource_t *lh_rsc; - action_t *lh_action; - char *lh_action_task; - - void *rh_opaque; - resource_t *rh_rsc; - action_t *rh_action; - char *rh_action_task; - - /* (soon to be) variant specific */ -/* int lh_rsc_incarnation; */ -/* int rh_rsc_incarnation; */ -}; - -extern gboolean stage0(pe_working_set_t *data_set); -extern gboolean stage1(pe_working_set_t *data_set); -extern gboolean stage2(pe_working_set_t *data_set); -extern gboolean stage3(pe_working_set_t *data_set); -extern gboolean stage4(pe_working_set_t *data_set); -extern gboolean stage5(pe_working_set_t *data_set); -extern gboolean stage6(pe_working_set_t *data_set); -extern gboolean stage7(pe_working_set_t *data_set); -extern gboolean stage8(pe_working_set_t *data_set); - -extern gboolean summary(GListPtr resources); - -extern gboolean pe_msg_dispatch(IPC_Channel *sender, void *user_data); - -extern gboolean process_pe_message( - HA_Message *msg, crm_data_t *xml_data, IPC_Channel *sender); - -extern gboolean unpack_constraints( - crm_data_t *xml_constraints, pe_working_set_t *data_set); - -extern gboolean unpack_resources( - crm_data_t *xml_resources, pe_working_set_t *data_set); - -extern gboolean unpack_config(crm_data_t *config, pe_working_set_t *data_set); - -extern gboolean unpack_nodes(crm_data_t *xml_nodes, pe_working_set_t *data_set); - -extern gboolean unpack_status(crm_data_t *status, pe_working_set_t *data_set); - -extern gboolean apply_placement_constraints(pe_working_set_t *data_set); - -extern gboolean update_action_states(GListPtr actions); - -extern gboolean shutdown_constraints( - node_t *node, action_t *shutdown_op, pe_working_set_t *data_set); - -extern gboolean stonith_constraints( - node_t *node, action_t *stonith_op, pe_working_set_t *data_set); - -extern gboolean custom_action_order( - resource_t *lh_rsc, char *lh_task, action_t *lh_action, - resource_t *rh_rsc, char *rh_task, action_t *rh_action, - enum pe_ordering type, pe_working_set_t *data_set); - -#define order_start_start(rsc1,rsc2, type) \ - custom_action_order(rsc1, start_key(rsc1), NULL, \ - rsc2, start_key(rsc2) ,NULL, \ - type, data_set) -#define order_stop_stop(rsc1, rsc2, type) \ - custom_action_order(rsc1, stop_key(rsc1), NULL, \ - rsc2, stop_key(rsc2) ,NULL, \ - type, data_set) - -#define order_restart(rsc1) \ - custom_action_order(rsc1, stop_key(rsc1), NULL, \ - rsc1, start_key(rsc1), NULL, \ - pe_ordering_restart, data_set) - -#define order_stop_start(rsc1, rsc2, type) \ - custom_action_order(rsc1, stop_key(rsc1), NULL, \ - rsc2, start_key(rsc2) ,NULL, \ - type, data_set) - -#define order_start_stop(rsc1, rsc2, type) \ - custom_action_order(rsc1, start_key(rsc1), NULL, \ - rsc2, stop_key(rsc2) ,NULL, \ - type, data_set) - -extern gboolean process_colored_constraints(resource_t *rsc); -extern void graph_element_from_action( - action_t *action, pe_working_set_t *data_set); -extern void order_actions(action_t *lh_action, action_t *rh_action, enum pe_ordering order); - -extern const char* transition_idle_timeout; - -#endif -