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

Self-built lustre-client-dkms requires /usr/bin/python2

Details

    • Question/Request
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      RHEL 9 and its derivatives are no longer distributed with python 2. Two scripts specify python2 as their interpreter:
      contrib/scripts/gerrit_checkpatch.py
      lustre/scripts/zfsobj2fid
      I did attempt to create the distribution with tests and i/o kit disabled, but the lustre-client-dkms RPM still required /usr/bin/python2.
      I modified the interpreter to python3 for those scripts and tested. The RPM will no longer requires /usr/bin/python2 and can then be installed on rocky9.

      #!/usr/bin/env python2
      

      becomes:

      #!/usr/bin/env python3
      

      When I looked for previous issues related to this, it appeared that 'python' was changed to 'python2' for debian builds. I didn't test these scripts with python3.

      Attachments

        Issue Links

          Activity

            [LU-16242] Self-built lustre-client-dkms requires /usr/bin/python2

            This was fixed on master via patch https://review.whamcloud.com/50241 "LU-16626 build: remove python2 dependencies".

            adilger Andreas Dilger added a comment - This was fixed on master via patch https://review.whamcloud.com/50241 " LU-16626 build: remove python2 dependencies ".
            jstroik Jesse Stroik added a comment - - edited

            I have not tested these scripts.

            pylint suggests minor changes are needed lustre/scripts/zfsobj2fid.  It looks like someone might have already updated this script and added pout.decode() call that I would have missed. It's in the LLNL lustre-tools repo

            The other script, contrib/scripts/gerrit_checkpatch.py, looks more involved. I'm not a python programmer so I don't think I'd be a good choice to cobble together changes to that

            jstroik Jesse Stroik added a comment - - edited I have not tested these scripts. pylint suggests minor changes are needed lustre/scripts/zfsobj2fid.  It looks like someone might have already updated this script and added pout.decode() call that I would have missed. It's in the LLNL lustre-tools repo The other script, contrib/scripts/gerrit_checkpatch.py, looks more involved. I'm not a python programmer so I don't think I'd be a good choice to cobble together changes to that

            Yes please push the patches. I would be great to drop python2.

            simmonsja James A Simmons added a comment - Yes please push the patches. I would be great to drop python2.

            Hi Jesse, could you please push a patch for changing these tools to use python3. Have you actually tried running them after changing the python version? I'm not much of a python person myself, but know that they may need minor updates to work with the new version.

            adilger Andreas Dilger added a comment - Hi Jesse, could you please push a patch for changing these tools to use python3. Have you actually tried running them after changing the python version? I'm not much of a python person myself, but know that they may need minor updates to work with the new version.
            jstroik Jesse Stroik added a comment -

            RHEL 9 and its derivatives are no longer distributed with python 2. Two scripts specify python2 as their interpreter:

            contrib/scripts/gerrit_checkpatch.py

            lustre/scripts/zfsobj2fid

            I did attempt to create the distribution with tests and i/o kit disabled, but the lustre-client-dkms RPM still required /usr/bin/python2.

            I modified the interpreter to python3 for those scripts and tested. The RPM will no longer requires /usr/bin/python2 and can then be installed on rocky9. 

            #!/usr/bin/env python2

            becomes:

            #!/usr/bin/env python3

            When I looked for previous issues related to this, it appeared that 'python' was changed to 'python2' for debian builds. I didn't test these scripts with python3.

            jstroik Jesse Stroik added a comment - RHEL 9 and its derivatives are no longer distributed with python 2. Two scripts specify python2 as their interpreter: contrib/scripts/gerrit_checkpatch.py lustre/scripts/zfsobj2fid I did attempt to create the distribution with tests and i/o kit disabled, but the lustre-client-dkms RPM still required /usr/bin/python2. I modified the interpreter to python3 for those scripts and tested. The RPM will no longer requires /usr/bin/python2 and can then be installed on rocky9.  #!/usr/bin/env python2 becomes: #!/usr/bin/env python3 When I looked for previous issues related to this, it appeared that 'python' was changed to 'python2' for debian builds. I didn't test these scripts with python3.

            People

              wc-triage WC Triage
              jstroik Jesse Stroik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: