'\" t .\" Title: ocf_heartbeat_redis .\" Author: ClusterLabs contributors (see the resource agent source for information about individual authors) .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 12/17/2020 .\" Manual: OCF resource agents .\" Source: resource-agents UNKNOWN .\" Language: English .\" .TH "OCF_HEARTBEAT_REDIS" "7" "12/17/2020" "resource-agents UNKNOWN" "OCF resource agents" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ocf_heartbeat_redis \- Redis server .SH "SYNOPSIS" .HP \w'\fBredis\fR\ 'u \fBredis\fR [start | stop | status | monitor | promote | demote | meta\-data | validate\-all] .SH "DESCRIPTION" .PP Resource agent script for redis server\&. .PP This resource fully supports master/slave replication\&. The master preference of a node is determined by the \*(Aqslave_priority\*(Aq parameter of the redis config\&. When taking the resource from \*(Aqunmanaged\*(Aq to \*(Aqmanaged\*(Aq, the currently active master will be given a priority of 1000 (plus 1 for each active connection)\&. The default \*(Aqslave_priority\*(Aq is 100, so the master will stay master\&. For a slave to become master after converting the resource to managed, set a slave_priority greater than 1000\&. .SH "SUPPORTED PARAMETERS" .PP \fBbin\fR .RS 4 Path to `redis\-server` .sp (optional, string, default "/usr/bin/redis\-server") .RE .PP \fBclient_bin\fR .RS 4 Path to `redis\-cli` .sp (optional, string, default "/usr/bin/redis\-cli") .RE .PP \fBconfig\fR .RS 4 Path to \*(Aqredis\&.conf\*(Aq .sp (unique, optional, string, default "/etc/redis/redis\&.conf") .RE .PP \fBuser\fR .RS 4 User to run redis as .sp (optional, string, default "redis") .RE .PP \fBrundir\fR .RS 4 Directory to store socket and pid file in .sp (unique, optional, string, default "/var/run/redis") .RE .PP \fBpidfile_name\fR .RS 4 The filename to use for the pidfile\&. Will be created in the rundir\&. Should only be a basename, not a full path\&. .sp (optional, string, default "redis\-server\&.pid") .RE .PP \fBsocket_name\fR .RS 4 The filename to use for the socket\&. Will be crated in the rundir\&. Should only be a basename, not a full path\&. .sp (optional, string, default "redis\&.sock") .RE .PP \fBport\fR .RS 4 Port for replication client to connect to on remote server .sp (optional, string, default "6379") .RE .PP \fBtunnel_host\fR .RS 4 When replication traffic is tunnelled, this is the host to target to forward outgoing traffic to the redis master\&. The resource agent configures the redis slave to target the master via tunnel_host:tunnel_port\&. .sp Note that in order to enable replication traffic tunneling, parameter {tunnel_port_map} must be populated\&. .sp (optional, string, default "127\&.0\&.0\&.1") .RE .PP \fBtunnel_port_map\fR .RS 4 A mapping of pacemaker node names to redis port number\&. .sp To be used when redis servers need to tunnel replication traffic\&. On every node where the redis resource is running, the redis server listens to a different port\&. Each redis server can access its peers for replication traffic via a tunnel accessible at {tunnel_host}:port\&. .sp The mapping the form of: pcmk1\-name:port\-for\-redis1;pcmk2\-name:port\-for\-redis2;pcmk3\-name:port\-for\-redis3 .sp where the redis resource started on node pcmk1\-name would listen on port port\-for\-redis1 .sp (optional, string, no default) .RE .PP \fBwait_last_known_master\fR .RS 4 During redis cluster bootstrap, wait for the last known master to be promoted before allowing any other instances in the cluster to be promoted\&. This lessens the risk of data loss when persistent data is in use\&. .sp (optional, boolean, default false) .RE .SH "SUPPORTED ACTIONS" .PP This resource agent supports the following actions (operations): .PP \fBstart\fR .RS 4 Starts the resource\&. Suggested minimum timeout: 120s\&. .RE .PP \fBstop\fR .RS 4 Stops the resource\&. Suggested minimum timeout: 120s\&. .RE .PP \fBstatus\fR .RS 4 Performs a status check\&. Suggested minimum timeout: 60s\&. .RE .PP \fBmonitor\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60s\&. Suggested interval: 45s\&. .RE .PP \fBmonitor (Master role)\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60s\&. Suggested interval: 20s\&. .RE .PP \fBmonitor (Slave role)\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60s\&. Suggested interval: 60s\&. .RE .PP \fBpromote\fR .RS 4 Promotes the resource to the Master role\&. Suggested minimum timeout: 120s\&. .RE .PP \fBdemote\fR .RS 4 Demotes the resource to the Slave role\&. Suggested minimum timeout: 120s\&. .RE .PP \fBnotify\fR .RS 4 Suggested minimum timeout: 90s\&. .RE .PP \fBvalidate\-all\fR .RS 4 Performs a validation of the resource configuration\&. Suggested minimum timeout: 5s\&. .RE .PP \fBmeta\-data\fR .RS 4 Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5s\&. .RE .SH "EXAMPLE CRM SHELL" .PP The following is an example configuration for a redis resource using the \fBcrm\fR(8) shell: .sp .if n \{\ .RS 4 .\} .nf primitive p_redis ocf:heartbeat:redis \e op monitor depth="0" timeout="60s" interval="45s" \e op monitor role="Master" depth="0" timeout="60s" interval="20s" \e op monitor role="Slave" depth="0" timeout="60s" interval="60s" .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf ms ms_redis p_redis \e meta notify="true" interleave="true" .fi .if n \{\ .RE .\} .SH "EXAMPLE PCS" .PP The following is an example configuration for a redis resource using \fBpcs\fR(8) .sp .if n \{\ .RS 4 .\} .nf pcs resource create p_redis ocf:heartbeat:redis \e op monitor OCF_CHECK_LEVEL="0" timeout="60s" interval="45s" \e op monitor role="Master" OCF_CHECK_LEVEL="0" timeout="60s" interval="20s" \e op monitor role="Slave" OCF_CHECK_LEVEL="0" timeout="60s" interval="60s" promotable .fi .if n \{\ .RE .\} .SH "SEE ALSO" .PP \m[blue]\fB\%http://clusterlabs.org/\fR\m[] .SH "AUTHOR" .PP \fBClusterLabs contributors (see the resource agent source for information about individual authors)\fR