pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
Macros | Functions | Variables
election.c File Reference
#include <crm_internal.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <crm/crm.h>
#include <crm/common/mainloop.h>
#include <crm/common/xml.h>
#include <crm/cluster/internal.h>
#include <crm/cluster/election_internal.h>
#include "crmcluster_private.h"
Include dependency graph for election.c:

Go to the source code of this file.

Macros

#define STORM_INTERVAL   2 /* in seconds */
 
#define ELECTION_TIMEOUT_MS   120000
 
#define LOSS_DAMPEN   2 /* in seconds */
 

Functions

enum election_result election_state (const pcmk_cluster_t *cluster)
 
void election_init (pcmk_cluster_t *cluster, void(*cb)(pcmk_cluster_t *))
 
void election_remove (pcmk_cluster_t *cluster, const char *uname)
 
void election_reset (pcmk_cluster_t *cluster)
 
void election_fini (pcmk_cluster_t *cluster)
 
void election_timeout_stop (pcmk_cluster_t *cluster)
 
void election_timeout_set_period (pcmk_cluster_t *cluster, guint period)
 
void election_vote (pcmk_cluster_t *cluster)
 
bool election_check (pcmk_cluster_t *cluster)
 
enum election_result election_count_vote (pcmk_cluster_t *cluster, const xmlNode *message, bool can_win)
 
void election_clear_dampening (pcmk_cluster_t *cluster)
 

Variables

struct pcmk__election __attribute__
 

Macro Definition Documentation

◆ ELECTION_TIMEOUT_MS

#define ELECTION_TIMEOUT_MS   120000

Definition at line 79 of file election.c.

◆ LOSS_DAMPEN

#define LOSS_DAMPEN   2 /* in seconds */

Definition at line 399 of file election.c.

◆ STORM_INTERVAL

#define STORM_INTERVAL   2 /* in seconds */

Definition at line 23 of file election.c.

Function Documentation

◆ election_check()

bool election_check ( pcmk_cluster_t cluster)

Definition at line 343 of file election.c.

◆ election_clear_dampening()

void election_clear_dampening ( pcmk_cluster_t cluster)

Definition at line 733 of file election.c.

◆ election_count_vote()

enum election_result election_count_vote ( pcmk_cluster_t cluster,
const xmlNode *  message,
bool  can_win 
)

Definition at line 523 of file election.c.

◆ election_fini()

void election_fini ( pcmk_cluster_t cluster)

Definition at line 156 of file election.c.

◆ election_init()

void election_init ( pcmk_cluster_t cluster,
void(*)(pcmk_cluster_t *)  cb 
)

Definition at line 92 of file election.c.

◆ election_remove()

void election_remove ( pcmk_cluster_t cluster,
const char *  uname 
)

Definition at line 118 of file election.c.

◆ election_reset()

void election_reset ( pcmk_cluster_t cluster)

Definition at line 134 of file election.c.

◆ election_state()

enum election_result election_state ( const pcmk_cluster_t cluster)

Definition at line 67 of file election.c.

◆ election_timeout_set_period()

void election_timeout_set_period ( pcmk_cluster_t cluster,
guint  period 
)

Definition at line 195 of file election.c.

◆ election_timeout_stop()

void election_timeout_stop ( pcmk_cluster_t cluster)

Definition at line 180 of file election.c.

◆ election_vote()

void election_vote ( pcmk_cluster_t cluster)

Definition at line 278 of file election.c.

Variable Documentation

◆ __attribute__

struct pcmk__cpg_msg_s __attribute__