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

'lctl set_param -d fail_val=42' sets fail_val to 42

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • 3
    • 9223372036854775807

    Description

      The -d (for delete) option to lctl set_param should be rejected if the -P option wasn't used as well, or it should automatically imply the -P option. Currently if used alone the
      -d option is handled as a plain set param:

      # lctl set_param -d fail_val
      error: set_param: setting fail_val: no value
      # lctl set_param -d fail_val=42
      fail_val=42
      # lctl get_param fail_val
      fail_val=42
      

      Also, if a value is erroneously supplied when using -P and -d then instead of being deleted, the parameter is set to the value with a trailing '='. (The params log will contain the new value, but the param write method may reject it).

      # lctl set_param -P jobid_name=foo
      # sleep 10
      # lctl get_param jobid_name
      jobid_name=foo
      # lctl set_param -P -d jobid_name=foo
      # sleep 10
      # lctl get_param jobid_name
      jobid_name=foo=
      

      Attachments

        Issue Links

          Activity

            [LU-9544] 'lctl set_param -d fail_val=42' sets fail_val to 42
            pjones Peter Jones added a comment -

            Merged for 2.16

            pjones Peter Jones added a comment - Merged for 2.16

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/55399/
            Subject: LU-9544 utils: set -P if missing in 'set_param -d'
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: d7f8c21eed5ba232ae48863001b512c207427037

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/55399/ Subject: LU-9544 utils: set -P if missing in 'set_param -d' Project: fs/lustre-release Branch: master Current Patch Set: Commit: d7f8c21eed5ba232ae48863001b512c207427037

            "Frederick Dilger <fdilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/55399
            Subject: LU-9544 utils: lctl set_param -d fails without -P
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: ffe4b2efe9ba21409906d2ad51a2fdc6451ccf1e

            gerrit Gerrit Updater added a comment - "Frederick Dilger <fdilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/55399 Subject: LU-9544 utils: lctl set_param -d fails without -P Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: ffe4b2efe9ba21409906d2ad51a2fdc6451ccf1e

            People

              fdilger Fred Dilger
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: