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

lctl del_ost always prints usage on aarch64

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      jt_del_ost() stores the getopt_long() return value in a "char c". On architectures where plain char is unsigned (aarch64, ppc64le) c never equals -1, so the option loop runs past the last option into "default: return CMD_HELP", and "lctl del_ost -n -t FSNAME-OST0000" always prints the usage message.

      conf-sanity test_123ah fails on aarch64 servers with:
      del_ost --dryrun failed with 4

      x86_64 is not affected because char is signed there. The variable should be an int.

      Introduced by commit 1121816c4a4e ("LU-7668 utils: add lctl del_ost").

            wc-triage WC Triage
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: