diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..d853a2a6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +*.o +*.a +*.lcrso +*.so* +.deps +Makefile +Makefile.in +aclocal.m4 +autom4te.cache/ +config.guess +config.log +config.status +config.sub +configure +depcomp +install-sh +missing +tags +ID diff --git a/TODO b/TODO index 33afa173..21a7a518 100644 --- a/TODO +++ b/TODO @@ -1,25 +1,145 @@ -The Corosync Cluster Engine Work Items Requiring Attention -Last Updated: Mar 19, 2009 +------------------------------------------ +The Corosync Cluster Engine Topic Branches +------------------------------------------ -Generic Items -------------- -* doxygen-ize the include and lib directories. +-------------------------- +Last Updated: October 2010 +-------------------------- -Totem ------ -* Disallow binding to localhost interface in redundant ring configuration. -* Implement the totem multiring protocol. +We use topic branches in our git repository to develop new disruptive features +that define our future roadmap. This file describes the topic branches +the developers have interest in investigating further. -Closed Process Groups ---------------------- -* async cpg multicast. +targets can be: whitetank, needle, or future (3.0+). +Finished can be: percentage or date merged to master. -IPC ---- -* none. +------------------------------------------------------------------------------ +topic-libqb +------------------------------------------------------------------------------ +Main Developer: Angus Salkeld +Started: September 2010 +Finished: 60% +target: needle +Description: +The libqb project is our effort to remove the core infrastructure required for +client server operations of corosync from the corosync code base and place +inside a separate project. -SYNC ----- -* Forward compatible sync engine. -* Advanced Synchronization Engine needed to synchronize data without - long blocking delays during configuration changes. +The main purpose of this topic is to investigate integrating corosync with the +libqb package that has been refactored. Part of this effort also involves +investigation into single threaded operation of the IPC layer without +peformance penalties. + +------------------------------------------------------------------------------ +topic-rr +------------------------------------------------------------------------------ +Main Developer: Steven Dake +Started: Not Started +Finished: 0% +target: needle +Description: +Redundant ring may have quality problems near boundary conditions for sequence +numbers. This effort involves qualifying and hardening redundant ring around +these boundary numbers. A further stretch goal of this topic is to +automatically reenable a redundant ring when it has been back in service. + +------------------------------------------------------------------------------ +topic-snmp +------------------------------------------------------------------------------ +Main Developer: Steven Dake +Started: Not Started +Finished: 0% +target: needle +Description: +This topic involves investigation of adding SNMP support into Corosync. + +------------------------------------------------------------------------------ +topic-udpu +------------------------------------------------------------------------------ +Main Developer: Steven Dake +Started: October +Finished: 80% +target: needle +Description: +The UDPU transport mode offers a mechanism for Corosync to operate in network +environments where multicast or broadcast are prohibited. The main mechanism +it uses to do this is to UDP unicast to each of the target node IP addresses +listed in the configuation. + +------------------------------------------------------------------------------ +topic-onecrypt +------------------------------------------------------------------------------ +Main Developer: Honza Friesse +Started: not started +Finished: 0% +target: needle +Description: +Currently encryption code is located in totemudp.c, totemudpu.c, and iba has +no encryption support. This topic merges the encryption code into a new +file such as totemcrp.c and provides a mechanism for totemnet.c to register +encrypt and decrypt functions with totem[udp|iba|udpu] and use them as +requested by the configuration. + +------------------------------------------------------------------------------ +topic-netmalloc +------------------------------------------------------------------------------ +Main Developer: Steven Dake +Started: not started +Finished: 0% +target: needle +Description: +The totemiba.c driver must allocate memory and assign it to a protection domain +in order for an infiniband driver to transmit memory. In the current +implementation, totemsrp.c also allocates these same frames. This results in +an extra memcpy when transmitting with libibverbs technology. Memory copies +are to be avoided. The simple solution is to have each network driver provide +a memory allocation function. When totemsrp wants a free frame, it requests +it from the network driver. + +------------------------------------------------------------------------------ +topic-iazc +------------------------------------------------------------------------------ +Main Developer: Steven Dake +Started: not started +Finished: 0% +target: needle +Description: +The totempg.c file uses alloca/memcpy to deal with misaligned data structures +to avoid bus errors on hardware which does not support unaligned access. This +topic addresses the totempg.c code to avoid memory copies on platforms which +support unaligned access (x86/x86_64) and use the current alloca/memcpy +on platforms which don't (pretty much all other processor types). + +------------------------------------------------------------------------------ +topic-rdmaud +------------------------------------------------------------------------------ +Main Developer: Steven Dake +Started: not started +Finished: 0% +target: needle or future +Description: +Currently our RDMA code uses librdmacm to setup connections. We are not +certain this extra library is needed, and may be able to use only ibverbs. If +this is possible, the totem code may be more reliable, especially around +failure conditions. + +------------------------------------------------------------------------------ +topic-zerocopy +------------------------------------------------------------------------------ +Main Developer: Steven Dake +Started: not started +Finished: 0% +target: future +Description: +Totem has many copies involved in messaging which we would like to investigate +removing. Our goal is to deliver wire speed performance for rdma networks, +and if this can be achieved by our other topic investigations, we may not +further investigate this topic. The basic idea of the topic is to handle +message assembly/fragmentation in libcpg, and have totem be responsible for +sending these pages that are shared via posix shared memory. + +------------------------------------------------------------------------------ +other topics not yet defined: +* disallow binding to localhost interfae in redundant ring configuation. +* doxygenize include and lib directories. +* sort out binding to localhost in general diff --git a/cts/.gitignore b/cts/.gitignore new file mode 100644 index 00000000..6f99c8ff --- /dev/null +++ b/cts/.gitignore @@ -0,0 +1,2 @@ +CTSvars.py +*_test_agent diff --git a/exec/.gitignore b/exec/.gitignore new file mode 100644 index 00000000..d746f183 --- /dev/null +++ b/exec/.gitignore @@ -0,0 +1 @@ +corosync diff --git a/include/corosync/.gitignore b/include/corosync/.gitignore new file mode 100644 index 00000000..7c9b0fc9 --- /dev/null +++ b/include/corosync/.gitignore @@ -0,0 +1,3 @@ +config.h* +cs_config.h +stamp-* diff --git a/init/.gitignore b/init/.gitignore new file mode 100644 index 00000000..6ab38927 --- /dev/null +++ b/init/.gitignore @@ -0,0 +1 @@ +generic diff --git a/lcr/.gitignore b/lcr/.gitignore new file mode 100644 index 00000000..aafc88c2 --- /dev/null +++ b/lcr/.gitignore @@ -0,0 +1,3 @@ +test +test_static +uic diff --git a/man/.gitignore b/man/.gitignore new file mode 100644 index 00000000..2d19fc76 --- /dev/null +++ b/man/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/pkgconfig/.gitignore b/pkgconfig/.gitignore new file mode 100644 index 00000000..6fd0ef02 --- /dev/null +++ b/pkgconfig/.gitignore @@ -0,0 +1 @@ +*.pc diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 00000000..f5a7b95a --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,20 @@ +cpgbench +cpgbound +cpgverify +evsbench +evsverify +logsys_s +logsys_t1 +logsys_t2 +logsysbench +logsysrec +stress_cpgcontext +stress_cpgfdget +testconfdb +testcpg +testcpg2 +testevs +testquorum +testsam +testvotequorum1 +testvotequorum2 diff --git a/test/cpgverify.c b/test/cpgverify.c index c7b400a3..56a9b8b8 100644 --- a/test/cpgverify.c +++ b/test/cpgverify.c @@ -34,6 +34,7 @@ #include +#include #include #include #include @@ -102,15 +103,28 @@ static struct cpg_name group_name = { static unsigned char buffer[200000]; -int main (void) +int main (int argc, char *argv[]) { cpg_handle_t handle; cs_error_t result; - unsigned int i = 0, j; + int i = 0; + int j; struct my_msg msg; hash_state sha1_hash; struct iovec iov[2]; - int res; + const char *options = "i:"; + int iter = 1000; + int opt; + int run_forever = 1; + + while ((opt = getopt(argc, argv, options)) != -1) { + switch (opt) { + case 'i': + run_forever = 0; + iter = atoi(optarg); + break; + } + } result = cpg_initialize (&handle, &callbacks); if (result != CS_OK) { @@ -118,9 +132,9 @@ int main (void) exit (0); } - res = cpg_join (handle, &group_name); - if (res != CS_OK) { - printf ("cpg_join failed with result %d\n", res); + result = cpg_join (handle, &group_name); + if (result != CS_OK) { + printf ("cpg_join failed with result %d\n", result); exit (1); } @@ -131,7 +145,8 @@ int main (void) /* * Demonstrate cpg_mcast_joined */ - for (i = 0; i < 1000000000; i++) { + i = 0; + do { msg.msg_size = 100 + rand() % 100000; iov[1].iov_len = msg.msg_size; for (j = 0; j < msg.msg_size; j++) { @@ -149,7 +164,8 @@ try_again_one: goto try_again_one; } result = cpg_dispatch (handle, CS_DISPATCH_ALL); - } + i++; + } while (run_forever || i < iter); cpg_finalize (handle); diff --git a/tools/.gitignore b/tools/.gitignore new file mode 100644 index 00000000..aa2eb2e9 --- /dev/null +++ b/tools/.gitignore @@ -0,0 +1,7 @@ +corosync-cfgtool +corosync-cpgtool +corosync-fplay +corosync-keygen +corosync-objctl +corosync-pload +corosync-quorumtool