server_lsi2mti() should return an error if no proper NID is
initialized, otherwise, target will register successfully with
an invalid empty NID.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ia5fd78e4df6344764109486ce1082099054ebf1e
Reviewed-on: http://review.whamcloud.com/19933
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
}
}
+ if (mti->mti_nid_count == 0) {
+ CERROR("Failed to get NID for server %s, please check whether "
+ "the target is specifed with improper --servicenode or "
+ "--network options.\n", mti->mti_svname);
+ RETURN(-EINVAL);
+ }
+
mti->mti_lustre_ver = LUSTRE_VERSION_CODE;
mti->mti_config_ver = 0;