ExportXMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • Lustre 2.10.1, Lustre 2.11.0
    • Affects Version/s: Lustre 2.8.0
    • Environment:
      lustre-2.8.0_8.chaos
    • 3
    • 9223372036854775807

      lfs changelog <mdtname>
      

      parses the index of mdtname incorrectly, causing it to fetch the wrong changelog entries if the index contains letters [A-F] (e.g. lquake-MDT000A).

      The error appears to be here:

      diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c
      index 9301383..38e2085 100644
      --- a/lustre/utils/liblustreapi.c
      +++ b/lustre/utils/liblustreapi.c
      @@ -3985,7 +3985,7 @@ int root_ioctl(const char *mdtname, int opc, void *data, int *mdtidxp,
                               return -EINVAL;
                       ptr = fsname + strlen(fsname) - 8;
                       *ptr = '\0';
      -                index = strtol(ptr + 4, NULL, 10);
      +                index = strtol(ptr + 4, NULL, 16);
                       rc = get_root_path(WANT_FD | want_error, fsname, &fd, NULL, -1);
               }
               if (rc < 0) {
      

      It looks like this error is present in Lustre 2.9 as well. Master exposes changelogs using the MDT name itself, not just the index, and may not have this issue.

            Assignee:
            Emoly Liu
            Reporter:
            Olaf Faaland
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: