[LU-8091] server_lsi2mti() should return error when fail to get nid Created: 03/May/16 Updated: 16/May/16 Resolved: 16/May/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Niu Yawei (Inactive) | Assignee: | Niu Yawei (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
server_lsi2mti() doesn't return error even if no proper nid is initialized in mti_nids, that would leads to target registered successfully with an illegal empty nid. I think server_lsi2mti() should return error if mti_nid_count == 0 after the following loop: while (LNetGetId(i++, &id) != -ENOENT) { if (LNET_NETTYP(LNET_NIDNET(id.nid)) == LOLND) continue; /* server use --servicenode param, only allow specified * nids be registered */ if ((lsi->lsi_lmd->lmd_flags & LMD_FLG_NO_PRIMNODE) != 0 && class_match_nid(lsi->lsi_lmd->lmd_params, PARAM_FAILNODE, id.nid) < 1) continue; /* match specified network */ if (!class_match_net(lsi->lsi_lmd->lmd_params, PARAM_NETWORK, LNET_NIDNET(id.nid))) continue; mti->mti_nids[mti->mti_nid_count] = id.nid; mti->mti_nid_count++; if (mti->mti_nid_count >= MTI_NIDS_MAX) { CWARN("Only using first %d nids for %s\n", mti->mti_nid_count, mti->mti_svname); break; } } |
| Comments |
| Comment by Gerrit Updater [ 03/May/16 ] |
|
Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/19933 |
| Comment by Gerrit Updater [ 16/May/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/19933/ |
| Comment by Peter Jones [ 16/May/16 ] |
|
Landed for 2.9 |