Commit Graph

42 Commits

Author SHA1 Message Date
Jim Meyering
cc6eed7042 in progress: avoid warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1943 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:13:47 +00:00
Jim Meyering
e487affc01 logsys_config_facility_set: make "name" parameter const
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1919 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:09:56 +00:00
Jim Meyering
217c5bed8d logsys: detect write failure and avoid a file descriptor leak
* exec/logsys.c (logsys_log_rec_store): Close output file descriptor
and detect any failure.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1915 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 14:33:49 +00:00
Steven Dake
1b1c0b657a Appears to fix compile errors on macosx.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1909 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 16:03:46 +00:00
Fabio M. Di Nitto
031c02f589 - Every .c file should include "config.h" to get the right defines...
- services/Makefile.am: add include search paths for config.h

- include/corosync/cs_config.h.in exports LCRSODIR and SOCKETDIR

- tools/Makefile.am: drop -D defines for dirs that are now in
cs_config.h or config.h

- configure.ac: sanitize prefix and exec_prefix paths. Export DIRS in
*config.h

- lib/Makefile.am: : drop -D defines for dirs that are now in
cs_config.h or config.h. Add rule to build lcr_ifact.o or building from
lib/ fails miserably



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1877 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 12:58:53 +00:00
Steven Dake
64aab2e950 Remove const warnings relating to logsys global definitions.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1806 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 09:48:34 +00:00
Steven Dake
b113dd2e19 Remove logsys warnings.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1805 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 09:40:54 +00:00
Fabio M. Di Nitto
8c4bcde5c2 Add logsys_format_get to logsys API.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1797 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 08:03:50 +00:00
Fabio M. Di Nitto
f7c4cea567 logsys_format_set should use its own internal copy of format_buffer
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1796 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 07:11:17 +00:00
Fabio M. Di Nitto
f83aa4f876 Allow logsys_format_set to reset to default.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1792 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-06 07:09:24 +00:00
Fabio M. Di Nitto
e0a74a08b3 Fix logsys_set_format by updating the right bits
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1789 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-04 10:13:26 +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
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
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
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
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
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
418739f8f0 Null terminate string which resulted in failure of confdb during logging.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1687 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-06 00:17:01 +00:00
Steven Dake
0c631e24fc Logsys flight recorder.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1681 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-30 22:25:56 +00:00
Angus Salkeld
9655fa2fea If syslog() blocked, node-leave events were incorrectly reported
In some cases, the syslog() call may block. If this happened, the AIS worker
thread would block waiting on the syslog() call. However, the worker thread
is still holding a logsys mutex, which is needed to enqueue any more log
messages from the other AIS threads. So the main AIS thread blocks waiting
on the logsys mutex. This can then cause aisexec on other nodes to detect
the node as leaving the cluster.

Author: Tim Beale <tim.beale@alliedtelesis.co.nz>


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1665 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-09-17 18:22:58 +00:00
Steven Dake
01b8bc6ab2 Finish the renaming of openais to corosync in the tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1646 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 06:15:26 +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
6a518947d4 Allow setting of the logsys priority to one lower then was already specified.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1579 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-14 11:07:39 +00:00
Steven Dake
bbb7a141cc Revert incorrect patch.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1578 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-14 11:05:13 +00:00
Steven Dake
1c1800dd1b Allow setting of lower priority which is currently disabled.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1577 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-14 10:58:28 +00:00
Steven Dake
eef9f0644b Allow users of logsys to disable output of logging LOG_LEVEL_DEBUG messages
via log_mode_set.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1576 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-14 10:55:28 +00:00
Steven Dake
49dd2badad Fix error in a previous logsys patch.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1574 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-10 23:52:38 +00:00
Steven Dake
8ab1d3aa9f Add init/config entry points for those that dont with to use macros in logsys.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1572 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-02 22:58:03 +00:00
Steven Dake
5f31ffa559 Add two new modes LOG_MODE_SHORT_FILELINE and LOG_MODE_NOSUBSYS.
LOG_MODE_SHORT_FILELINE strips the leading path from the file name in
a debug output.  LOG_MODE_NOSUBSYS removes a global variable and provides
the ability to set or unset this via config_mode_set.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1570 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-01 22:08:15 +00:00
Steven Dake
558fcdc4aa remove totemip.h reference from file.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1559 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-06-24 04:44:21 +00:00
Steven Dake
5068ac3e1d Allow user to retrieve logsys mode.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1555 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-06-20 06:06:56 +00:00
Steven Dake
c8c2ad6df6 Patch to add new api to logsys to get priority names from subsystem names.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1527 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-04-28 16:00:38 +00:00
Patrick Caulfield
6bc3231549 Fix logsys_config_priority_set() so that it sets the priority
of the local subsystem and not always "MAIN".


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1522 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-04-23 10:39:21 +00:00
Steven Dake
2074e8df56 Patch to reinitialize logsys internal variables after a fork for correct
operation.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1519 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-04-21 15:15:48 +00:00
Patrick Caulfield
ba85a91983 Fix locking in logsys.
Patch from Fabio M. Di Nitto <fabbione@fabbione.net>


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1515 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-04-16 10:13:06 +00:00
Steven Dake
3cbecd98c1 Fixes for the logsys system.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1430 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:41:19 +00:00
Steven Dake
113a3c4f88 The logsys logging system. Read logsys_overview.8.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1428 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:38:10 +00:00