Commit Graph

256 Commits

Author SHA1 Message Date
Angus Salkeld
34cb488999 STATS: fix key name length on "join_count"
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Seven Dake <sdake@redhat.com>
2011-02-04 09:46:52 -07:00
Jan Friesse
5c951ac641 Add objdb firewall_enabled_or_nic_failure
New objdb var runtime.totem.pg.mrp.srp.firewall_enabled_or_nic_failure
is set to 1 if continuous_gather is larger then MAX_NO_CONT_GATHER.
Under normal conditions, value of variable is 0.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-01-12 11:26:25 +01:00
Jan Friesse
b9df4424b1 Display warning when not possible to form cluster
This may typically happen if local firewall is enabled. Patch adds new
item to statistics called continuous_gather where is number of
continuous entered gather state. If this number is bigger then
MAX_NO_CONT_GATHER, warning message is displayed. This is also used on
exiting, so stop of corosync is now possible even with enabled firewall.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2010-12-03 10:11:11 +01:00
Fabio M. Di Nitto
b2400314b2 add release script and git based versioning
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2010-11-10 07:46:53 -07: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
Angus Salkeld
f95c4f76c3 POLL: gracefully handle running out of file descriptors.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3028 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-08-25 01:07:37 +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
Andrew Beekhof
0883fc877b Safely redirect stderr/in/out to /dev/null to prevent fork() from crashing
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2976 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-30 10:20:42 +00:00
Steven Dake
0eb0a06a14 Stop the totem stats updater timer during shutdown to prevent references to
invalid memory.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2953 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-19 00:27:46 +00:00
Steven Dake
1e76356159 Unlock global serializer lock during shutdown.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2949 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-19 00:10:41 +00:00
Andrew Beekhof
daa85f8f6c Prevent segfault in fork()
Not closing stdin/stderr/stdout leads to a segfault in fresetlockfiles()
See https://lists.linux-foundation.org/pipermail/openais/2010-June/014854.html for further info.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2948 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-18 14:33:01 +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
6bae61d835 log: remove "Member left/join" log messages
No longer needed by CTS and likely to be very noisy
with large node numbers.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2804 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-05 04:36:56 +00:00
Angus Salkeld
ea345ef0fd check and discard unknown messages
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2800 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-04 04:25:31 +00:00
Angus Salkeld
8ebe03efd5 diags: add a mechanism to trigger the writing the flight data
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
2010-05-04 00:56:25 +00:00
Jan Friesse
12c5f31a89 Handle some valgrind errors
- Memset for res_setup variable in coroipcs:req_setup_send
- Two memset in logsys for buffers
- Problem in corosync_totem_stats_updater where avg_token_holdtime has
size of avg_backlog_calc
- corosync_totem_stats_init where avg_backlog_calc is 32 bits (not 64)
- objdb problem if new_valie_len != object->value_len. In such case
newly allocated memory is not initialized and in some situations,
value_len is not updated.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2787 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-23 08:03:05 +00:00
Angus Salkeld
ce492d7008 add a list of member nodes into the objdb runtime tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2678 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-09 22:04:06 +00:00
Angus Salkeld
4e7ded5bf3 Add tsafe (thread safe) file to catch unsafe function calls.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2669 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-03 01:27:37 +00:00
Angus Salkeld
824fd8e82a Add a test harness to corosync that uses CTS from pacemaker.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2668 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-03 00:08:57 +00:00
Angus Salkeld
20f3331d0e convert strerror() into strerror_r()
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2665 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:28:36 +00:00
Angus Salkeld
5dd31150ee convert strtok to strtok_r
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2663 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:25:20 +00:00
Angus Salkeld
fdeea0b3b1 Add a debug message on node join/leave.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2662 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-18 20:12:14 +00:00
Jan Friesse
5a8200c1cb Fix corosync shutdown process
This patch change corosync shutdown process, so now:
- exit function of service engine is called
- all IPC connections are closed and removed from poll
- service engine is unlocked


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2657 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-16 11:29:14 +00:00
Angus Salkeld
c6beee076a pass transitional members into the sync_init() callbacks.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2653 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-04 00:18:51 +00:00
Angus Salkeld
e88aebbac7 move sync_v2_init() into main_service_ready
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2652 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-04 00:13:27 +00:00
Jan Friesse
5524a4738a Pass correct poll handle to poll_stop on exit
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2648 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-21 12:48:30 +00:00
Jan Friesse
64c6c6f324 Fix malloc deadlock in signal handler
This patch solves situations, where malloc is called 
inside signal handler. It creates thread, which waits
for semaphore unlock and then starts shutdown sequence.

