should be installed. It is versioned separately from Lustre and
may be released separately in future.
+Severity : minor
+Frequency : only at startup
+Bugzilla : 11778
+Description: Delay client connections to MDT until fist MDT->OST connect
+Details : If a client tried to create a new file before the MDT had
+ connected to any OSTs, the create would return EIO. Now
+ the client will simply block until the MDT connects to the
+ first OST and the create can succeed.
+
Severity : normal
Frequency : only for SLES9
Bugzilla : 12543
obd_id *mds_lov_objids;
int mds_lov_objids_size;
__u32 mds_lov_objids_in_file;
- unsigned int mds_lov_objids_dirty:1;
int mds_lov_nextid_set;
struct file *mds_lov_objid_filp;
struct file *mds_health_check_filp;
struct semaphore mds_qonoff_sem;
struct semaphore mds_health_sem;
unsigned long mds_lov_objids_valid:1,
+ mds_lov_objids_dirty:1,
mds_fl_user_xattr:1,
- mds_fl_acl:1;
+ mds_fl_acl:1,
+ mds_fl_cfglog:1,
+ mds_fl_synced:1;
};
struct echo_obd {
OBD_NOTIFY_CONFIG
};
+#define CONFIG_LOG 0x1 /* finished processing config log */
+#define CONFIG_SYNC 0x2 /* mdt synced 1 ost */
+
/*
* Data structure used to pass obd_notify()-event to non-obd listeners (llite
* and liblustre being main examples).
}
+/* Collect the preconditions we need to allow client connects */
+static void mds_allow_cli(struct obd_device *obd, unsigned int flag)
+{
+ if (flag & CONFIG_LOG)
+ 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)
+ /* Open for clients */
+ obd->obd_no_conn = 0;
+}
+
struct mds_lov_sync_info {
struct obd_device *mlsi_obd; /* the lov device to sync */
struct obd_device *mlsi_watched; /* target osc */
rc);
obd_notify(mds->mds_osc_obd, watched, OBD_NOTIFY_INACTIVE,
NULL);
+ } else {
+ /* We've successfully synced at least 1 OST and are ready
+ to handle client requests */
+ mds_allow_cli(obd, CONFIG_SYNC);
}
+
class_decref(obd);
return rc;
}
case OBD_NOTIFY_SYNC_NONBLOCK:
break;
case OBD_NOTIFY_CONFIG:
- /* Open for clients */
- obd->obd_no_conn = 0;
+ mds_allow_cli(obd, (unsigned int)data);
default:
RETURN(0);
}
mutex_down(&obd->obd_dev_sem);
rc = mds_lov_update_desc(obd, obd->u.mds.mds_osc_exp);
mutex_up(&obd->obd_dev_sem);
+ mds_allow_cli(obd, CONFIG_SYNC);
RETURN(rc);
}
{
struct lustre_sb_info *lsi = s2lsi(sb);
struct obd_device *obd;
- char *niduuid, *ptr = 0;
- int i, rc = 0, len;
+ char *niduuid = 0, *ptr = 0;
+ int i, rc = 0, len = 0;
ENTRY;
if (!lsi)
}
/* log has been fully processed */
- obd_notify(obd, NULL, OBD_NOTIFY_CONFIG, 0);
+ obd_notify(obd, NULL, OBD_NOTIFY_CONFIG, (void *)CONFIG_LOG);
}
RETURN(rc);
test_5e() {
start_ost
start_mds
- # give MDS a chance to connect to OSTs (bz 10476)
- sleep 5
#define OBD_FAIL_PTLRPC_DELAY_SEND 0x506
do_facet client "sysctl -w lustre.fail_loc=0x80000506"
#reformat to remove all logs
reformat
start_mds
- echo Client mount before any osts are in the logs
+
+ echo Client mount with a running ost
+ start_ost
mount_client $MOUNT
- check_mount && return 41
+ check_mount || return 41
+ umount_client $MOUNT
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
- sleep 5 #bz10476
- check_mount || return 41
- pass
-
cleanup
}
run_test 22 "start a client before osts (should return errs)"
$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 "cat $LPROC/mdc/*/max_rpcs_in_flight" "lustre-MDT0000.mdc.max_rpcs_in_flight" || return 11
-
- zconf_umount `hostname` $MOUNT -f
cleanup_nocli
# mount a second time to make sure we didnt leave upgrade flag on
FNUM=$(($FNUM + 1))
echo -n "+"
done
+ echo
ls -l $DIR/d51 > /dev/null || error
}
run_test 51 "special situations: split htree with empty entry =="