pacemaker
2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <crm/cib/internal.h>
#include <crm/common/output.h>
#include <crm/common/results.h>
#include <crm/pengine/pe_types.h>
#include <pacemaker-internal.h>
#include <pacemaker.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "libpacemaker_private.h"
Go to the source code of this file.
Macros | |
#define | STATUS_PATH_MAX 512 |
Functions | |
void | pcmk__profile_dir (const char *dir, long long repeat, pe_working_set_t *data_set, char *use_date) |
enum transition_status | pcmk__simulate_transition (pe_working_set_t *data_set, cib_t *cib, GList *op_fail_list) |
int | pcmk__simulate (pe_working_set_t *data_set, pcmk__output_t *out, pcmk_injections_t *injections, unsigned int flags, uint32_t section_opts, char *use_date, char *input_file, char *graph_file, char *dot_file) |
int | pcmk_simulate (xmlNodePtr *xml, pe_working_set_t *data_set, pcmk_injections_t *injections, unsigned int flags, unsigned int section_opts, char *use_date, char *input_file, char *graph_file, char *dot_file) |
Simulate a cluster's response to events. More... | |
#define STATUS_PATH_MAX 512 |
Definition at line 25 of file pcmk_simulate.c.
void pcmk__profile_dir | ( | const char * | dir, |
long long | repeat, | ||
pe_working_set_t * | data_set, | ||
char * | use_date | ||
) |
Definition at line 375 of file pcmk_simulate.c.
int pcmk__simulate | ( | pe_working_set_t * | data_set, |
pcmk__output_t * | out, | ||
pcmk_injections_t * | injections, | ||
unsigned int | flags, | ||
uint32_t | section_opts, | ||
char * | use_date, | ||
char * | input_file, | ||
char * | graph_file, | ||
char * | dot_file | ||
) |
Definition at line 777 of file pcmk_simulate.c.
enum transition_status pcmk__simulate_transition | ( | pe_working_set_t * | data_set, |
cib_t * | cib, | ||
GList * | op_fail_list | ||
) |
Definition at line 722 of file pcmk_simulate.c.
int pcmk_simulate | ( | xmlNodePtr * | xml, |
pe_working_set_t * | data_set, | ||
pcmk_injections_t * | injections, | ||
unsigned int | flags, | ||
unsigned int | section_opts, | ||
char * | use_date, | ||
char * | input_file, | ||
char * | graph_file, | ||
char * | dot_file | ||
) |
Simulate a cluster's response to events.
This high-level function essentially implements crm_simulate(8). It operates on an input CIB file and various lists of events that can be simulated. It optionally writes out a variety of artifacts to show the results of the simulation. Output can be modified with various flags.
[in,out] | xml | The destination for the result, as an XML tree. |
[in,out] | data_set | Working set for the cluster. |
[in] | events | A structure containing cluster events (node up/down, tickets, injected operations) |
[in] | flags | A bitfield of :pcmk_sim_flags to modify operation of the simulation. |
[in] | section_opts | Which portions of the cluster status output should be displayed? |
[in] | use_date | The date to set the cluster's time to (may be NULL). |
[in] | input_file | The source CIB file, which may be overwritten by this function (may be NULL). |
[in] | graph_file | Where to write the XML-formatted transition graph (may be NULL, in which case no file will be written). |
[in] | dot_file | Where to write the dot(1) formatted transition graph (may be NULL, in which case no file will be written). See pcmk__write_sim_dotfile() . |
Definition at line 961 of file pcmk_simulate.c.