In the situation when config includes SKIP records
for command add mdc. LWP config processing interprets
add_conn as valid and fails to add connection because
there is no LWP device.
lustre_lwp_add_conn()) lustre-OST0000: can't find lwp device.
server_start_targets()) lustre-OST0000: failed to start LWP: -2
The fix adds checking for CFG_F_MARKER and CFG_F_SKIP before
adding connection. These flags shows that marker was not in SKIP
state, device and uuid was added.
Cray-bug-id: LUS-7933
Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: Idbf709bb46a0be958946048fb16d3b622d2edd1f
Reviewed-on: https://review.whamcloud.com/36391
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
if (!is_mdc_device(devname))
break;
+ if (!(cfg->cfg_flags & CFG_F_MARKER)) {
+ CDEBUG(D_CONFIG, "Skipping add_conn for %s, rec %d\n",
+ devname, rec->lrh_index);
+ break;
+ }
+
+ /* add_conn should follow by add_uuid. This
+ * guarantee lwp device was created
+ */
+ if (!(cfg->cfg_flags & CFG_F_SKIP)) {
+ CWARN("Error at config for %s rec %d, add_conn should follow by add_uuid\n",
+ devname, rec->lrh_index);
+ break;
+ }
ptr = strrchr(devname, '-');
if (ptr == NULL)
break;