This is avoid getting stuck in the dispatch processing
messages when the user is trying to shutdown the service.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
From the strcpy(3) man page, the following warning is given:
The strncpy() function is similar, except that at most n bytes of src
are copied. Warning: If there is no null byte among the first n bytes
of src, the string placed in dest will not be null-terminated.
The current corosync code base does not take this warning into account
when using strncpy, potentially resulting in non-null terminated strings.
Signed-off-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Steven Dake <sdake@redhat.com>
This option (-l or --less-secure) causes corosync-keygen to read from
/dev/urandom instead of /dev/random to ensure that no input is required
from the user. It may be useful when this command is used from a
script.
Signed-off-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Steven Dake <sdake@redhat.com>
When building corosync against older libraries already installed on the system,
the corosync-notifyd application uses the wrong Makefile.am commands. This
results in the SNMPLIBS (which includes -L/usr/lib64) coming before the proper
LDADD flags. The result is an inability to compile on an already existing
installation.
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
The flight recorder records all data in 32 bit words. Use uint32_t type
rather then unsigned int. Also remove bit-shift with multiply by sizeof
uint32_t.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Corrupted files may contain items with rec_size larger then g_record
buffer and/or flt_data_size.
Also g_record array size is now defined as constant.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Ryan noticed this inconsistency, all other status's
are string so this should be too.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Seven Dake <sdake@redhat.com>
Reviewed-by: Ryan O'Hara <rohara@redhat.com>
This is to send dbus events on major cluster events:
- membership changes
- application connect/dissconnet from corosync
- quorum changes
dbus events can then be converted into snmp traps by foghorn or
corosync-notifyd can be run to directly send snmp traps.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Signed-off-by: Lon Hohberger <lhh@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Find an existing parent object and add the last object/key name of the command
to the object database. This allows the runtime addition of ip addresses to
the list of IPs corosync knows about for the purpose of the UDPU transport mode.
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
trigger the dumping of flight data using:
corosync-objctl -w runtime.blackbox.dump_flight_data=anything
trigger the dumping of state using:
corosync-objctl -w runtime.blackbox.dump_state=anything
then read the flight data as usual:
corosync-fplay
This patch includes a wrapper script called:
corosync-blackbox
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2799 fd59a12c-fef9-0310-b244-a6a79926bd2f
This just adds a "-p" option to corosync-objctl.
So you can do the following (like sysctl).
corosync-objctl -p /path/to/object.conf
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2308 fd59a12c-fef9-0310-b244-a6a79926bd2f
The flight recoder buffer size as specified in LOGSYS_DECLARE_SYSTEM
or _logsys_rec_init was expressed in number of ints. A developer asking
to allocate 512K would get a 2M allocation on a machine with sizeof(int) = 4.
This is confusing and the patch addresses it:
- rename rec_size to fltsize for external API (no type change),
because rec_size is used many times internally for other reasons
and it can be confusing.
- rename size to fltsize in _logsys_rec_init.
- document what we allocate and why.
- swap comments around to match the code.
- introduce a simple macro to perform rounding (stolen from linux-2.6.git).
- start shaping fdata header to better handle dynamic values:
* write the flt_data_size as first unsigned int the header.
* change corosync-fplay to read the value and alloc the right amount
of memory instead of hardcoding it again.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2255 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fixes rhbz#499918
Functions from ckpt library (like aCkptCheckpointOpen,
saCkptSectionIterationInitialize, ...) internally uses corosync functions
reply_receive, reply_receive_in_buf, ... This functions are included in
coroipcc.c source file and uses global static variable ipc_hdb.
Without patch, coroipcc is linked to shared library (libcoroipcc.so) AND linked
with every corosync libraries (like cpg, ....), so global variable ipc_hdb is
included not only in libcoroipcc.so, but also in libcpg.so, ...
dlm_controld has function retrieve_plocks, and whole binary is linked with
libcoroipcc and libcpg. So ipc_hdb is included TWICE (so has TWO addresses).
Main problem causing the bug was, that reply_receive uses address from one
library, and reply_receive_in_buf uses other. This confuses check of hdb_get
function.
After removing linking of coroipcc.o to cpg, and rather use of dynamic version,
(this means, there is only one instance of ipc_hdb) problem disappeared.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2203 fd59a12c-fef9-0310-b244-a6a79926bd2f