summaryrefslogtreecommitdiffstats
path: root/test/features/steps/const.py
blob: 3ec88458b5991ec4debdee4475d6f60b8e5cdfc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
CRM_H_OUTPUT = '''usage: crm [-h|--help] [OPTIONS] [SUBCOMMAND ARGS...]
or crm help SUBCOMMAND

For a list of available subcommands, use crm help.

Use crm without arguments for an interactive session.
Call a subcommand directly for a "single-shot" use.
Call crm with a level name as argument to start an interactive
session from that level.

See the crm(8) man page or call crm help for more details.

positional arguments:
  SUBCOMMAND

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -f FILE, --file FILE  Load commands from the given file. If a dash (-) is
                        used in place of a file name, crm will read commands
                        from the shell standard input (stdin).
  -c CIB, --cib CIB     Start the session using the given shadow CIB file.
                        Equivalent to `cib use <CIB>`.
  -D OUTPUT_TYPE, --display OUTPUT_TYPE
                        Choose one of the output options: plain, color-always,
                        color, or uppercase. The default is color if the
                        terminal emulation supports colors, else plain.
  -F, --force           Make crm proceed with applying changes where it would
                        normally ask the user to confirm before proceeding.
                        This option is mainly useful in scripts, and should be
                        used with care.
  -n, --no              Automatically answer no when prompted
  -w, --wait            Make crm wait for the cluster transition to finish
                        (for the changes to take effect) after each processed
                        line.
  -H DIR|FILE|SESSION, --history DIR|FILE|SESSION
                        A directory or file containing a cluster report to
                        load into history, or the name of a previously saved
                        history session.
  -d, --debug           Print verbose debugging information.
  -R, --regression-tests
                        Enables extra verbose trace logging used by the
                        regression tests. Logs all external calls made by
                        crmsh.
  --scriptdir DIR       Extra directory where crm looks for cluster scripts,
                        or a list of directories separated by semi-colons
                        (e.g. /dir1;/dir2;etc.).
  -X PROFILE            Collect profiling data and save in PROFILE.
  -o OPTION=VALUE, --opt OPTION=VALUE
                        Set crmsh option temporarily. If the options are saved
                        using+options save+ then the value passed here will
                        also be saved.Multiple options can be set by using
                        +-o+ multiple times.'''


CRM_CLUSTER_INIT_H_OUTPUT = '''Initializes a new HA cluster

usage: init [options] [STAGE]

Initialize a cluster from scratch. This command configures
a complete cluster, and can also add additional cluster
nodes to the initial one-node cluster using the --nodes
option.

optional arguments:
  -h, --help            Show this help message
  -q, --quiet           Be quiet (don't describe what's happening, just do it)
  -y, --yes             Answer "yes" to all prompts (use with caution, this is
                        destructive, especially those storage related
                        configurations and stages.)
  -n NAME, --name NAME  Set the name of the configured cluster.
  -N [USER@]HOST, --node [USER@]HOST
                        The member node of the cluster. Note: the current node
                        is always get initialized during bootstrap in the
                        beginning.
  -S, --enable-sbd      Enable SBD even if no SBD device is configured
                        (diskless mode)
  -w WATCHDOG, --watchdog WATCHDOG
                        Use the given watchdog device or driver name
  -x, --skip-csync2-sync
                        Skip csync2 initialization (an experimental option)
  --no-overwrite-sshkey
                        Avoid "/root/.ssh/id_rsa" overwrite if "-y" option is
                        used (False by default; Deprecated)
  --use-ssh-agent       Use an existing key from ssh-agent instead of creating
                        new key pairs

Network configuration:
  Options for configuring the network and messaging layer.

  -i IF, --interface IF
                        Bind to IP address on interface IF. Use -i second time
                        for second interface
  -u, --unicast         Configure corosync to communicate over unicast(udpu).
                        This is the default transport type
  -U, --multicast       Configure corosync to communicate over multicast.
                        Default is unicast
  -A IP, --admin-ip IP  Configure IP address as an administration virtual IP
  -M, --multi-heartbeats
                        Configure corosync with second heartbeat line
  -I, --ipv6            Configure corosync use IPv6

QDevice configuration:
  QDevice participates in quorum decisions. With the assistance of 
  a third-party arbitrator Qnetd, it provides votes so that a cluster 
  is able to sustain more node failures than standard quorum rules 
  allow. It is recommended for clusters with an even number of nodes 
  and highly recommended for 2 node clusters.
  
  Options for configuring QDevice and QNetd.

  --qnetd-hostname [USER@]HOST
                        User and host of the QNetd server. The host can be
                        specified in either hostname or IP address.
  --qdevice-port PORT   TCP PORT of QNetd server (default:5403)
  --qdevice-algo ALGORITHM
                        QNetd decision ALGORITHM (ffsplit/lms,
                        default:ffsplit)
  --qdevice-tie-breaker TIE_BREAKER
                        QNetd TIE_BREAKER (lowest/highest/valid_node_id,
                        default:lowest)
  --qdevice-tls TLS     Whether using TLS on QDevice/QNetd (on/off/required,
                        default:on)
  --qdevice-heuristics COMMAND
                        COMMAND to run with absolute path. For multiple
                        commands, use ";" to separate (details about
                        heuristics can see man 8 corosync-qdevice)
  --qdevice-heuristics-mode MODE
                        MODE of operation of heuristics (on/sync/off,
                        default:sync)

Storage configuration:
  Options for configuring shared storage.

  -s DEVICE, --sbd-device DEVICE
                        Block device to use for SBD fencing, use ";" as
                        separator or -s multiple times for multi path (up to 3
                        devices)
  -o DEVICE, --ocfs2-device DEVICE
                        Block device to use for OCFS2; When using Cluster LVM2
                        to manage the shared storage, user can specify one or
                        multiple raw disks, use ";" as separator or -o
                        multiple times for multi path (must specify -C option)
                        NOTE: this is a Technical Preview
  -C, --cluster-lvm2    Use Cluster LVM2 (only valid together with -o option)
                        NOTE: this is a Technical Preview
  -m MOUNT, --mount-point MOUNT
                        Mount point for OCFS2 device (default is
                        /srv/clusterfs, only valid together with -o option)
                        NOTE: this is a Technical Preview

Stage can be one of:
    ssh         Create SSH keys for passwordless SSH between cluster nodes
    csync2      Configure csync2
    corosync    Configure corosync
    sbd         Configure SBD (requires -s <dev>)
    cluster     Bring the cluster online
    ocfs2       Configure OCFS2 (requires -o <dev>) NOTE: this is a Technical Preview
    vgfs        Create volume group and filesystem (ocfs2 template only,
                    requires -o <dev>) NOTE: this stage is an alias of ocfs2 stage
    admin       Create administration virtual IP (optional)
    qdevice     Configure qdevice and qnetd

Note:
  - If stage is not specified, the script will run through each stage
    in sequence, with prompts for required information.

Examples:
  # Setup the cluster on the current node
  crm cluster init -y

  # Setup the cluster with multiple nodes
  (NOTE: the current node will be part of the cluster even not listed in the -N option as below)
  crm cluster init -N node1 -N node2 -N node3 -y

  # Setup the cluster on the current node, with two network interfaces
  crm cluster init -i eth1 -i eth2 -y

  # Setup the cluster on the current node, with disk-based SBD
  crm cluster init -s <share disk> -y

  # Setup the cluster on the current node, with diskless SBD
  crm cluster init -S  -y

  # Setup the cluster on the current node, with QDevice
  crm cluster init --qnetd-hostname <qnetd addr> -y

  # Setup the cluster on the current node, with SBD+OCFS2
  crm cluster init -s <share disk1> -o <share disk2> -y

  # Setup the cluster on the current node, with SBD+OCFS2+Cluster LVM
  crm cluster init -s <share disk1> -o <share disk2> -o <share disk3> -C -y

  # Add SBD on a running cluster
  crm cluster init sbd -s <share disk> -y

  # Replace SBD device on a running cluster which already configured SBD
  crm -F cluster init sbd -s <share disk> -y

  # Add diskless SBD on a running cluster
  crm cluster init sbd -S -y

  # Add QDevice on a running cluster
  crm cluster init qdevice --qnetd-hostname <qnetd addr> -y

  # Add OCFS2+Cluster LVM on a running cluster
  crm cluster init ocfs2 -o <share disk1> -o <share disk2> -C -y'''


CRM_CLUSTER_JOIN_H_OUTPUT = '''Join existing cluster

usage: join [options] [STAGE]

Join the current node to an existing cluster. The
current node cannot be a member of a cluster already.
Pass any node in the existing cluster as the argument
to the -c option.

optional arguments:
  -h, --help            Show this help message
  -q, --quiet           Be quiet (don't describe what's happening, just do it)
  -y, --yes             Answer "yes" to all prompts (use with caution)
  -w WATCHDOG, --watchdog WATCHDOG
                        Use the given watchdog device
  --use-ssh-agent       Use an existing key from ssh-agent instead of creating
                        new key pairs

Network configuration:
  Options for configuring the network and messaging layer.

  -c [USER@]HOST, --cluster-node [USER@]HOST
                        User and host to login to an existing cluster node.
                        The host can be specified with either a hostname or an
                        IP.
  -i IF, --interface IF
                        Bind to IP address on interface IF. Use -i second time
                        for second interface

Stage can be one of:
    ssh         Obtain SSH keys from existing cluster node (requires -c <host>)
    csync2      Configure csync2 (requires -c <host>)
    ssh_merge   Merge root's SSH known_hosts across all nodes (csync2 must
                already be configured).
    cluster     Start the cluster on this node

If stage is not specified, each stage will be invoked in sequence.

Examples:
  # Join with a cluster node
  crm cluster join -c <node> -y

  # Join with a cluster node, with the same network interface used by that node
  crm cluster join -c <node> -i eth1 -i eth2 -y'''


CRM_CLUSTER_REMOVE_H_OUTPUT = '''Remove node(s) from the cluster

usage: remove [options] [<node> ...]

Remove one or more nodes from the cluster.

This command can remove the last node in the cluster,
thus effectively removing the whole cluster. To remove
the last node, pass --force argument to crm or set
the config.core.force option.

optional arguments:
  -h, --help            Show this help message
  -q, --quiet           Be quiet (don't describe what's happening, just do it)
  -y, --yes             Answer "yes" to all prompts (use with caution)
  -c HOST, --cluster-node HOST
                        IP address or hostname of cluster node which will be
                        deleted
  -F, --force           Remove current node
  --qdevice             Remove QDevice configuration and service from cluster'''


CRM_CLUSTER_GEO_INIT_H_OUTPUT = '''Configure cluster as geo cluster

usage: geo-init [options]

Create a new geo cluster with the current cluster as the
first member. Pass the complete geo cluster topology as
arguments to this command, and then use geo-join and
geo-init-arbitrator to add the remaining members to
the geo cluster.

optional arguments:
  -h, --help            Show this help message
  -q, --quiet           Be quiet (don't describe what's happening, just do it)
  -y, --yes             Answer "yes" to all prompts (use with caution)
  -a [USER@]HOST, --arbitrator [USER@]HOST
                        Geo cluster arbitrator
  -s DESC, --clusters DESC
                        Geo cluster description (see details below)
  -t LIST, --tickets LIST
                        Tickets to create (space-separated)

Cluster Description

  This is a map of cluster names to IP addresses.
  Each IP address will be configured as a virtual IP
  representing that cluster in the geo cluster
  configuration.

  Example with two clusters named paris and amsterdam:

  --clusters "paris=192.168.10.10 amsterdam=192.168.10.11"

  Name clusters using the --name parameter to
  crm bootstrap init.'''


CRM_CLUSTER_GEO_JOIN_H_OUTPUT = '''Join cluster to existing geo cluster

usage: geo-join [options]

This command should be run from one of the nodes in a cluster
which is currently not a member of a geo cluster. The geo
cluster configuration will be fetched from the provided node,
and the cluster will be added to the geo cluster.

Note that each cluster in a geo cluster needs to have a unique
name set. The cluster name can be set using the --name argument
to init, or by configuring corosync with the cluster name in
an existing cluster.

optional arguments:
  -h, --help            Show this help message
  -q, --quiet           Be quiet (don't describe what's happening, just do it)
  -y, --yes             Answer "yes" to all prompts (use with caution)
  -c [USER@]HOST, --cluster-node [USER@]HOST
                        An already-configured geo cluster or arbitrator
  -s DESC, --clusters DESC
                        Geo cluster description (see geo-init for details)'''


CRM_CLUSTER_GEO_INIT_ARBIT_H_OUTPUT = '''Initialize node as geo cluster arbitrator

usage: geo-init-arbitrator [options]

Configure the current node as a geo arbitrator. The command
requires an existing geo cluster or geo arbitrator from which
to get the geo cluster configuration.

optional arguments:
  -h, --help            Show this help message
  -q, --quiet           Be quiet (don't describe what's happening, just do it)
  -y, --yes             Answer "yes" to all prompts (use with caution)
  -c [USER@]HOST, --cluster-node [USER@]HOST
                        An already-configured geo cluster
  --use-ssh-agent       Use an existing key from ssh-agent instead of creating
                        new key pairs'''