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

sanity test_413k: qos_exclude_patterns broken by test restore

XMLWordPrintable

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

      sanity test_413k "QoS mkdir exclude prefixes" fails intermittently with:

      sanity test_413k: @@@@@@ FAIL: d413k.sanity on MDT1, _temporary on MDT2
      

      It passes on a fresh mount, but fails on every later run on the same client once test_413l has run, e.g. repeating ONLY="413k 413l" sanity.sh without remounting gives PASS, FAIL, FAIL.

      Root cause: test_413k/413l save the exclude list with lctl get_param -n lmv..qos_exclude_patterns, which prints one pattern per line, and restore it with lctl set_param. The write handler in lproc_lmv.c only splits on ':', so the restore stores "_temporary<newline>_temporary." as one pattern that matches nothing, and _temporary is no longer excluded. The same happens with echo name > qos_exclude_patterns, which stores "name\n". Since the bogus entry ends in ".*", qos_exclude_prefixes then reads back empty, 413k saves an empty list, and lctl rejects the empty value on restore, so 413k also leaks its "abc", "123" and "foo bar" prefixes on each failed run.

      With two mounts on a client, lmv.* matches both LMV devices, so a saved list contains every pattern twice and each restore doubles the list on both devices.

      Fix:

      • treat newline as a pattern separator like ':'
      • clear the list on a write with no names and no '+'/'-' (e.g. echo > file)
      • skip adding a pattern that is already in the list
      • make sanity test_413k/413l save and restore the full qos_exclude_patterns list as a ':'-joined value
      • add sanityn test_125 to check duplicate handling with two mounts

            adilger Andreas Dilger
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: