This patchset adds shepherd: a new cluster manager specialized for sheepdog. The 4th patch actually adds shepherd, the 1st, 2nd, and 3rd do trivial preparation for it. It can pass most of the tests. But sometimes dies with undeterministic bugs. The unpassed tests are: 008 (long), 015, 043, and 044 (long). # long means the test takes more than 30 seconds. I believe current version can satisfy least quality for applying. I'm grad if I can hear your opinions. (I'm still testing and debugging it. But I have some updates related to coding style problems pointed by Liu Yuan. So I'm posting it.) changelog: v2 * lots of cleaning and bug fix * sane command line option handling * a little bit improvement of leave handling * not call sd_join_handler() in sheepkeeper_join() * add new option --enable-sheepkeeper to configure script for enable/disable building sheepkeeper v3 * lots of cleaning and bug fix * suppress some compiler warnings * handle leave of sheeps in saner way. this also reduces the problem of odd handling of return values from xread/xwrite * default log of sheepkeeper is /var/log/sheepkeeper.c, and users can specify custom location with -l option v4 * tons of cleaning and bug fix * documentation: https://github.com/mitake/sheepdog/wiki/sheepkeeper-design-note * stabilizing. The unpassed tests are: 008 (long), 015, 043, and 044 (long). v5 * rename sheepkeeper -> shepherd * a little bit cleaning * new document: https://github.com/mitake/sheepdog/wiki/shepherd-design-note v6 * fix problems of coding style pointed by Liu Yuan Hitoshi Mitake (4): move node_to_str() and str_to_node() from sheep/cluster.h to include/sheep.h move enum cluster_join_result from sheep/cluster.h to include/internal_proto.h lib: sockaddr_in_to_str(), convert sockaddr_in to string representation shepherd: a new cluster manager specialized for sheepdog .gitignore | 1 + Makefile.am | 2 +- configure.ac | 3 +- include/Makefile.am | 3 +- include/internal_proto.h | 10 + include/net.h | 1 + include/sheep.h | 36 ++ include/shepherd.h | 110 ++++++ lib/net.c | 17 + sheep/Makefile.am | 3 +- sheep/cluster.h | 46 --- sheep/cluster/shepherd.c | 704 ++++++++++++++++++++++++++++++++++++ shepherd/Makefile.am | 44 +++ shepherd/shepherd.c | 883 ++++++++++++++++++++++++++++++++++++++++++++++ 14 files changed, 1813 insertions(+), 50 deletions(-) create mode 100644 include/shepherd.h create mode 100644 sheep/cluster/shepherd.c create mode 100644 shepherd/Makefile.am create mode 100644 shepherd/shepherd.c -- 1.7.2.5 |