Test Steps:

        lxc launch --vm ubuntu:$SERIES autofs-$SERIES
        lxc shell autofs-$SERIES

        # replace linux-kvm with linux-generic for autofs
        DEBIAN_FRONTEND=noninteractive apt remove --yes --purge 
'?and(?installed,?or(?source-package(linux-kvm),?source-package(linux-meta-kvm)))'
        dpkg -s linux-image-virtual >/dev/null 2>/dev/null || (apt install 
--yes linux-image-virtual && reboot)

        apt update && apt install -y autofs
        sed '/^browse_mode =/ s/=.*/= yes/' -i /etc/autofs.conf

        echo '/test /etc/auto.test' >/etc/auto.master.d/test.autofs

        cat >/etc/auto.test <<EOF 
        test-pass :/home
        test-fail :/dir-not-found
        EOF

        systemctl restart autofs.service

        ls -l /test

focal:

        # ls -l /test
        total 0
        drwxr-xr-x 2 root root 0 Mar  1 20:04 test-fail
        drwxr-xr-x 2 root root 0 Mar  1 20:04 test-pass

        # mount | grep test
        /etc/auto.test on /test type autofs 
(rw,relatime,fd=6,pgrp=3119,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=34040)

        # lsb_release -cs
        focal

        # uname -r
        5.4.0-172-generic

jammy:

        # ls -l /test
        ls: cannot access '/test/test-fail': No such file or directory
        total 4
        d????????? ? ?    ?       ?            ? test-fail
        drwxr-xr-x 3 root root 4096 Mar  1 19:19 test-pass

        # mount | grep test
        /etc/auto.test on /test type autofs 
(rw,relatime,fd=6,pgrp=2776,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=26488)
        /dev/sda1 on /test/test-pass type ext4 
(rw,relatime,discard,errors=remount-ro)

        # lsb_release -cs
        jammy

        # uname -r
        5.15.0-97-generic


mantic:

        # ls -l /test
        total 0
        drwxr-xr-x 2 root root 0 Mar  1 20:04 test-fail
        drwxr-xr-x 2 root root 0 Mar  1 20:04 test-pass

        # mount | grep test
        /etc/auto.test on /test type autofs 
(rw,relatime,fd=6,pgrp=2596,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=27998)

        # lsb_release -cs
        No LSB modules are available.
        mantic

        # uname -r
        6.5.0-21-generic


stat test on jammy:

        # ls -1 /test
        test-fail
        test-pass

        # mount | grep test
        /etc/auto.test on /test type autofs 
(rw,relatime,fd=6,pgrp=662,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=19929)

        # stat /test/test-pass
        ...

        # mount | grep test
        /etc/auto.test on /test type autofs 
(rw,relatime,fd=6,pgrp=662,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=19929)
        /dev/sda1 on /test/test-pass type ext4 
(rw,relatime,discard,errors=remount-ro)

        # stat /test/test-fail
        stat: cannot statx '/test/test-fail': No such file or directory

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2033892

Title:
  ls -l triggers mount of autofs shares when --ghost option is present
  or browse_mode is enabled

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/2033892/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to