Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-16743

nfs client sometimes does not reuse source port after a disconnection

    • rhel-sst-filesystems
    • ssg_filesystems_storage_and_HA
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      After a disconnection, under some circumstances the client may not always reuse the source tcp port.

       

      Please provide the package NVR for which bug is seen:

      kernel-4.18.0-477.26.1.el8_8.x86_64

       

      How reproducible:

      easy

      Steps to reproduce

      on the nfs server:

      # echo 4 > /proc/fs/nfsd/threads
      # echo 4 > /proc/fs/nfsd/max_connections
      add 5 IPs to the network interface
      # ip addr add dev bond0 192.168.122.101
      # ip addr add dev bond0 192.168.122.102
      # ip addr add dev bond0 192.168.122.103
      # ip addr add dev bond0 192.168.122.104
      # ip addr add dev bond0 192.168.122.105

       

      nfs client 1

      # mount server:/exports /mnt/tmp -overs=3
      # echo foo > /mnt/tmp/testfile ; while [[ 42 ]] ; do mv -f /mnt/tmp/testfile /mnt/tmp/testfile2 || break ; mv -f /mnt/tmp/testfile2 /mnt/tmp/testfile || break ; echo -n . ; done

       

      nfs client 2

      # mkdir -p /mnt/tmp/mount{1,2,3,4,5}
      # mount 192.168.122.101:/exports /mnt/tmp/mount1 -overs=3,noac
      # mount 192.168.122.102:/exports /mnt/tmp/mount2 -overs=3,noac
      # mount 192.168.122.103:/exports /mnt/tmp/mount3 -overs=3,noac
      # mount 192.168.122.104:/exports /mnt/tmp/mount4 -overs=3,noac
      # mount 192.168.122.105:/exports /mnt/tmp/mount5 -overs=3,noac
      # while [[ 42 ]] ; do stat /mnt/tmp/mount* >/dev/null ; sleep 1 ; done

      Expected results

      The clients reuse the source port, so the DRC can reply correctly to the 'mv' (RENAME)

       

      Actual results

      The client doing the 'mv' changes source port when reconnecting, so a replayed RENAME is not matched in the DRC:

       # echo foo > /mnt/vm23/testfile ; while [[ 42 ]] ; do mv -f /mnt/vm23/testfile /mnt/vm23/testfile2 || break ; mv -f /mnt/vm23/testfile2 /mnt/vm23/testfile || break ; echo -n . ; done
      ..........................................................................................mv: cannot stat '/mnt/vm23/testfile2': No such file or directory
      

        1. RHEL-16743.pcap
          486 kB
          Frank Sorenson

              nfs-team-list NFS Team
              rhn-support-fsorenso Frank Sorenson
              NFS Team NFS Team
              Zhi Li Zhi Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: