RETURN(0);
}
-/* rc=0 means ok */
+/* rc=0 means ok
+ 1 means update
+ -1 means error */
static int mgs_check_target(struct obd_device *obd, struct mgs_target_info *mti)
{
int rc;
rc = mgs_check_index(obd, mti);
if (rc == 0) {
- LCONSOLE_ERROR("Index for %s has disappeared! "
- "Regenerating this portion of the logs."
- "\n", mti->mti_svname);
- mti->mti_flags |= LDD_F_UPDATE;
- rc = 1;
+ LCONSOLE_ERROR("%s claims to have registered, but this MGS "
+ "does not know about it. Resolve this issue "
+ "with tunefs.lustre on that device\n",
+ mti->mti_svname);
+ rc = -EINVAL;
} else if (rc == -1) {
LCONSOLE_ERROR("Client log %s-client has disappeared! "
"Regenerating all logs.\n",
rc = mgs_check_failnid(obd, mti);
}
-
RETURN(rc);
}
mti->mti_svname, obd_export_nid2str(req->rq_export));
rc = mgs_check_target(obd, mti);
/* above will set appropriate mti flags */
- if (!rc)
- /* Nothing wrong, don't revoke lock */
+ if (rc <= 0)
+ /* Nothing wrong, or fatal error */
GOTO(out_nolock, rc);
}
}
GOTO(out, rc);
}
+ if (rc == -EINVAL) {
+ LCONSOLE_ERROR("The MGS is refusing to allow this server (%s) "
+ "to start. Please see messages on the MGS node."
+ "\n", lsi->lsi_ldd->ldd_svname);
+ GOTO(out, rc);
+ }
/* Let the target look up the mount using the target's name
(we can't pass the sb or mnt through class_process_config.) */