[Sheepdog] [PATCH v2 5/5] sheep: use local cluster driver when corosync is not available
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Wed Nov 2 10:59:26 CET 2011
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/group.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/sheep/group.c b/sheep/group.c
index daf3db5..45ed0de 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -1332,7 +1332,13 @@ int create_cluster(int port, int64_t zone)
if (!sys->cdrv) {
sys->cdrv = find_cdrv("corosync");
- dprintf("use corosync cluster driver as default\n");
+ if (sys->cdrv)
+ dprintf("use corosync cluster driver as default\n");
+ else {
+ /* corosync cluster driver is not compiled */
+ sys->cdrv = find_cdrv("local");
+ dprintf("use local cluster driver as default\n");
+ }
}
fd = sys->cdrv->init(&handlers, sys->cdrv_option, sys->this_node.addr);
--
1.7.2.5
More information about the sheepdog
mailing list