1OCF_HEARTBEAT_REDIS(7) OCF resource agents OCF_HEARTBEAT_REDIS(7)
2
3
4
6 ocf_heartbeat_redis - Redis server
7
9 redis [start | stop | status | monitor | promote | demote | meta-data |
10 validate-all]
11
13 Resource agent script for redis server.
14
15 This resource fully supports master/slave replication. The master
16 preference of a node is determined by the 'slave_priority' parameter of
17 the redis config. When taking the resource from 'unmanaged' to
18 'managed', the currently active master will be given a priority of 1000
19 (plus 1 for each active connection). The default 'slave_priority' is
20 100, so the master will stay master. For a slave to become master after
21 converting the resource to managed, set a slave_priority greater than
22 1000.
23
25 bin
26 Path to `redis-server`
27
28 (optional, string, default "/usr/bin/redis-server")
29
30 client_bin
31 Path to `redis-cli`
32
33 (optional, string, default "/usr/bin/redis-cli")
34
35 config
36 Path to 'redis.conf'
37
38 (unique, optional, string, default "/etc/redis/redis.conf")
39
40 user
41 User to run redis as
42
43 (optional, string, default "redis")
44
45 rundir
46 Directory to store socket and pid file in
47
48 (unique, optional, string, default "/var/run/redis")
49
50 pidfile_name
51 The filename to use for the pidfile. Will be created in the rundir.
52 Should only be a basename, not a full path.
53
54 (optional, string, default "redis-server.pid")
55
56 socket_name
57 The filename to use for the socket. Will be crated in the rundir.
58 Should only be a basename, not a full path.
59
60 (optional, string, default "redis.sock")
61
62 port
63 Port for replication client to connect to on remote server
64
65 (optional, string, default "6379")
66
67 tunnel_host
68 When replication traffic is tunnelled, this is the host to target
69 to forward outgoing traffic to the redis master. The resource agent
70 configures the redis slave to target the master via
71 tunnel_host:tunnel_port.
72
73 Note that in order to enable replication traffic tunneling,
74 parameter {tunnel_port_map} must be populated.
75
76 (optional, string, default "127.0.0.1")
77
78 tunnel_port_map
79 A mapping of pacemaker node names to redis port number.
80
81 To be used when redis servers need to tunnel replication traffic.
82 On every node where the redis resource is running, the redis server
83 listens to a different port. Each redis server can access its peers
84 for replication traffic via a tunnel accessible at
85 {tunnel_host}:port.
86
87 The mapping the form of:
88 pcmk1-name:port-for-redis1;pcmk2-name:port-for-redis2;pcmk3-name:port-for-redis3
89
90 where the redis resource started on node pcmk1-name would listen on
91 port port-for-redis1
92
93 (optional, string, no default)
94
95 wait_last_known_master
96 During redis cluster bootstrap, wait for the last known master to
97 be promoted before allowing any other instances in the cluster to
98 be promoted. This lessens the risk of data loss when persistent
99 data is in use.
100
101 (optional, boolean, default false)
102
104 This resource agent supports the following actions (operations):
105
106 start
107 Starts the resource. Suggested minimum timeout: 120s.
108
109 stop
110 Stops the resource. Suggested minimum timeout: 120s.
111
112 status
113 Performs a status check. Suggested minimum timeout: 60s.
114
115 monitor
116 Performs a detailed status check. Suggested minimum timeout: 60s.
117 Suggested interval: 45s.
118
119 monitor (Master role)
120 Performs a detailed status check. Suggested minimum timeout: 60s.
121 Suggested interval: 20s.
122
123 monitor (Slave role)
124 Performs a detailed status check. Suggested minimum timeout: 60s.
125 Suggested interval: 60s.
126
127 promote
128 Promotes the resource to the Master role. Suggested minimum
129 timeout: 120s.
130
131 demote
132 Demotes the resource to the Slave role. Suggested minimum timeout:
133 120s.
134
135 notify
136 Suggested minimum timeout: 90s.
137
138 validate-all
139 Performs a validation of the resource configuration. Suggested
140 minimum timeout: 5s.
141
142 meta-data
143 Retrieves resource agent metadata (internal use only). Suggested
144 minimum timeout: 5s.
145
147 The following is an example configuration for a redis resource using
148 the crm(8) shell:
149
150 primitive p_redis ocf:heartbeat:redis \
151 op monitor depth="0" timeout="60s" interval="45s" \
152 op monitor role="Master" depth="0" timeout="60s" interval="20s" \
153 op monitor role="Slave" depth="0" timeout="60s" interval="60s"
154
155 ms ms_redis p_redis \
156 meta notify="true" interleave="true"
157
159 The following is an example configuration for a redis resource using
160 pcs(8)
161
162 pcs resource create p_redis ocf:heartbeat:redis \
163 op monitor depth="0" timeout="60s" interval="45s" \
164 op monitor role="Master" depth="0" timeout="60s" interval="20s" \
165 op monitor role="Slave" depth="0" timeout="60s" interval="60s" --master
166
168 http://clusterlabs.org/
169
171 ClusterLabs contributors (see the resource agent source for information
172 about individual authors)
173
174
175
176resource-agents UNKNOWN 10/23/2019 OCF_HEARTBEAT_REDIS(7)