[Bug 256592] automountd invoking /etc/autofs/special_hosts with non-hostnames as first argument

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 14 Jun 2021 08:55:07 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256592

--- Comment #1 from Tim Foster <timf_at_puroto.org> ---
In the case of the top-level "/net" directory, it makes sense that we're trying
to mount "/net/.git" since our bash script is trying to determine if "/net" is
a git repository.

However as we browse down the mountpoints from our server, it looks like we're
trying to effectively run this multiple times, which seems odd. Adding a logger
call to special_hosts, 

===
    13  getent hosts $1 > /dev/null
    14  if [ $? -ne 0 ]; then
    15      logger -t info "tried to access a missing host $1"
    16      exit 0
    17  fi
    18
    19  out=`showmount -E "$1"`
    20  [ $? -eq 0 ] || exit 1
    21  echo "$out" | awk -v host="$1" \
    22      '{ printf "\"%s\"\t\"%s:%s\" ", $0, host, $0 } END { printf "\n" }'
    23
===

we then did a tail -f /var/log/messages in one window, and tried browsing the
mountpoint in another. Here, we'll interleave our shell commands with the log
output:

===
timf_at_puroto bg
[1]+ tail -f /var/log/messages &
timf_at_puroto
timf_at_puroto cd /net/linn
Jun 14 09:51:49 puroto info[4884]: tried to access a missing host .git
Jun 14 09:51:49 puroto info[4891]: tried to access a missing host .git
Jun 14 09:51:49 puroto info[4899]: tried to access a missing host HEAD
timf_at_puroto cd mnt
Jun 14 09:51:54 puroto info[4910]: tried to access a missing host .git
Jun 14 09:51:54 puroto info[4917]: tried to access a missing host .git
Jun 14 09:51:54 puroto info[4925]: tried to access a missing host HEAD
timf_at_puroto cd tank
Jun 14 09:51:57 puroto info[4943]: tried to access a missing host .git
Jun 14 09:51:57 puroto info[4950]: tried to access a missing host .git
Jun 14 09:51:57 puroto info[4958]: tried to access a missing host HEAD
timf_at_puroto cd archive
Jun 14 09:51:59 puroto info[4978]: tried to access a missing host .git
Jun 14 09:51:59 puroto info[4985]: tried to access a missing host .git
Jun 14 09:51:59 puroto info[4993]: tried to access a missing host HEAD
timf_at_puroto ls -d .
25 ./
timf_at_puroto cd mail
timf_at_puroto
===

It looks like we're trying to run special_hosts a few times for each level of
the hierarchy, where "linn" is our nfs server, and "mnt/tank/archive" is the
first shared filesystem, with "mail" just being a normal directory in that
share.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Mon Jun 14 2021 - 08:55:07 UTC

Original text of this message