'\" t .\" Title: ocf_heartbeat_redis .\" Author: ClusterLabs contributors (see the resource agent source for information about individual authors) .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 06/07/2017 .\" Manual: OCF resource agents .\" Source: resource-agents 4.0.0~rc1-4~bpo8+1 .\" Language: English .\" .TH "OCF_HEARTBEAT_REDIS" "7" "06/07/2017" "resource-agents 4.0.0~rc1-4~bp" "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 \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: 120\&. .RE .PP \fBstop\fR .RS 4 Stops the resource\&. Suggested minimum timeout: 120\&. .RE .PP \fBstatus\fR .RS 4 Performs a status check\&. Suggested minimum timeout: 60\&. .RE .PP \fBmonitor\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60\&. Suggested interval: 45\&. .RE .PP \fBmonitor (Master role)\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60\&. Suggested interval: 20\&. .RE .PP \fBmonitor (Slave role)\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60\&. Suggested interval: 60\&. .RE .PP \fBpromote\fR .RS 4 Promotes the resource to the Master role\&. Suggested minimum timeout: 120\&. .RE .PP \fBdemote\fR .RS 4 Demotes the resource to the Slave role\&. Suggested minimum timeout: 120\&. .RE .PP \fBnotify\fR .RS 4 Suggested minimum timeout: 90\&. .RE .PP \fBvalidate\-all\fR .RS 4 Performs a validation of the resource configuration\&. Suggested minimum timeout: 5\&. .RE .PP \fBmeta\-data\fR .RS 4 Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5\&. .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="60" interval="45" \e op monitor role="Master" depth="0" timeout="60" interval="20" \e op monitor role="Slave" depth="0" timeout="60" interval="60" .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 depth="0" timeout="60" interval="45" \e op monitor role="Master" depth="0" timeout="60" interval="20" \e op monitor role="Slave" depth="0" timeout="60" interval="60" \-\-master .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