RHBZ#547511


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2644 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-14 12:54:46 +00:00
Angus Salkeld
acf9a8d85f Correct some ugly indentation.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2563 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-12-03 18:13:52 +00:00
Jan Friesse
9edbf61401 bsd: Fix mlockall on FreeBSD version >= 8.0
FreeBSD version 8.0 and greater supports mlockall
syscall correctly. So configure.ac is changed to detect
FreeBSD version and main.c is changed to support it.

Resolves: rhbz#513687


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2560 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-12-02 15:09:18 +00:00
Fabio M. Di Nitto
398a381965 Fix threads vs fork init order
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2558 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-30 23:01:51 +00:00
Angus Salkeld
27d383276b coroipcs: Add a queue_size stats counter to each ipc connection.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2552 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-29 18:28:39 +00:00
Angus Salkeld
ce8046f353 coroipcs: add logging for flow control state changes.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2551 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-29 18:25:51 +00:00
Steven Dake
60e406f355 Resolve shutdown problems for pacemaker use case.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2531 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-20 21:07:50 +00:00
Angus Salkeld
07072bd0b1 Add a log_printf function to coroipcs so we can pass the log level
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2530 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-18 18:15:24 +00:00
Angus Salkeld
49345f48f8 stats: prevent a div by zero if totem_count is zero.
patch by Chrissie



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2522 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-14 04:06:42 +00:00
Andrew Beekhof
4fba207d42 Add SIGTERM support and have the init script wait for corosync to actually terminate. Bud rh#525552
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2520 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-13 06:16:14 +00:00
Angus Salkeld
4e6e33467d allow coroipcs to work without calling stats initialization.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2518 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 21:50:10 +00:00
Angus Salkeld
73a24c0352 Add totem stats to objdb.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2517 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 17:30:20 +00:00
Angus Salkeld
f78e719713 Add per service-function statistics.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2515 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 00:39:39 +00:00
Angus Salkeld
afbbc5e5ff Add connection related statistics to the object db.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2514 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 00:36:55 +00:00
Steven Dake
6ad014a315 make main_service_ready function static.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2480 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-25 06:06:31 +00:00
Steven Dake
215ad336f2 Fix sigpipe handling to ignore sigpipes on systems which support them.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2419 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-20 05:36:52 +00:00
Angus Salkeld
350cc0ae42 log the built-in features at startup
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2411 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-10 01:51:32 +00:00
Steven Dake
f558917703 Proper limits checking for message sizes to allow ~1mb max message sizes for corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2388 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-17 18:22:11 +00:00
Fabio M. Di Nitto
13f3c5bc6a Delay forking and closing of fds as much as possible
to allow startup wrappers (such as cman_tool) to collect
as much errors as possible in case of startup failure



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2385 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-12 06:57:53 +00:00
Fabio M. Di Nitto
498f24fa32 corosync: move logsys thread config with all the others
logsys thread priority was configured after forking the
wthread process and spread the scheduler priority config
across a large chunk of code in main.c

Now that logsys scheduler priority can be invoked at any time,
move the code together with corosync_setscheduler code.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2383 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-10 05:39:45 +00:00
Jan Friesse
9931d50b31 Support for -v (version) feature
This can be usefull for easier way to get informations
of the corosync version from users. Version and SVN
revision (get by svninfo -c) are displayed.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2381 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-04 07:39:03 +00:00
Steven Dake
69928e301a Add notification when totem has completed initialization.
This triggers the initialization of the service engines which may need totem
for initialization.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2372 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-27 02:00:05 +00:00
Steven Dake
279e297842 Darwin is missing the sched_setscheduler system call.
Patch detects it and resolves the build failure.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2366 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-21 01:31:39 +00:00
Jim Meyering
6aad39be63 remove trailing blanks
* corosync.spec.in:
* exec/evil.c:
* exec/main.c:
* exec/mainconfig.c:
* exec/syncv2.c:

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2322 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-30 09:27:20 +00:00