Commit Graph

42 Commits

Author SHA1 Message Date
Fabio M. Di Nitto
eb3d49ef7d pload: make it a test service and not a public one
pload is a performance benchmark that measures the onwire
speed of corosync.

problem is that once pload has been executed, the cluster
is basically dead.

turn pload into a test tool, by removing corosync-pload tool
and user library.

cleanup pload code to make it more readable and drop lots
of unnecessary stuff.

add test/ploadstart tool that can configure and start pload
via cmap calls.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-03-12 07:11:51 +01:00
Fabio M. Di Nitto
e0e27e3d12 utils: cleanup main daemon exit codes
some of them are not in use anymore and can be dropped.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-03-09 11:15:44 +01:00
Angus Salkeld
023c4fa0cc Move hdb_error_to_cs to corotypes.h
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-02-14 11:10:14 +11:00
Steven Dake
2ad0cdc832 Update copyright header dates in exec directory
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-13 17:05:04 -07:00
Angus Salkeld
6cd576b0f5 move hdb_error_to_cs to common_lib
Note the previous inconsistent implementation.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-02-09 10:45:56 +11:00
Steven Dake
007e5c9458 Honor exec_init_fn call
exec_init_fn now either returns NULL (success) or a string which indicates
the error that occured during service engine initialization.  If an error
occurs, corosync will exit.  This patch adds ykd and makes other suggestions
from Fabio Di Nitto.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-30 14:05:09 -07:00
Steven Dake
7c8e83ac34 Change all ais references to corosync
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-01-12 07:29:15 -07:00
Angus Salkeld
c6895faa05 libqb: change ipc -> qb_ipc
IPC: return 0/-ENOBUFS from message handler
IPC: use the new rate_limit API to improve perf.
CPG: add send_async API & hook up flow control
IPC: Fix flow control getting stuck.
IPC: Port the remaining libs to use libqb IPC
IPC: remove libqb flowcontrol API
TEST: put cpg_dispatch() in it's own thread
IPC: cleanup ipc_glue.c name everything cs_ipcs_*()
IPC: add back statistics
IPC: remove coroipcc_ symbols from lib*.versions
IPC: init each se's IPC as it is loaded.
IPC: use the new connection_closed() event to free the context.
IPC: re-add zero copy functionality back
IPC: remove cpg_mcast_joined_async() and make it the default
 -> now cpg_mcast_joined() == cpg_mcast_joined_async()
libqb: expose a libqb error converter
libqb: add missing error conversions
libqb: remove repeat try loop in lib/cpg.c
CPG: fix zero copy mcast
CPG: use newer return codes
Add ENOTCONN to qb_to_cs_error()
libqb: fix error conversion from errno to cs_error_t in confdb
libqb: change errno_to_cs to qb_to_cs_error
libqb: add a cs_strerror() to get a more meaningful message
libqb: fix some confusing error conversions.
libqb: set the timeout on recv's to -1 (wait forever)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-08-09 10:37:14 +10:00
Jerome Flesch
fe51e70367 Corosync: Fix build when done with --enable-fatal-warnings
Signed-off-by: Jerome Flesch <jerome.flesch@netasq.com>
Reviewed-by: Jan Friesse<jfriesse@redhat.com>
2011-05-27 13:29:12 +02:00
Angus Salkeld
076e8b74f7 STATS: add the service name to the connection name.
This helps to quickly identify what service the application
is connected to.

The object will now look like:
runtime.connections.corosync-objctl:CONFDB:19654:13.service_id=11
runtime.connections.corosync-objctl:CONFDB:19654:13.client_pid=19654
etc...

This also makes it clearer to receivers of the dbus/snmp events
what is going on.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-03-29 13:48:13 +11:00
Russell Bryant
5da4d5479a Convert existing documentation to doxygen format.
This patch modifies most of the existing comments in header files to be
in a format that doxygen can interpret.  This provides another
significant improvement to the web/pdf/etc generated documentation
without having to add new content.

Signed-off-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-12 15:03:16 +11:00
Angus Salkeld
3b320c17ae IPC: return CS_ERR_NO_RESOURCES to library when low on fds.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3029 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-08-25 01:13:14 +00:00
Jan Friesse
93fb44ed0f Allow running only one instance of Corosync
Patch makes Corosync more compliant with common practices
for writing daemon. It creates pid file (usually 
/var/run/corosync.pid) and flocks it. So only one instance
of Corosync can be executed now.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3010 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-08-02 12:36:20 +00:00
Angus Salkeld
4ff33854ad add __attribute__((noreturn)) to functions that always exit.
we had some __attribute__((__noreturn__))
and some    __attribute__((noreturn))

I made them all: __attribute__((noreturn))



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2853 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-19 04:34:53 +00:00
Angus Salkeld
49ef3eb196 Make corosync exit with 0 normally and +1.. on error.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2739 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-25 00:58:14 +00:00
Fabio M. Di Nitto
3ffb151aa7 Fix missing symbol error when loading plugins without executive
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2405 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-07 10:41:42 +00:00
Steven Dake
2d7937de26 Warn user of missing dirs and exit gracefully.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2262 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 01:53:24 +00:00
Steven Dake
8126cf7458 Reworking of include file dependencies.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2119 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 09:01:30 +00:00
Jim Meyering
283011c669 rename function: s/strstr_rs/strchr_rs/ to reflect new semantics
* exec/coroparse.c (parse_section):
* exec/util.c (strchr_rs, strstr_rs):
* exec/util.h (corosync_exit_error):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2112 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-21 11:56:55 +00:00
Jim Meyering
89c6d6a1a1 rewrite strstr_rs not to use strdup
strstr_rs used strdup and didn't handle failure.  This change removes
the use of strdup as well as the uses of strstr, since all callers
passed a string of length 1 as the second argument.  This also changes
the prototype so that the 2nd parameter is a byte, not a string.

