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

LNet: Problem handling error when lnet_check_routes() fail.

    XMLWordPrintable

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

          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: