Angus Salkeld
3eb76c2154
cov 10382: improve error handling around open()
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2825 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-14 02:05:32 +00:00
Angus Salkeld
b4f61842b6
cov 10381: check result of open()
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2824 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-14 02:04:53 +00:00
Angus Salkeld
3ebd6fab52
cov 10379 &10380: check result of open before calling ftruncate.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2823 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-14 02:03:49 +00:00
Steven Dake
5e8f1a730f
logsys rework to deal with memory corruption around debug:on configurations.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2816 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-13 04:36:42 +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
Steven Dake
5672c3efa8
The retransmit token storage area is an improper type of an array of pointers
...
rather then a pointer to a buffer.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2795 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-30 05:18:02 +00:00
Steven Dake
005b9af59d
When a message is retransmitted, a memmove operation is done to remove the
...
newly retransmitted entry from the list. It is possible this memmove operation
can buffer overflow because it has an invalid length calculation fixed by this
revision.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2794 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-30 05:15:41 +00:00
Steven Dake
80d621e25f
Allow maximum entries in the retransmit queue when recovery takes place.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2793 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-30 05:14:08 +00:00
Steven Dake
107ef19913
Save the ring id and restore it properly when the recovery operation fails as
...
a result of a new gather or token loss.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2792 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-30 05:12:26 +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
Christine Caulfield
e88c09e7c2
Fix a crash in YKD
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2767 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-20 07:27:14 +00:00
Angus Salkeld
212126fa34
When sync is aborted clear the "my_ring_id" variable.
...
This patch fixes crashes found by repeated pacemaker CTS SimluStart
tests. When you bring up the nodes together it can cause a lot of
configuration changes and sync gets started and aborted
lots of times.
When abort is called the ring_id is not changed which means that any
sync packet that arrive from that point on will be accepted as valid.
I have seen old barrier messages causing the processing index to increment
later causing an array out of bounds.
This patch memsets the ring_id to 0, thus causing the ring_id in the packet and
my_ring_id not to match.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2757 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-12 19:51:38 +00:00
Steven Dake
97174868b1
Allow modifying POLLIN/POLLOUT state in another thread while the main thread
...
is blocked in poll system call.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2755 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-02 19:16:23 +00:00
Steven Dake
cf4e2069b6
Fix barrier operation with syncv2 and compat:none or openais service engines.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2750 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 08:23:10 +00:00
Angus Salkeld
805a0f3c1d
objdb: fix key change notifications
...
1) don't send notifications if the key is the same.
2) Add key value change notifications to key_inc & key_dec
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2746 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 07:19:25 +00:00
Jrme Flesch
a5f2733211
Totemudp: Add debug logs when a call to sendmsg() fails
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2740 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-26 13:54:42 +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
Angus Salkeld
59826dd14e
Fix unloading of evs (service id == 0)
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2731 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:16:32 +00:00
Angus Salkeld
9a862803aa
Fix code coverage with lcrso's
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2729 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:14:25 +00:00
Steven Dake
64d60a26c6
Tone down noisy logging from ipcs system.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2721 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-23 17:16:39 +00:00
Steven Dake
2cc62fdd34
Fix lockup that occurs rarely with pthread_join() is called in atexit()
...
handler.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2719 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-22 22:07:01 +00:00
Steven Dake
084d19cddc
Fix problem where retransmissions don't occur resulting in failure to receive
...
condition.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2685 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-20 20:08:38 +00:00
Christine Caulfield
576614109e
Fix a couple of small bugs that happen when the configuration is reloaded.
...
1. the reload callback was not sent to the library,
2. totem exponentially added new callbacks because the old ones were not
removed properly.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2684 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-16 09:53:18 +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
92ade89db6
tsafe: change fork() override to pthread_atfork() callbacks.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2677 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-09 21:59:24 +00:00
Angus Salkeld
ec09a97867
Fix some "make lint" problems
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2674 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-03 21:52:08 +00:00
Angus Salkeld
4a14c93fcb
Add tsafe.h to noinst_HEADERS to fix "make distcheck"
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2670 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-03 04:51:43 +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
Christine Caulfield
e9adc51893
Reduce the number of times the quorum message is displayed.
...
Patch from David Teigland
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2667 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-26 15:30:38 +00:00
Angus Salkeld
efd0157b39
convert giduid calls to reentrant versions.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2666 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:29:49 +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
2290913d28
convert readdir into readdir_r
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2664 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:26:54 +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
Steven Dake
bc64fbcb58
Patch to set unset value in token hold cancel structure as to not crash
...
wireshark.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2660 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-18 20:08:39 +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
Steven Dake
1978c9d471
Use nodeid instead of localhost ip for the case when binding to a
...
loalhost interface.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2656 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-15 21:39:33 +00:00
Steven Dake
a1bf354ed4
Merge of Dejan's on=yes patch for the config parser options to ease migration.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2654 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-04 21:36:21 +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
Angus Salkeld
8671945cef
totemsrp: fix transitional configuration changes with long token timeouts
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2651 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-02 06:24:01 +00:00
Steven Dake
2f24513d87
Fix coroipcs message corruption that occurs when a message fills the remainder
...
of the dispatch buffer with a full message.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2650 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-30 23:02:40 +00:00
Jan Friesse
f4a644c711
Add schedwrk_create_nolock function
...
This patch adds schedwrk_create_nolock, which will not call
serialize_lock before execution of callback.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2649 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-22 09:45:29 +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
68d7e86c2f
poll_dispatch_delete - ability to return 0
...
Patch fixes poll_dispatch_delete, so it is able to return 0
(success), when requested FD was found.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2647 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-21 12:46:09 +00:00
Jan Friesse
c9baa674f5
Fix setting invalid mode in log destination
...
This fixes problem in revision 2642, when only last
line of log destination setting is really applied.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2646 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-20 13:22:38 +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