* util.h (strstr_rs): Adjust prototype.
* util.c (strstr_rs): Rewrite/simplify.
* sa-confdb.c (strstr_rs): Remove duplicate definition.
* coroparse.c (parse_section): Update callers.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2111 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-21 11:56:47 +00:00
Jim Meyering
8defaf0c3f mar_gen.h: make params const
* include/corosync/mar_gen.h (get_mar_name_t, mar_name_match): const
* exec/util.h (get_mar_name_t, mar_name_match): Remove unneeded decls.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2013 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:03:30 +00:00
Jim Meyering
ff701e7c32 util.h: avoid 2 warnings
* exec/util.h (_corosync_out_of_memory_error): Mark as "noreturn".
(_corosync_exit_error): Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1967 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:34 +00:00
Angus Salkeld
56eaee9561 cleanup the last of the SAF headers and types
This includes the rename of identifiers from corosync to cs.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1689 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-06 21:49:07 +00:00
Angus Salkeld
531bd3adec Add support for AMF (sync_request)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1666 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-17 19:04:19 +00:00
Steven Dake
dd3991c0bb Proper rename of openais usage to corosync throughout tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1637 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:54:46 +00:00
Steven Dake
e1f531380a Revert patch 1633 which breaks build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:44:26 +00:00
Steven Dake
c4a1c7eb96 Change all occurances of openais to corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1633 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:04:01 +00:00
Fabien Thomas
0c92a5e564 reorganize include file to match installed tree to build openais without installing corosync; correct some warnings and error under FreeBSD and Darwin
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1632 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 14:59:50 +00:00
Steven Dake
617dbdf2f0 Split openais and corosync tree into two seperate repositories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1622 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-05 13:23:46 +00:00
Steven Dake
46babc95ad Initial move of corosync and openais trees into seperate directories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1582 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-21 07:59:08 +00:00
Steven Dake
46b0163813 Change all email addresses that were sdake@mvista.com to sdake@redhat.com.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1541 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-05-12 13:48:06 +00:00
Hans Feldt
d23d9c3ec8 Added file and line of caller, useful for troubleshooting.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1235 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-09-01 10:16:25 +00:00
Hans Feldt
62bc733e2e - Error escalation improved, SU failover recovery action added
- Most runtime attributes in the inf. model calculated in runtime from
  more fundamental information. (improves consistency)
- sg_assign_si can now recalculate workloads considering existing
  assignments
- Logging improvements, similar to what is required as notification in
  AMF spec.
- CLC-CLI INSTANTIATE now exits aisexec when it fails (should later be
  sent as an NTF alarm)
- CLC-CLI CLEANUP correctly handles already terminated processes
- testamf1.c printouts removed for normal operation
- Iterator functions for SI/CSI assignments 



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1108 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-07-07 08:04:01 +00:00
Steven Dake
01afe82393 32/64/mixed endian support for checkpoint service.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1074 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-06-21 21:15:16 +00:00
Hans Feldt
5b30c0a120 Introduction of SA Forum information model for AMF as specified in
SAI-Overview-B.02.01.pdf. Other AMF changes as specified in
SAI-AIS-AMF-B.02.01.

Summary:

- SA Forum B.02 Information model for AMF
- groups.conf renamed to amf.conf
- amf.conf syntax changed heavily to follow SA Forum specs.
- AMF works when daemon.
- linux lists removed from AMF
- component cmd environment variables support
- component argv support
- multi value csi attributes



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1026 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-05-17 07:22:43 +00:00
Steven Dake
81658a8158 Patch from Hans to clean up main error handling a little bit
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1001 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-04-24 19:00:26 +00:00
Steven Dake
f50a6a11c8 Patch from Hans to significantly improve the logging functionality
read openais.conf.5 for info on how the new logging works.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@995 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-04-18 19:53:18 +00:00
Steven Dake
94e827e318 Remove segfault when object database can't be loaded
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@994 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-04-16 02:05:27 +00:00
Steven Dake
4a33ba11fa defect 1139
merge object database and do a general refactor of the code


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@952 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-03-18 21:00:19 +00:00
Steven Dake
e7f1e9200f enhancement 813
Rename ais_types.h header file to be more compliant with sa forum


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@796 fd59a12c-fef9-0310-b244-a6a79926bd2f
2005-08-17 19:27:25 +00:00
Mark Haverkamp
c572772487 (Logical change 1.84)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@304 fd59a12c-fef9-0310-b244-a6a79926bd2f
2004-09-28 18:29:14 +00:00
Mark Haverkamp
070a8295c1 Initial revision
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@299 fd59a12c-fef9-0310-b244-a6a79926bd2f
2004-09-28 18:29:13 +00:00