git-annex/doc/bugs/Missing_automounts_block_every_command.mdwn
Joey Hess a28c541e23
add remote.<name>.annex-checkuuid
Added remote.<name>.annex-checkuuid config, which can be set to false to
disable the default checking of the uuid of remotes that point to
directories. This can be useful to avoid unncessary drive spin-ups and
automounting.

Note that the UUID check is still done before writing to the repository,
to avoid writing to the wrong repository if it got relocated. Check is
also done before checkPresent to avoid getting confused about what is in
which repo. This is effectively the same as the use of git-annex-shell
with a uuid to check that the remote repository is the expected one.
Did not bother with the check for retrieveKeyFile because it doesn't
matter if the wrong repo is used then.

This commit was sponsored by Trenton Cronholm on Patreon.
2018-01-10 14:21:18 -04:00

47 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Please describe the problem.
When a remote is located on a device (network) that systemd is configured to automount but fails to do so, every git-annex command blocks/waits until the automount times out.
Commands that have to access such a remote (e.g., `sync`, `move`) are are allowed to block, but commands that only operate on the local repository (e.g., `version`, `add`, `calckey`, `find`) or another one (`sync not-doesnotexist`, `move --to=not-doesnotexist`) should not.
The Bash completion is also affected and blocks at every tab.
Probably related: git-annex causes **not missing** idle hard drives (as remotes) to spin up for no reason even for local commands and completions.
### What steps will reproduce the problem?
Add a non-existing mount point to `/etc/fstab`:
/dev/sdoesnotexist /mnt/doesnotexist ext4 defaults,noauto,x-systemd.automount,x-systemd.device-timeout=10 0 0
Add a remote pointing to a path on `/mnt/doesnotexist`:
$ git remote add doesnotexist /mnt/doesnotexist/path/to/repository
Use any git-annex command and wait for at least `x-systemd.device-timeout`:
$ time git-annex version > /dev/null
real 0m10.433s
user 0m0.171s
sys 0m0.028s
### What version of git-annex are you using? On what operating system?
git-annex version: 6.20171214-g61b515d71d
build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify ConcurrentOutput TorrentParser MagicMime Feeds
dependency versions: aws-0.18 bloomfilter-2.0.1.0 cryptonite-0.24 DAV-1.3.1 feed-1.0.0.0 ghc-8.2.2 http-client-0.5.7.1 persistent-sqlite-2.6.4 torrent-10000.1.1 uuid-1.3.13 yesod-1.4.5
key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
local repository version: 5
supported repository versions: 3 5 6
upgrade supported from repository versions: 0 1 2 3 4 5
operating system: linux x86_64
### Please provide any additional information below.
`strace` always includes a call to `stat("/mnt/doesnotexist/path/to/repository")`.
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
Im very happy with git-annex (thanks) and use it frequently enough to notice this behavior.
> [[fixed|done]] via the `remote.<name>.annex-checkuuid` config setting
> that can disable this behavior. --[[Joey]]