[sheepdog] [PATCH 4/9] sheep: exit program when EIO occurs

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Sep 17 00:59:57 CEST 2012


When EIO occurs, a sheep is expected to become a gateway node, but it
doesn't work now.  To fix this, we need to support changing virtual
nodes without stopping sheeps.  This patch makes it a future work, and
stops the program simply on the EIO error.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/request.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sheep/request.c b/sheep/request.c
index bd7d663..91a84b5 100644
--- a/sheep/request.c
+++ b/sheep/request.c
@@ -51,6 +51,8 @@ static void io_op_done(struct work *work)
 
 		eprintf("leaving sheepdog cluster\n");
 		leave_cluster();
+		/* TODO: make this node work as a gateway */
+		exit(1);
 	}
 
 	put_request(req);
@@ -90,6 +92,8 @@ static void gateway_op_done(struct work *work)
 		if (is_access_local(req, hdr->obj.oid)) {
 			eprintf("leaving sheepdog cluster\n");
 			leave_cluster();
+			/* TODO: make this node work as a gateway */
+			exit(1);
 			goto retry;
 		}
 		break;
-- 
1.7.2.5




More information about the sheepdog mailing list