Commit graph

31546 commits

Author SHA1 Message Date
yarikoptic
0b3080a946 Added a comment 2018-03-14 23:09:20 +00:00
Joey Hess
10d3b7fc62
Fix reversion introduced in 6.20171214 that caused concurrent transfers to incorrectly fail with "transfer already in progress".
Avoid creating transfer info file before transfer lock is created and
locked.

The wrong order for one thing caused transfer info to be overwritten
when a transfer was already in progress.

But worse, it caused checkTransfer to see the transfer info,
and so lock the transfer lock in order to verify the transfer was not in
progress. Which in a concurrent situation, prevented the transferrer
from locking the transfer lock, so it failed with "transfer already in
progress".

Note that the transferinfo command does not lock the transfer lock
before creating the transfer info. But, that's only run after
recvkey is running, and recvkey does lock the transfer lock, so that
seems more or less ok. (Other than being a super complicated legacy mess
that the P2P code has mostly obsoleted now.)

This commit was supported by the NSF-funded DataLad project.
2018-03-14 18:55:34 -04:00
Joey Hess
da1b1fb991
analysis 2018-03-14 17:47:16 -04:00
Joey Hess
34ba547756
comment 2018-03-14 16:18:26 -04:00
Joey Hess
ac6b9bf115
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-14 16:03:59 -04:00
Joey Hess
911611e4af
reproduced 2018-03-14 16:01:49 -04:00
Joey Hess
ba44ca80e6
Include amount of data transferred in progress display. 2018-03-14 13:39:14 -04:00
oliv5@5a9bb4b174f7995da105238c4e7b3f91767a87bc
78d3f10e2b 2018-03-14 00:12:26 +00:00
Joey Hess
d8702c5259
dial down update frequency for progress display to 0.2s
0.1s seemed a bit too jumpy. But kept 0.1s for --json-progress in case
some consumer depends on it.

BTW, the way rsync handles it is one progress update after every chunk
the rolling checksum algo identifies. So it's not a fixed delay. Weird.
2018-03-13 18:32:18 -04:00
Diana
1da835611f 2018-03-13 21:35:02 +00:00
Diana
4a8b758b78 2018-03-13 21:33:57 +00:00
Joey Hess
050ada746f
Added backends for the BLAKE2 family of hashes.
There are a lot of different variants and sizes, I suppose we might as well
export all the common ones.

Bump dep to cryptonite to 0.16, earlier versions lacked BLAKE2 support.
Even android has 0.16 or newer.

On Debian, Blake2bp_512 is buggy, so I have omitted it for now.
http://bugs.debian.org/892855

This commit was sponsored by andrea rota.
2018-03-13 16:23:42 -04:00
Joey Hess
4d8687062f
devblog 2018-03-13 15:09:36 -04:00
Joey Hess
0ceb6da0fa
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-13 15:08:28 -04:00
Joey Hess
4015c5679a
force verification when resuming download
When resuming a download and not using a rolling checksummer like rsync,
the partial file we start with might contain garbage, in the case where a
file changed as it was being downloaded. So, disabling verification on
resumes risked a bad object being put into the annex.

Even downloads with rsync are currently affected. It didn't seem worth the
added complexity to special case those to prevent verification, especially
since git-annex is using rsync less often now.

This commit was sponsored by Brock Spratlen on Patreon.
2018-03-13 14:50:49 -04:00
Joey Hess
31e1adc005
deal with unlocked files
P2P protocol version 1 adds VALID|INVALID after DATA; INVALID means the
file was detected to change content while it was being sent and so we
may not have received the valid content of the file.

Added new MustVerify constructor for Verification, which forces
verification even when annex.verify=false etc. This is used when INVALID
and in protocol version 0.

As well as changing git-annex-shell p2psdio, this makes git-annex tor
remotes always force verification, since they don't yet use protocol
version 1. Previously, annex.verify=false could skip verification when
using tor remotes, and let bad data into the repository.

This commit was sponsored by Jack Hill on Patreon.
2018-03-13 14:27:14 -04:00
https://openid.stackexchange.com/user/3ee5cf54-f022-4a71-8666-3c2b5ee231dd
7ea75e1132 Added a comment: How expensive is verification anyway? 2018-03-13 17:58:19 +00:00
Joey Hess
9930b1f140
a plan 2018-03-13 12:17:24 -04:00
Joey Hess
e16b069331
use total size from DATA
Noticed that getting a key whose size is not known resulted in a
progress display that didn't include the percent complete.

Fixed for P2P by making the size sent with DATA be used to update the
meter's total size.

In order for rateLimitMeterUpdate to also learn the total size,
had to make it be passed the Meter, and some other reorg in
Utility.Metered was also done so that --json-progress can construct a
Meter to pass to rateLimitMeterUpdate.

When the fallback rsync is done, the progress display still doesn't
include the percent complete. Only way to fix that seems to be to let rsync
display its output again, but that would conflict with git-annex's
own progress meter, which is also being displayed.

This commit was sponsored by Henrik Riomar on Patreon.
2018-03-12 21:46:58 -04:00
Joey Hess
b96b845ffd
fix nested progress meters when using git-annex-shell fallback
Caused an ugly blank line when the first progress meter was not used,
but also it may have confused -J display.
2018-03-12 19:20:10 -04:00
Joey Hess
7bed3927ba
make way for rsync progress output when it's enabled 2018-03-12 19:10:22 -04:00
Joey Hess
1c2c8995ac
hide rsync progress output when metered but not in other uses of rsync 2018-03-12 18:36:07 -04:00
Joey Hess
85450f94d6
response 2018-03-12 18:32:58 -04:00
Joey Hess
cb05ef06bf
fix lost metering for fallback rsyncs
08814327ff accidentially got rid of it,
when it removed commandMetered.
2018-03-12 18:22:48 -04:00
Joey Hess
abe8346dca
response 2018-03-12 17:49:06 -04:00
Joey Hess
ad13b56c86
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-12 17:33:37 -04:00
Joey Hess
59e7f3cbb2
done for the day 2018-03-12 17:32:57 -04:00
Joey Hess
24f35f6acc
remove todo about assistant and network change
When the assistant detects a network change, it
stops using old git-annex transferkeys processes.
So, no problem that old git-annex-shell p2pstdio
connections are cached; they won't be reused after
network change.
2018-03-12 17:24:40 -04:00
Joey Hess
b654597c2f
urk, this is hard 2018-03-12 17:24:18 -04:00
Joey Hess
c3df5d1f10
avoid double-connect to unreachable ssh remote
When git-annex-shell p2pstdio fails with 255, it's because the ssh
server is not reachable. Avoid running the fallback action in this case,
since it would just try a second time to connect, and presumably fail.

Note that the closed P2PSshConnection will not be stored in the pool,
so the next request tries again to connect. This is just the right
behavior; when the remote becomes reachable again, the same git-annex
process will start using it.

This commit was sponsored by Ole-Morten Duesund on Patreon.
2018-03-12 16:50:21 -04:00
Joey Hess
e36ceb7448
open todo for p2p protocol flag days 2018-03-12 16:28:54 -04:00
Joey Hess
28589c92d2
no protocol 1 yet 2018-03-12 15:42:15 -04:00
andrew
cb9f8f688c Added a comment 2018-03-12 19:24:56 +00:00
Joey Hess
596af7cbc4
move protocol version stuff to the Net free monad
Needs to be in Net not Local, so that Net actions can take the protocol
version into account.

This commit was sponsored by an anonymous bitcoin donor.
2018-03-12 15:20:51 -04:00
davicastro
56bab023b9 Added a comment: What are the drawbacks of repo v6? 2018-03-12 19:00:36 +00:00
Joey Hess
c81768d425
version the P2P protocol
Unfortunately ReceiveMessage didn't handle unknown messages the way it
was documented to; client sending VERSION would cause the server to
return an ERROR and hang up. Fixed that, but old releases of git-annex
use the P2P protocol for tor and will still have that behavior.

So, version is not negotiated for Remote.P2P connections, only for
Remote.Git connections, which will support VERSION from their first
release. There will need to be a later flag day to change Remote.P2P;
left a commented out line that is the only thing that will need to be
changed then.

Version 1 of the P2P protocol is not implemented yet, but updated
the docs for the DATA change that will be allowed by that version.

This commit was sponsored by Jeff Goeke-Smith on Patreon.
2018-03-12 14:36:35 -04:00
anarcat
797026a263 Added a comment: beautiful 2018-03-12 13:52:53 +00:00
anarcat
d66fab83da Added a comment: late to the party 2018-03-12 13:50:33 +00:00
anarcat
821fdf8a25 Added a comment: progress bars? 2018-03-12 13:44:50 +00:00
anarcat
8688ba868c fix broken link 2018-03-12 13:41:54 +00:00
andrew
e5b05261d9 2018-03-11 18:48:43 +00:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
7154be6018 Add new Google Drive special remote 2018-03-11 13:11:43 +00:00
andrew
d90abac2b7 Added a comment 2018-03-10 18:33:23 +00:00
andrew
c8d017c7b1 removed 2018-03-10 18:30:03 +00:00
andrew
3c74b1e40e Added a comment 2018-03-10 18:28:10 +00:00
douglass.doug@f332d3f2822cae5f75accdf82fdab4a8f565e1f9
bfa8b90f45 Added a comment: git-annex-bin package? 2018-03-09 20:59:02 +00:00
yarikoptic
d1c0c8b2fa Added a comment 2018-03-09 19:00:27 +00:00
yarikoptic
37c1daafb6 Added a comment 2018-03-09 18:55:51 +00:00
Joey Hess
5ae103e09a
devblog 2018-03-09 14:23:35 -04:00
Joey Hess
361f22dc72
awesome 2018-03-09 14:19:21 -04:00