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

lfs hsm_* commands do not continue on error properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      When given multiple files the lfs hsm_* commands stop on the file that generates and error and do not process the remaining arguments. This is not the expected behavior of a unix/linux utility. The expected behavior is to report the error, continue with the remaining files, and exit with a non zero status. Following the expected behavior makes these commands much more useful when used in scripts or by hand.

      k:lustre# echo XXX | tee f{1,2,3}
      XXX
      k:lustre# lfs hsm_archive f{0..3}
      Cannot stat f0: No such file or directory
      k:lustre# lfs hsm_state f{0..3}
      can't get hsm state for f0: No such file or directory
      k:lustre# ls
      f1  f2  f3
      k:lustre# lfs hsm_state f{1..3}
      f1: (0x00000000)
      f2: (0x00000000)
      f3: (0x00000000)
      k:lustre# mkdir d0
      k:lustre# cp f{0..3} d0/
      cp: cannot stat ‘f0’: No such file or directory
      k:lustre# ls d0/
      f1  f2  f3
      k:lustre# rm f{0..3}
      rm: cannot remove ‘f0’: No such file or directory
      k:lustre# echo $?
      1
      k:lustre# ls f{0..3}
      ls: cannot access f0: No such file or directory
      ls: cannot access f1: No such file or directory
      ls: cannot access f2: No such file or directory
      ls: cannot access f3: No such file or directory
      

      Attachments

        Activity

          People

            wc-triage WC Triage
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: