mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-10 02:34:01 +00:00

1. Enable scripting of vqsim and add man page I've added a 'sleep' command to help with scripting as well as documentation on how to do it. 2. Make 'sync' operation much more robust and useful Refactored a lot of code to make sure that in sync mode the prompt appears at the 'right' time. What we do is wait for all of the nodes in all partitions to have the same ring_id. If this doesn't happen then the timeout will fire as before. 3. Rename binary to corosync-vqsim and add a sub-package for it Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
95 lines
4.3 KiB
Groff
95 lines
4.3 KiB
Groff
.\"/*
|
|
.\" * Copyright (C) 2019 Red Hat, Inc.
|
|
.\" *
|
|
.\" * All rights reserved.
|
|
.\" *
|
|
.\" * Author: Christine Caulfield <ccaulfie@redhat.com>
|
|
.\" *
|
|
.\" * This software licensed under BSD license, the text of which follows:
|
|
.\" *
|
|
.\" * Redistribution and use in source and binary forms, with or without
|
|
.\" * modification, are permitted provided that the following conditions are met:
|
|
.\" *
|
|
.\" * - Redistributions of source code must retain the above copyright notice,
|
|
.\" * this list of conditions and the following disclaimer.
|
|
.\" * - Redistributions in binary form must reproduce the above copyright notice,
|
|
.\" * this list of conditions and the following disclaimer in the documentation
|
|
.\" * and/or other materials provided with the distribution.
|
|
.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its
|
|
.\" * contributors may be used to endorse or promote products derived from this
|
|
.\" * software without specific prior written permission.
|
|
.\" *
|
|
.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
.\" * THE POSSIBILITY OF SUCH DAMAGE.
|
|
.\" */
|
|
.TH COROSYNC-VQSIM 8 2019-05-10
|
|
.SH NAME
|
|
corosync-vqsim \- The votequorum simulator
|
|
.SH SYNOPSIS
|
|
.B "corosync-vqsim [\-c config_file] [\-o output file] [\-n] [\-h]"
|
|
.SH DESCRIPTION
|
|
.B corosync-vqsim
|
|
simulates the quorum functions of corosync in a single program. it can simulate
|
|
multiple nodes, network splits and a basic quorum device.
|
|
|
|
By default vqsim will build a virtual cluster of all the nodes in the corosync.conf file,
|
|
each 'node' running in a forked subprocess (and thus asynchronously). It then provides a
|
|
command-line interface to add (up) or remove (down) nodes, and cause network splits and
|
|
rejoins. After each event it shows the new quorum status for all nodes.
|
|
|
|
Nodes in vqsim are always referred to by their nodeid (the IP address is meaningless) and
|
|
optionally by a 'partition' which precedes the nodeid with a colon. By default all nodes
|
|
are in partition 0. Nodes can be moved between partitions using the split and join commands.
|
|
Multiple nodes can be split and joined at the same time.
|
|
|
|
To script vqsim you must send input to it via a pipe rather than just redirecting STDIN. This
|
|
is because it runs asynchronously to enable the virtual 'nodes' to report status when needed.
|
|
(eg if you kill a subprocess using the 'kill(1)' command it gets removed from the cluster).
|
|
|
|
By default vqsim will wait for all nodes in all partitions to reach the same
|
|
ring sequence number before returning a prompt,
|
|
there is a timeout associated with this in case of a 'node' failure and exceeding this timeout
|
|
can (optionally) quit the program signalling an error.
|
|
|
|
You can disable waiting using the 'sync off' command or the -n command-line option. This can easily
|
|
cause unexpected behaviour so use it with care.
|
|
|
|
The number of votes per node is read from corosync.conf. New nodes added using the 'up' command
|
|
will copy their number of votes from the first node in corosync.conf. This may not be what you
|
|
expect and I might fix it in future. As most clusters have only 1 vote per node (and this is
|
|
strongly recommended) then this should rarely be a problem.
|
|
|
|
Once you have the 'vqsim> ' prompt you can type 'help' and get a list of sub-commands.
|
|
|
|
.SH OPTIONS
|
|
.TP
|
|
.B -c
|
|
This specifies the fully qualified path to the corosync configuration file.
|
|
|
|
The default is /etc/corosync/corosync.conf.
|
|
.TP
|
|
.B -o
|
|
Specifies the output destination. STDOUT by default.
|
|
.TP
|
|
.B -n
|
|
Don't pause after each command, come straight back to a prompt. Use with care!
|
|
|
|
.TP
|
|
.B -h
|
|
Display a brief help message
|
|
.SH SEE ALSO
|
|
.BR corosync (9),
|
|
.BR corosync.conf (5),
|
|
.SH AUTHOR
|
|
Christine Caulfield
|
|
.PP
|