nfstest_lock: Key Error: 'fcntl'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jorge-

Disclaimer: I know only enough about Python to be rather dangerous.

Recently I noticed that nfstest_lock has started failing.

    FAIL: Traceback (most recent call last):
            File "/data/nfstest/test/./nfstest_lock", line 1344, in <module>
              x.lock_setup(nfiles=1)
              ~~~~~~~~~~~~^^^^^^^^^^
            File "/data/nfstest/test/./nfstest_lock", line 397, in
lock_setup
              self.create_proc_info(nfsopt_item)
              ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
            File "/data/nfstest/test/./nfstest_lock", line 445, in
create_proc_info
              pinfo = self.start_rexec(clientobj)
            File "/data/nfstest/test/./nfstest_lock", line 424, in
start_rexec
              execobj.rimport("fcntl", ["fcntl", "F_SETLK"])
              ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/data/nfstest/nfstest/rexec.py", line 449, in rimport
              self.rexec("globals()['%s']=locals()['%s']" % (item, item))
              ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/data/nfstest/nfstest/rexec.py", line 413, in rexec
              return self._send_cmd("exec", expr)
                     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^
            File "/data/nfstest/nfstest/rexec.py", line 350, in _send_cmd
              return self.results()
                     ~~~~~~~~~~~~^^
            File "/data/nfstest/nfstest/rexec.py", line 401, in results
              raise out
          KeyError: 'fcntl'

The code in question is:

    def start_rexec(self, clientobj):
        """Start remote procedure server locally or on the host given by
           the client object.
           Set up the remote server with helper functions to lock and
           unlock a file.

           clientobj:
               Client object where the remote procedure server will be
started
        """
        # Start remote procedure server on given client
        execobj = self.create_rexec(clientobj.host)

        # Setup function to lock and unlock a file
        execobj.rimport("fcntl", ["fcntl", "F_SETLK"])
        execobj.rimport("struct")
        execobj.rimport("signal")
        execobj.rcode(getlock)
        # Set SIGALRM handler to do nothing but not ignoring the signal
        # just to interrupt a blocked lock
        execobj.reval("signal.signal(signal.SIGALRM, lambda
signum,frame:None)")
        return ProcInfo(clientobj, execobj)

Some brief web searching suggests that create_rexec might come from the
deprecated Python 2 module "rexec". This failure was observed on a
Fedora 41 system, it has no Python 2 installed.

Have we hit the end of life for the rexec module?


-- 
Chuck Lever





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux