Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-8091

server_lsi2mti() should return error when fail to get nid

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.9.0
    • None
    • None
    • 3
    • 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;
                      }
              }
      

      Attachments

        Activity

          People

            niu Niu Yawei (Inactive)
            niu Niu Yawei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: