Root file system skipped when mlocate (updatedb) is run via systemd timer

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

 



I have several binaries matching /usr/bin/myth*. When mlocate-updatedb runs via a timer, the / file system is skipped so no files under /usr/bin are listed when I run "locate bin/myth".

$ locate bin/myth
/home/mythtv/bin/mythconverg-create
/home/mythtv/bin/mythconverg-drop
/home/mythtv/bin/mythconverg-restore
/home/ulrick/bin/mythtv-status
/home/ulrick/bin/mythtv-upcoming-recordings
/home/usr/local/bin/mythbackend-testsched
/home/usr/local/bin/mythlink.pl
/home/usr/local/bin/mythtv-status
/home/usr/local/bin/mythtvfs
/home/usr/local/sbin/myth-purge-old-db-backups
/home/usr/local/sbin/mythconverg_backup.pl
/home/usr/local/sbin/mythconverg_restore.pl

If I run /usr/libexec/mlocate-run-updatedb manually from a superuser 'bash' shell, the / file system is included so the expected files are listed by 'locate':

$ locate bin/myth
/home/mythtv/bin/mythconverg-create
/home/mythtv/bin/mythconverg-drop
/home/mythtv/bin/mythconverg-restore
/home/ulrick/bin/mythtv-status
/home/ulrick/bin/mythtv-upcoming-recordings
/home/usr/local/bin/mythbackend-testsched
/home/usr/local/bin/mythlink.pl
/home/usr/local/bin/mythtv-status
/home/usr/local/bin/mythtvfs
/home/usr/local/sbin/myth-purge-old-db-backups
/home/usr/local/sbin/mythconverg_backup.pl
/home/usr/local/sbin/mythconverg_restore.pl
/usr/bin/mytharchivehelper
/usr/bin/mythavtest
/usr/bin/mythbackend
/usr/bin/mythccextractor
/usr/bin/mythcommflag
/usr/bin/mythexternrecorder
/usr/bin/mythffmpeg
/usr/bin/mythffprobe
/usr/bin/mythfilerecorder
/usr/bin/mythfilldatabase
/usr/bin/mythfrontend
/usr/bin/mythjobqueue
/usr/bin/mythlcdserver
/usr/bin/mythmediaserver
/usr/bin/mythmetadatalookup
/usr/bin/mythpreviewgen
/usr/bin/mythpython
/usr/bin/mythreplex
/usr/bin/mythscreenwizard
/usr/bin/mythshutdown
/usr/bin/mythtranscode
/usr/bin/mythtv-setup
/usr/bin/mythtvsetup
/usr/bin/mythutil
/usr/bin/mythwelcome
/usr/bin/mythwikiscripts
/usr/bin/mythzmserver
/usr/local/bin/mythbackend-testsched
/usr/local/bin/mythlink.pl
/usr/local/bin/mythtv-status
/usr/local/bin/mythtvfs
/usr/local/sbin/myth-purge-old-db-backups
/usr/local/sbin/mythconverg_backup.pl
/usr/local/sbin/mythconverg_restore.pl

Relevant output and files:

# systemctl status mlocate-updatedb.timer
● mlocate-updatedb.timer - Updates mlocate database every day
     Loaded: loaded (/usr/lib/systemd/system/mlocate-updatedb.timer; enabled; vendor preset: enabled)
     Active: active (waiting) since Fri 2021-07-30 17:42:59 CDT; 2 days ago
    Trigger: Tue 2021-08-03 00:00:00 CDT; 13h left
   Triggers: ● mlocate-updatedb.service

Jul 30 17:42:59 calvin.home.du systemd[1]: Started Updates mlocate database…day.
Hint: Some lines were ellipsized, use -l to show in full.

# systemctl -l status mlocate-updatedb.service
● mlocate-updatedb.service - Update a database for mlocate
     Loaded: loaded (/usr/lib/systemd/system/mlocate-updatedb.service; static)
     Active: inactive (dead) since Mon 2021-08-02 00:00:01 CDT; 10h ago
TriggeredBy: ● mlocate-updatedb.timer
   Main PID: 63611 (code=exited, status=0/SUCCESS)
        CPU: 66ms

Aug 02 00:00:01 calvin.home.du systemd[1]: Started Update a database for mlocate. Aug 02 00:00:01 calvin.home.du systemd[1]: mlocate-updatedb.service: Succeeded.

# cat /lib/systemd/system/mlocate-updatedb.timer
[Unit]
Description=Updates mlocate database every day

[Timer]
OnCalendar=daily
AccuracySec=24h
Persistent=true

[Install]
WantedBy=timers.target

# cat /lib/systemd/system/mlocate-updatedb.service
[Unit]
Description=Update a database for mlocate

[Service]
ExecStart=/usr/libexec/mlocate-run-updatedb
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7

PrivateTmp=true
PrivateDevices=true
PrivateNetwork=true
ProtectSystem=true

# cat /usr/libexec/mlocate-run-updatedb
#!/usr/bin/sh

nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" && $2 != "zfs" { print $2 }')
/usr/bin/updatedb -f "$nodevs"

Any thoughts? Have I discovered a bug with mlocate-updatedb.timer or mlocate-updatedb.service?

Thanks,
Dave
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux