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

mlocate-updatedb does not update NFS mounts

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-8.9.0
    • mlocate
    • None
    • Moderate
    • rhel-sst-cs-plumbers
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • All
    • None

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

      Even with "nfs4" and "nfs"  removed from from PRUNEFS in /etc/updatedb.conf ,  mlocate-updatedb service does not update the DB with files in NFS mounts.

      A direct call of updatedb effectively adds files on NFS mounts to the DB.

      https://bugzilla.redhat.com/show_bug.cgi?id=1365662

      Please provide the package NVR for which bug is seen:

      mlocate-0.26-20.el8.x86_64

      How reproducible:

      Always

      Steps to reproduce

      1. Remove nfs nfs4 from PRUNES in /etc/updatedb.conf 
      2. add files in NFS mounts
      3. Wait for mlocate-updatedb service to execute

      Expected results

      • Files on NFS mounts added to db

        Actual results

      • Files in NFS mounts are excluded

       

      The issue is due to the file call by the service: /usr/libexec/mlocate-run-updatedb
      nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" && $2 != "zfs" { print $2 }')
      /usr/bin/updatedb -f "$nodevs"

      nfs and nfs4 appear with nodev in /proc/filesystems, so they are excuded.

      The filter should be:
      nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" && $2 != "zfs" && $2 !~ "nfs" { print $2 }') * Workaround, override the service file with:

      • systemctl edit mlocate-updatedb.service
        {{}}

      [Service]  
      ExecStart=
      ExecStart=/bin/sh -c /usr/bin/updatedb --debug-pruning -f $(awk '$1 == "nodev" && $2 != "rootfs" && $2 != "zfs" && $2 !~ "nfs" { print $2 }' /proc/filesystems) 

       

      BZ on fedora:

      https://bugzilla.redhat.com/show_bug.cgi?id=1845275

      https://bugzilla.redhat.com/show_bug.cgi?id=1365662

              msekleta@redhat.com Michal Sekletar
              rhn-support-bwelterl Benoit Welterlen
              Michal Sekletar Michal Sekletar
              RHEL CS Plumbers QE Bot RHEL CS Plumbers QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: