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

store JobID of program that created file in inodes at create time

Details

    • 9223372036854775807

    Description

      It would be useful to store the JobID that created a file in an xattr on the MDT inode. This would allow tracking the source of files after the fact, and can help users with the provenance of their file data (e.g. which run the files came from, which can then be used to determine runtime parameters used, whether the run was successful or not, etc.).

      It isn't clear whether this would be needed on the OST inodes as well, but I think initially the MDT inode would be enough, as this would be the only xattr visible to users. The OST xattr would only be accessible for low-level scanning tools.

      Attachments

        Issue Links

          Activity

            [LU-13031] store JobID of program that created file in inodes at create time
            adilger Andreas Dilger added a comment - - edited

            One related improvement that just came up (unfortunately) at some site is how to track down which client/process has deleted files in the filesystem. It would be useful to store a separate jobid xattr into the inode at unlink time for forensic purposes - LU-17648.

            adilger Andreas Dilger added a comment - - edited One related improvement that just came up (unfortunately) at some site is how to track down which client/process has deleted files in the filesystem. It would be useful to store a separate jobid xattr into the inode at unlink time for forensic purposes - LU-17648 .

            "Thomas Bertschinger <bertschinger@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53367
            Subject: LU-13031 ofd: add jobid xattr to ost object
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: a3bfb3d3739574bf298fb875257dcaab8bc77a61

            gerrit Gerrit Updater added a comment - "Thomas Bertschinger <bertschinger@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53367 Subject: LU-13031 ofd: add jobid xattr to ost object Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: a3bfb3d3739574bf298fb875257dcaab8bc77a61

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52332/
            Subject: LU-13031 tests: avoid new user xattr in interop
            Project: fs/lustre-release
            Branch: b2_15
            Current Patch Set:
            Commit: fac50dcc27f09384981d995e1234943f06a17969

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52332/ Subject: LU-13031 tests: avoid new user xattr in interop Project: fs/lustre-release Branch: b2_15 Current Patch Set: Commit: fac50dcc27f09384981d995e1234943f06a17969

            No rush. For some reason I thought this was part of the original implementation, but upon looking at the patch again I saw it was only on the MDT inode.

            I think it makes sense to put this in ofd_attr_handle_id() where it is initializing the object ownership the first time the OST object is written to (in the "if (mask != 0)" block if it cleared the SUID/SGID bits). That allows a "one shot" setting of the user.job xattr without having to check each time whether it exists or not. The parameter obdfilter.*.jobid_xattr should be used like mdt.*.jobid_xattr to control the xattr name.

            adilger Andreas Dilger added a comment - No rush. For some reason I thought this was part of the original implementation, but upon looking at the patch again I saw it was only on the MDT inode. I think it makes sense to put this in ofd_attr_handle_id() where it is initializing the object ownership the first time the OST object is written to (in the " if (mask != 0) " block if it cleared the SUID / SGID bits). That allows a "one shot" setting of the user.job xattr without having to check each time whether it exists or not. The parameter obdfilter.*.jobid_xattr should be used like mdt.*.jobid_xattr to control the xattr name.

            Hi Andreas,

            I'd be willing to work on adding that in. I'm pretty busy at the moment so I likely won't be able to start working on it for 2-3 weeks, but if it can wait that long I'm happy to give it a shot.

            bertschinger Thomas Bertschinger added a comment - Hi Andreas, I'd be willing to work on adding that in. I'm pretty busy at the moment so I likely won't be able to start working on it for 2-3 weeks, but if it can wait that long I'm happy to give it a shot.

            Thomas, I just realized that this is storing the xattr on the MDT inode, but it would also be useful if the same xattr was also stored on the OST objects for debugging/scanning/recovery purposes. Is this something that you would be interested to work on?

            adilger Andreas Dilger added a comment - Thomas, I just realized that this is storing the xattr on the MDT inode, but it would also be useful if the same xattr was also stored on the OST objects for debugging/scanning/recovery purposes. Is this something that you would be interested to work on?

            "Xing Huang <hxing@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52332
            Subject: LU-13031 tests: avoid new user xattr in interop
            Project: fs/lustre-release
            Branch: b2_15
            Current Patch Set: 1
            Commit: ed56abd1070e9812e55728b14c760580b03074e0

            gerrit Gerrit Updater added a comment - "Xing Huang <hxing@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52332 Subject: LU-13031 tests: avoid new user xattr in interop Project: fs/lustre-release Branch: b2_15 Current Patch Set: 1 Commit: ed56abd1070e9812e55728b14c760580b03074e0

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52095/
            Subject: LU-13031 tests: skip sanity/test_205h,205i in interop
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: a6df532162556028c2ab9b974989fc0cca68d4fe

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52095/ Subject: LU-13031 tests: skip sanity/test_205h,205i in interop Project: fs/lustre-release Branch: master Current Patch Set: Commit: a6df532162556028c2ab9b974989fc0cca68d4fe

            "Thomas Bertschinger <bertschinger@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52095
            Subject: LU-13031 tests: skip sanity/test_205h,205i in interop
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 1532029b43cfdc41b6747ea2d4076f12d28e8be0

            gerrit Gerrit Updater added a comment - "Thomas Bertschinger <bertschinger@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52095 Subject: LU-13031 tests: skip sanity/test_205h,205i in interop Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 1532029b43cfdc41b6747ea2d4076f12d28e8be0
            adilger Andreas Dilger added a comment - - edited

            The version_code helper supports 4-component version numbers, so since this is being done after the landing it is helpful to include the full version from "git describe" of the commit hash of the patch itself. If it were before landing it could use the 4-component version of the patch before landing, even though it is slightly inaccurate..

            It is also helpful to include a brief description of why the test is being skipped. Please see some examples in patch https://review.whamcloud.com/52009 "LU-16097 tests: skip quota subtests in interop".

            adilger Andreas Dilger added a comment - - edited The version_code helper supports 4-component version numbers, so since this is being done after the landing it is helpful to include the full version from " git describe " of the commit hash of the patch itself. If it were before landing it could use the 4-component version of the patch before landing, even though it is slightly inaccurate.. It is also helpful to include a brief description of why the test is being skipped. Please see some examples in patch https://review.whamcloud.com/52009 " LU-16097 tests: skip quota subtests in interop ".

            People

              bertschinger Thomas Bertschinger
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: