Skip autofs unmount on daemon exit

Robert Vasek <[email protected]>
Newsgroups org.kernel.vger.autofs
Message-ID <CADVsYmhjjKYUCHGWmzeTHXuQNAiR6ELbGzyy+m30ar+yaYLBzQ@mail.gmail.com>
Dear autofs community,

We run an instance of the automount daemon inside a container (a part
of a storage plugin in Kubernetes). The autofs mount root is shared
between different containers, and must survive restarting the daemon.

The problem is that when the daemon exits, it tries to clean up all
its mounts -- including the autofs root, so there is nothing to
reconnect to. At the moment, we're getting around the issue by sending
it a SIGKILL upon the daemon container exit, which skips the mount
cleanup, leaving it available for reconnect when the container comes
back.

While this works nicely for the moment, we don't want to rely on some
random signal which may be handled differently in the future, and I
didn't see anything in the options that would explicitly skip mount
clean up at exit. Would you accept a patch that adds a dedicated
command line flag for this?

Cheers,
Robert Vasek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.