Commit Graph

782 Commits

Author SHA1 Message Date
Steven Dake
a68b9f3944 Fix possible segfault with IPC service.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1779 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-25 04:55:32 +00:00
Steven Dake
c5c15450be Remove extra printf debug.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1778 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-25 04:55:06 +00:00
Steven Dake
82bbabb663 Fix problem with 1722 commit which broke ipc.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1776 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-24 06:15:17 +00:00
Christine Caulfield
fb833af401 When a quorum device registers it tells the corosync quorum engine of
the new quorum which then tries to do a new sync(). But that's no use
because the nodelist and ring_id is identical to before. Also it can try
and register while a sync is already in operation ... which gets it
awfully stuck!

So this patch makes the sync conditional on there being a new ring ID to
do a sync on.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1774 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-23 08:53:45 +00:00
Christine Caulfield
9a3ccc6059 Don't crash if a library tries to talk to a module that is not loaded
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1772 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-20 08:24:40 +00:00
Fabio M. Di Nitto
b727ce320d Fix build error spotted by gcc-4.4
#elif with no clause is clearly wrong and continuing when we don't
know the byte order only defers the problem to a point where its much
harder to debug



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1767 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-19 08:05:52 +00:00
Steven Dake
c077255702 Whitetank IPC Forward Port.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1766 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-19 02:23:58 +00:00
Steven Dake
ef48923130 Remove redundant statement in totemsrp.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1764 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-18 02:13:30 +00:00
Steven Dake
cfdb98f18b Use definition instead of magic number.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1763 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-18 02:07:59 +00:00
Steven Dake
261a3fe006 Update link for upstream crypto code.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1762 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-18 02:06:13 +00:00
Ryan O'Hara
4e189328ed Add timer_expire_time_get
Add timer_expire_time_get corosync API call.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1761 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-18 01:28:35 +00:00
Ryan O'Hara
f116dce6f2 Add timer_time_get to the corosync API.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1760 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-14 02:06:20 +00:00
Christine Caulfield
035ec6f113 Don't automatically load the quorum service.
This will, for the time being, unbreak synchronisation.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1750 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-27 08:59:14 +00:00
Steven Dake
e6c95a5fbd Fix node masking for 32 bit node ids.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1749 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-26 20:46:45 +00:00
Steven Dake
ff76864918 Allow crypto to work on systems where unsigned long evaluates to 8 bytes. (s390x).
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1746 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-26 20:22:28 +00:00
Steven Dake
3442f911fa Fix error where entire message was not rejected during startup of a new
node resulting in partial delivery of a complete message and segfaulting
the executive.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1744 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-25 21:25:25 +00:00
Steven Dake
63fa74305b Fix message rejection problem.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1743 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-25 21:15:25 +00:00
Fabio M. Di Nitto
cdb06d25d1 cleanup handling of uid/gid config
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1742 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-23 16:12:13 +00:00
Christine Caulfield
98cc132d48 Fix a couple of memory leaks
The objdb occurred because object_find_destroy wasn't implemented!
 
The one in confdb occurred because object_find_destroy wasn't called if
object_find_next returned an error the first time it was invoked (ie
there were no subobjects).



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1741 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-23 15:41:06 +00:00
Fabio M. Di Nitto
e8ffb05b2f fix logging reload operation and clean up main init
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1740 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-23 14:27:58 +00:00
Fabio M. Di Nitto
d7024f53d6 don't keep logsys fd open unless it's required
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1739 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-23 14:25:30 +00:00
Steven Dake
4df2189751 Complete poll_stop function.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1735 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-20 17:59:10 +00:00
Steven Dake
da51942e60 Cancel token holding mode when a totem token callback is added to the system.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1734 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-20 17:41:45 +00:00
Fabio M. Di Nitto
02f9b8e19a Clean up tag handling and provide functions to match name with values and
viceversa.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1731 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-16 08:59:09 +00:00
Fabio M. Di Nitto
51b6b1b6ae restore the priority setting that was lost
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1730 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-16 08:44:15 +00:00
Fabio M. Di Nitto
f04d6a561c Remove duplicate code and use the right library call into logsys
that also cover cases that were not handled at all.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1729 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-15 12:06:40 +00:00
Fabio M. Di Nitto
dbca1c61b2 Fix small memory leak on config reload operations
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1728 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-15 11:33:47 +00:00
Fabio M. Di Nitto
b2836a0fd4 Fix logsys write to file crash.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1727 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-14 11:00:23 +00:00
Christine Caulfield
205ea1d44b If there was a quorum {} section in corosync.conf but no provider specified
then  we would always report inquorate.

This was wrong, if no provider is specified then we are always quorate.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1722 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-01-08 11:12:10 +00:00
Angus Salkeld
c049f8bf21 Fix coverity bug ID 4: remove unused code & fix compile error
In evs_dispatch()  the local ignore_dispatch is not used.
So I have removed this code.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1717 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-28 09:25:17 +00:00
Angus Salkeld
aec3b38cde Fix coverity bug ID 1: overused local variable
coverity says that in exec/objdb.c: 1075 the found is always == 1
therefore the code is dead.  But this is just a case of an overused
local variable. "found" is used for two different searches.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1716 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-28 09:05:05 +00:00
Angus Salkeld
e58f29f578 Fix coverity bug ID 7: add NULL pointer check
Here coverity checks that if in a function a pointer is checked
for NULL then it is checked through out the function.

So below I have just add some more checks for NULL.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1715 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-28 09:01:35 +00:00
Angus Salkeld
2998d698ad Fix coverity bug ID 5
In poll_timer_add() if you pass in a NULL for the callback function
the pointer will be dereferenced.

I have moved the check for the NULL up.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1714 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-28 08:55:57 +00:00
Christine Caulfield
795e573c20 If there is no quorum provider specified, then always return quorate.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1713 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-19 16:08:25 +00:00
Christine Caulfield
91458d92fa If we exit with an error, set the returned status code for the shell.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1712 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-18 08:28:46 +00:00
Angus Salkeld
7750827be8 Don't segfault if the ais group is not found.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1711 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-17 17:44:50 +00:00
Christine Caulfield
f5467e33b7 Add config reload support for logsys
If objdb is reloaded, then we re-parse the logging options.

This allows logging options to be changed/enabled/disabled without 
restarting corosync




git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1710 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-17 08:34:26 +00:00
Christine Caulfield
bd646b6c39 This patch adds this capability for a limited number of totem keys using
the existing reload mechanism.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1709 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-12 11:27:27 +00:00
Christine Caulfield
1fc2f37ba0 Add some missing files, sorry
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1706 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-09 13:48:47 +00:00
Christine Caulfield
cfc7da3573 quorum is now an optional loadable module (though I've put it into the
defaults in services.c) and can load another module to do the quorum
work (eg YKD which I've made more compliant too). All the quorum code
has been removed from sync.c. quorum.c is simply a shim later for the
coroapi, the main module is in vsf_quorum.c

There are coroapi calls to query quorate status and also to get
notifications when it changes.

I've included the testquorum.lcrso module in this patch because I think
it's really helpful for testing. It sets the quorum state based on an 
objdb variable, this can be set or cleared using corosync-cfgtool



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1704 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-08 15:55:41 +00:00
Steven Dake
6124b2a29a Fix deadlock in logsys during startup.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1703 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-02 15:51:03 +00:00
Andrew Beekhof
a3571b016b Correctly compare local addresses with bindnetaddr
This patch allows whitetank/corosync to behave correctly when the supplied value of bindnetaddr has more precision than the netmask, but is not a full IPv4 address.

For example, currently, if the netmask is /16 but the user specifies 192.168.1.0, then OpenAIS is unable to determine the correct address and uses the loopback address instead.

The following patch allows OpenAIS to correctly determine which interface/address to use.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1702 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-02 14:50:51 +00:00
Angus Salkeld
f2f20533fd change get node_id() to return an unsigned int
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1701 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-01 18:44:55 +00:00
Christine Caulfield
ccef86ebb9 Don't crash if we get a message for a service that isn't loaded.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1699 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-13 09:54:34 +00:00
Christine Caulfield
476bc5e291 Make the port numbers into Network Byte Order.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1698 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-13 09:54:09 +00:00
Angus Salkeld
17c0625160 LINT: fix "Assignment of ssize_t to int" warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1696 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 18:13:47 +00:00
Angus Salkeld
efb280c511 LINT: rename the overlay struct so they are uniq.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1694 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 17:26:58 +00:00
Angus Salkeld
fd25950970 LINT: fix or ignore unchecked return values.
If we don't care about the return value then typecase the return
value to void.
Else do something useful with the return value.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1693 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 17:25:22 +00:00
Steven Dake
69b80c7126 Fix missing message in delivery of messages under certain circumstances.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1692 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-10 08:58:12 +00:00
Steven Dake
6df910fb4e Fix received_flg to contain proper values.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1691 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-10 08:57:50 +00:00