[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-101-g2616afb

Mike Christie michaelc at cs.wisc.edu
Mon May 2 18:56:43 UTC 2011


The following commit has been merged in the upstream-mnc branch:
commit e7e02472195240471d6f702f012f9d85bfacf124
Author: Mike Christie <michaelc at cs.wisc.edu>
Date:   Wed Mar 9 23:43:05 2011 -0600

    iscsid: retry initial connect
    
    If the initial connect fails we return immediately. We should
    retry for the login_retry * login_timeout period specified by
    the user.

diff --git a/usr/initiator.c b/usr/initiator.c
index b1cbc9e..5eb05b5 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
@@ -1719,19 +1719,22 @@ session_login_task(node_rec_t *rec, queue_task_t *qtask)
 		return ISCSI_ERR_LOGIN;
 	}
 
-	conn->state = STATE_XPT_WAIT;
-	if (iscsi_conn_connect(conn, qtask)) {
-		__session_destroy(session);
-		return ISCSI_ERR_TRANS;
-	}
-
 	if (gettimeofday(&conn->initial_connect_time, NULL))
 		log_error("Could not get initial connect time. If "
 			  "login errors iscsid may give up the initial "
 			  "login early. You should manually login.");
 
+	conn->state = STATE_XPT_WAIT;
 	qtask->rsp.command = MGMT_IPC_SESSION_LOGIN;
 	qtask->rsp.err = ISCSI_SUCCESS;
+
+	if (iscsi_conn_connect(conn, qtask)) {
+		log_debug(4, "Initial connect failed. Waiting %u seconds "
+			  "before trying to reconnect.\n",
+			  ISCSI_CONN_ERR_REOPEN_DELAY);
+		queue_delayed_reopen(qtask, ISCSI_CONN_ERR_REOPEN_DELAY);
+	}
+
 	return ISCSI_SUCCESS;
 }
 

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list