From c6321e0b909891c32a0a262be75aa0f81bb17b73 Mon Sep 17 00:00:00 2001
From: nathan <nathan>
Date: Tue, 16 Oct 2007 18:42:37 +0000
Subject: [PATCH] b=11778 i=shadow i=adilger remove client blocking for ost
 connection

---
 lustre/mds/mds_lov.c        |  2 +-
 lustre/tests/conf-sanity.sh | 23 ++++++++++++++++++-----
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c
index 8c277e9840..6e82859180 100644
--- a/lustre/mds/mds_lov.c
+++ b/lustre/mds/mds_lov.c
@@ -651,7 +651,7 @@ static void mds_allow_cli(struct obd_device *obd, unsigned long flag)
                 obd->u.mds.mds_fl_cfglog = 1;
         if (flag & CONFIG_SYNC)
                 obd->u.mds.mds_fl_synced = 1;
-        if (obd->u.mds.mds_fl_cfglog && obd->u.mds.mds_fl_synced)
+        if (obd->u.mds.mds_fl_cfglog /* bz11778: && obd->u.mds.mds_fl_synced */)
                 /* Open for clients */
                 obd->obd_no_conn = 0;
 }
diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh
index 08c6d3237a..d089c8424f 100644
--- a/lustre/tests/conf-sanity.sh
+++ b/lustre/tests/conf-sanity.sh
@@ -782,21 +782,25 @@ test_22() {
         #reformat to remove all logs
         reformat
 	start_mds
-
-	echo Client mount with a running ost
-	start_ost
+	echo Client mount before any osts are in the logs
 	mount_client $MOUNT
-	check_mount || return 41
-	umount_client $MOUNT
+	check_mount && return 41
 	pass
 
 	echo Client mount with ost in logs, but none running
+	start_ost
 	stop_ost
 	mount_client $MOUNT
 	# check_mount will block trying to contact ost
 	umount_client $MOUNT
 	pass
 
+	echo Client mount with a running ost
+	start_ost
+	mount_client $MOUNT
+	check_mount || return 41
+	pass
+
 	cleanup
 }
 run_test 22 "start a client before osts (should return errs)"
@@ -1117,6 +1121,15 @@ test_32a() {
 	$LCTL conf_param lustre-MDT0000.failover.node=$NID || return 10
 	echo "ok."
 
+	# With a new good MDT failover nid, we should be able to mount a client
+	# (but it cant talk to OST)
+        local OLDMOUNTOPT=$MOUNTOPT
+        MOUNTOPT="exclude=lustre-OST0000"
+	mount_client $MOUNT
+        MOUNTOPT=$OLDMOUNTOPT
+	set_and_check client "cat $LPROC/mdc/*/max_rpcs_in_flight" "lustre-MDT0000.mdc.max_rpcs_in_flight" || return 11
+
+	zconf_umount `hostname` $MOUNT -f
 	cleanup_nocli
 	load_modules
 
-- 
GitLab