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

LNet: Problem handling error when lnet_check_routes() fail.

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.7.0
    • None
    • 3
    • 17068

    Description

      In LNetCtl():

                      LNET_MUTEX_LOCK(&the_lnet.ln_api_mutex);
                      rc = lnet_add_route(config->cfg_net,
                                          config->cfg_config_u.cfg_route.rtr_hop,
                                          config->cfg_nid,
                                          config->cfg_config_u.cfg_route.
                                              rtr_priority);
                      LNET_MUTEX_UNLOCK(&the_lnet.ln_api_mutex);
                      return (rc != 0) ? rc : lnet_check_routes();
      

      If lnet_check_routes() returns error, it means the route just added was invalid and must be removed, see LNetNIInit(). It's wrong to just return the error to user space:
      1. User space would treat the error as a failure to add the route, but the route was indeed added already.
      2. Two conflicting routes now live in the routing table.

      Attachments

        Activity

          [LU-6128] LNet: Problem handling error when lnet_check_routes() fail.
          pjones Peter Jones added a comment -

          Landed for 2.7

          pjones Peter Jones added a comment - Landed for 2.7

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13445/
          Subject: LU-6128 lnet: handle lnet_check_routes() errors
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: b53998fdcc70c2f58bf436c318a0165f0f5ce224

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13445/ Subject: LU-6128 lnet: handle lnet_check_routes() errors Project: fs/lustre-release Branch: master Current Patch Set: Commit: b53998fdcc70c2f58bf436c318a0165f0f5ce224

          Amir Shehata (amir.shehata@intel.com) uploaded a new patch: http://review.whamcloud.com/13445
          Subject: LU-6128 lnet: handle lnet_check_routes() errors
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: f628bdd8d240b135c92996a910ba200e0c7279e1

          gerrit Gerrit Updater added a comment - Amir Shehata (amir.shehata@intel.com) uploaded a new patch: http://review.whamcloud.com/13445 Subject: LU-6128 lnet: handle lnet_check_routes() errors Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: f628bdd8d240b135c92996a910ba200e0c7279e1

          I think the correct action would be to remove the route just added and return the error from lnet_check_routes().

          isaac Isaac Huang (Inactive) added a comment - I think the correct action would be to remove the route just added and return the error from lnet_check_routes().

          People

            ashehata Amir Shehata (Inactive)
            ashehata Amir Shehata (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: