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

Misleading LNet Self Test message when lnet_selftest module is not loaded


    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Severity:
    • Rank (Obsolete):


      When creating an lnet self test session without the lnet_selftest module loaded I see the following message:

      -bash-4.1# lst new_session stress
      Invalid parameters list in command line

      This is misleading as the real problem is not the parameter list, but the fact that lnet_selftest is not loaded. To an uninformed user, this can be extremely confusing.

      From a quick scan of the code, the error occurs here:

       611         rc = lst_new_session_ioctl(name, timeout, force, &session_id);
       612         if (rc != 0) {
       613                 lst_print_error("session", "Failed to create session: %s\n",
       614                                 strerror(errno));
       615                 return rc;
       616         }

      Because the module is not loaded, the ioctl fails and sets errno to EINVAL. lst_print_error then interprets this error code and prints the misleading message. It would be much better if something was reported to the user which hinted at a possible unloaded module.

      Something like the following would be much better:

      -bash-4.1# lst new_session stress
      Failed to create a new session with error EINVAL. This can be caused by incorrect parameters or because the lnet_selftest module is not loaded.

      Better yet, if the ioctl fails, the lst command could parse /proc/modules to determine if lnet_selftest is loaded.




            • Assignee:
              ashehata Amir Shehata
              prakash Prakash Surya (Inactive)
            • Votes:
              0 Vote for this issue
              6 Start watching this issue


              • Created: