Before this, all knet messages, including debug, were sent
over the pipe from knet to corosync and filtered in corosync.
This was obviously a waste, so now we tell knet the logging
level we need from it and so only get the messages that the
user has requested.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Previously node id was logged ether as a %d (most often), %u, %x or
PRI.32 and ring id ether as %lld, %llx with various separators (., :, /)
between rep nodeid and seq. This seems to cause confusion.
This patch adds macros CS_PRI_NODE_ID, CS_PRI_RING_ID and
CS_PRI_RING_ID_SEQ (CS prefix = corosync, PRI modeled in spirit of
inttypes.h PRIx32) and makes code use them.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
... and remove unused nodes_in_partition function.
Also replace TAILQ_FOREACH with goto to while cycle.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
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>
A couple of small internal changes in corosync 3.0 broke vqsim.
1) The way the custom config file is specified (no long an env variable)
2) votequorum now needs to know ouZ_node_pos
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Some header files need to be specified on FreeBSD, otherwise there
are compile errors. These files does not affect Linux compilation.
Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
vqsim is a small program that allows node up/down/split/join
operations to be simulated without the use of an actual cluster.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>