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

nfsserver fails to stop when `nfsv4_only=true`

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-9.6
    • rhel-8.10, rhel-9.5
    • resource-agents
    • None
    • resource-agents-4.10.0-66.el9
    • No
    • Moderate
    • rhel-sst-high-availability
    • ssg_filesystems_storage_and_HA
    • 13
    • 26
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

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

      The resource-agent "nfsserver" fails to stop when `nfsv4_only=true`.

      What is the impact of this issue to you?

      A cluster node will be fenced because the resource-agent fails to successfully stop.

      Please provide the package NVR for which the bug is seen:

      resource-agents-4.9.0-54.el8_10.1.x86_64

      How reproducible is this bug?:

      Happens every time

      Steps to reproduce

      1.  # pcs resource create nfs-daemon nfsserver nfs_no_notify=true nfsv4_only=true nfs_shared_infodir=/nfsmq/nfsinfo --group nfsgroup
      2.  # pcs resource disable nfs-daemon

      Expected results

      The resource nfsserver should successfully stop.

      Actual results

      The resource nfsserver fails when it is stopped.

      For example:

       

      # pcs resource debug-stop nfs-daemon
      Operation force-stop for nfs-daemon (ocf:heartbeat:nfsserver) returned 1 (error: Failed to unmount a bind mount)
      [.....]
      + 14:29:52: remove_unshare_uts_dropins:749: false
      + 14:29:52: nfsserver_stop:1015: return 1
      

       

       

      Then we can see that rpc-statd.service is what process that is still using the filesystem that failed to unmount because that service was never stopped when we try to stop the nfsserver resource-agent.

      1. lsof /var/lib/nfs
        COMMAND     PID    USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
        rpc.statd 39990 rpcuser  cwd    DIR  253,7       56 12583040 /var/lib/nfs/statd

       

      The reason that the nfsserver fails to stop when the attribute nfsv4_only=true is enabled is because it does not stop or start the systemd service rpc-statd.service when that attribute is enabled.

      The system service rpc-statd.service is always started because it is a dependency of the systemd service nfs-server.service that is started when the resource-agent nfsserver is started.

       

      # systemctl list-dependencies nfs-server | grep rpc-statd
      ● ├─rpc-statd-notify.service
      ● ├─rpc-statd.service

       

       

       

      Workaround is to stop rpc-statd.service before stopping the resource-agent nfsserver.

              rhn-engineering-oalbrigt Oyvind Albrigtsen
              rhn-support-sbradley Shane Bradley
              Oyvind Albrigtsen Oyvind Albrigtsen
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: