Commit Graph

45 Commits

Author SHA1 Message Date
Russell Bryant
a609f79f1f Ensure that strings are null terminated after strncpy().
From the strcpy(3) man page, the following warning is given:
  The strncpy() function is similar, except that at most n bytes of src
  are  copied.  Warning: If there is no null byte among the first n bytes
  of src, the string placed in dest will not be null-terminated.

The current corosync code base does not take this warning into account
when using strncpy, potentially resulting in non-null terminated strings.

Signed-off-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-03-07 08:30:03 -06:00
Angus Salkeld
4c9b8d3acf CTS: wait (consistently) for 15 minutes for events
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-02-14 13:40:17 +11:00
Angus Salkeld
4e337c7b05 CTS: temp remove troublesome tests.
Right I know - not so good to comment out tests.
BUT they are passing but there is some weirdness
in ssh reconnecting to these nodes that causes CTS false
negatives.
So the nodes are watchdogged (as expected) but when they come
back up cts gets stuck in a loop re-trying to ssh into
them. It odd as a manual ssh works fine.

Basically I think it's more important the we get reliable
testing than have these test in there.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-02-11 16:57:49 +11:00
Angus Salkeld
2a568d6e79 Add dbus and snmp notifier
This is to send dbus events on major cluster events:
 - membership changes
 - application connect/dissconnet from corosync
 - quorum changes

dbus events can then be converted into snmp traps by foghorn or
corosync-notifyd can be run to directly send snmp traps.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Signed-off-by: Lon Hohberger <lhh@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2011-02-04 09:47:35 -07:00
Angus Salkeld
f0104b6d31 Add .gitignore files.
Otherwise "git status" is a pain.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@edhat.com>
2010-10-21 07:43:46 -07:00
Angus Salkeld
a166db335b CTS: add sam/wd integration tests.
- fix send_dynamic() exception
- fix basic sam integration test
- fixup calls to sam tests
- fix startup when using testquorum (currently only handles votequorum)
- improve SAM test case with better checking.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3056 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-09-27 21:14:59 +00:00
Jan Friesse
1a32fc4a6c SAM Confdb integration
Patch add support for Confdb integration with SAM. It's now possible to
use SAM_RECOVERY_POLICY_CONFDB as flag to previous policies.
    
Also new function sam_mark_failed is added for ability to use RECOVERY
policy together with confdb and get expected results (specially with
integration with corosync watchdog)

Patch also makes SAM thread safe.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3050 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-09-27 07:34:21 +00:00
Steven Dake
4ac55e52e4 Patch from Kacper Kowalik to support honoring user defined LDFLAGS.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3042 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-09-14 18:10:12 +00:00
Angus Salkeld
c77d601667 CTS: add a test case for Andrew's bug
Bug:
sometimes shutdown can take a long time if all nodes
are shutdown together.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2994 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-07-16 02:13:04 +00:00
Angus Salkeld
f113c5b130 Disable test while I fix it.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2921 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-06 22:17:51 +00:00
Angus Salkeld
5e1bac5877 temporarily remove a cts test case.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2918 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-02 03:18:10 +00:00
Angus Salkeld
a5d6c5f151 makefile: add -lquorum -lcoroipcc to sam test programs
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2905 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-21 08:53:52 +00:00
Angus Salkeld
48aff01d75 CTS: fix test_agent start/stop errors
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2813 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-12 09:25:18 +00:00
Angus Salkeld
09615628b1 CTS: fix test service configuration
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2812 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-12 09:24:43 +00:00
Angus Salkeld
1cdad3104c Fix "mock --with testagents"
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2798 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-04 00:50:24 +00:00
Angus Salkeld
a523bf183d CTS: reproduce David's bug
This patch creates a test case the runs the following steps:
1: start all nodes
2: isolate node n1
3: Kill corosync on n1
4: unisolate node n1
5: start corosync on n1
6: start cpg on all nodes
7: isolate node n1
8: Kill corosync on n1
9: unisolate node n1
10: start corosync on n1
11: Waiting for config change on n2




git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2797 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-03 10:59:00 +00:00
Angus Salkeld
b0fa7a7d97 CTS: increase the token timeout on some tests
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2784 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-22 22:18:09 +00:00
Angus Salkeld
23b3dc7914 CTS: add CpgCfgChgOnNodeRestart
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2783 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-22 22:16:18 +00:00
Angus Salkeld
ef842e8773 CTS: update the CTS README
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2766 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-15 23:19:23 +00:00
Angus Salkeld
22b7e4bbea CTS: make record events blocking
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2765 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-15 23:16:52 +00:00
Angus Salkeld
aa2784ad67 CTS: add context get/set tests.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2764 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-15 23:15:59 +00:00
Angus Salkeld
8c476ce395 CTS: fix the test_agent start/stop/status mechanism.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2763 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-15 23:05:59 +00:00
Angus Salkeld
7face93bd8 CTS: add quorum notifications to test agents.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2761 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-14 01:43:52 +00:00
Angus Salkeld
6eb20099a4 CTS: add simul start/stop to GenTestClasses
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2760 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-14 01:43:06 +00:00
Angus Salkeld
4863b8bb4a CTS: make the extra config tests named
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2759 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-14 01:42:21 +00:00
Angus Salkeld
d312db330f CTS: add --rrp-bindaddr to enable rrp tests.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2758 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-14 01:41:35 +00:00
Angus Salkeld
efccdcf140 Add missing cts files.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2751 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 21:38:38 +00:00
Angus Salkeld
621a7c0ee1 CTS: add votequorum test agent
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2747 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 07:20:57 +00:00
Angus Salkeld
0ffd872fef CTS: add some more confdb tests
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2745 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 07:18:10 +00:00
Angus Salkeld
afc6b1a1e6 CTS: add sam tests
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2744 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 07:16:43 +00:00
Angus Salkeld
7afd625183 CTS: add cpg_zcb tests
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2743 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 07:14:28 +00:00
Angus Salkeld
15afe1d192 CTS: add a test for sync events
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2742 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 07:11:56 +00:00
Angus Salkeld
c8cdc2e2de fix 'make distcheck'
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2738 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:42:09 +00:00
Angus Salkeld
ab4c8434a8 CTS: get some more code to execute.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2737 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:22:40 +00:00
Angus Salkeld
988be543cf CTS: Add a condb test agent and python tests.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2736 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:22:00 +00:00
Angus Salkeld
8df2e184f9 CTS: Add a confdb test agent and python tests.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2735 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:21:22 +00:00
Angus Salkeld
831284cec2 CTS: fix issues with new pacemaker cts
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2734 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:20:24 +00:00
Angus Salkeld
1d24acdeb9 CTS: restruct tests so we can run them with multiple configs
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2733 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:18:09 +00:00
Angus Salkeld
3eead28e17 CTS: add service load/unload test
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2730 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:15:45 +00:00
Angus Salkeld
44e7eb5ca0 CTS: Add tests with more totem options.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2728 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:13:45 +00:00
Angus Salkeld
75dc6e1492 CTS: Add msg sha1 checking of the message body (like cpgverify)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2726 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-24 22:12:09 +00:00
Angus Salkeld
b5a9d81f1f CTS: fix buffer overrun in test agent.
Also to make debugging easier:
1) don't stop abrt
2) fix debug message
3) catch a failed mesage to the TA and fail the test.




git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2680 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-10 23:29:41 +00:00
Angus Salkeld
1924e328ca CTS: fix deletion of the tmp root for augeas
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2679 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-10 23:28:06 +00:00
Steven Dake
9e6ef83d61 Turn executable bit on for py/sh scripts in cts.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2671 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-03 08:10:30 +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