git-annex.git
2 years agostatus
Joey Hess [Wed, 3 Jul 2024 21:04:12 +0000 (17:04 -0400)]
status

2 years agoupdate
Joey Hess [Wed, 3 Jul 2024 19:53:25 +0000 (15:53 -0400)]
update

2 years agostatus
Joey Hess [Wed, 3 Jul 2024 19:01:34 +0000 (15:01 -0400)]
status

2 years agotodo
Joey Hess [Wed, 3 Jul 2024 17:15:09 +0000 (13:15 -0400)]
todo

2 years agoMerge branch 'assistantpointerrace'
Joey Hess [Tue, 2 Jul 2024 22:04:40 +0000 (18:04 -0400)]
Merge branch 'assistantpointerrace'

2 years agoupdate
Joey Hess [Tue, 2 Jul 2024 22:04:29 +0000 (18:04 -0400)]
update

2 years agoupdate
Joey Hess [Tue, 2 Jul 2024 20:16:37 +0000 (16:16 -0400)]
update

2 years agodrafting P2P protocol over http
Joey Hess [Tue, 2 Jul 2024 20:14:45 +0000 (16:14 -0400)]
drafting P2P protocol over http

2 years agoadd news item for git-annex 10.20240701
Joey Hess [Tue, 2 Jul 2024 16:31:23 +0000 (12:31 -0400)]
add news item for git-annex 10.20240701

2 years agofix build on old ghc
Joey Hess [Tue, 2 Jul 2024 16:27:14 +0000 (12:27 -0400)]
fix build on old ghc

getStdRandom used to be an IO action

2 years agoassistant: Fix a race condition that could cause a pointer file to get ingested into...
Joey Hess [Tue, 2 Jul 2024 16:24:57 +0000 (12:24 -0400)]
assistant: Fix a race condition that could cause a pointer file to get ingested into the annex

This was caused by commit fb8ab2469d389e5b1e554831eeb8b7c7a072d5d7 putting
an isPointerFile check in the wrong place. So if the file was not a pointer
file at that point, but got replaced by one before the file got locked
down, the pointer file would be ingested into the annex.

The fix is simply to move the isPointerFile check to after safeToAdd locks
down the file. Now if the file changes to a pointer file after the
isPointerFile check, ingestion will see that it changed after lockdown,
and will refuse to add it to the annex.

Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
2 years agoreproduced bug
Joey Hess [Tue, 2 Jul 2024 14:38:48 +0000 (10:38 -0400)]
reproduced bug

2 years agoprep release
Joey Hess [Mon, 1 Jul 2024 19:13:10 +0000 (15:13 -0400)]
prep release

2 years agoreorder
Joey Hess [Mon, 1 Jul 2024 15:44:54 +0000 (11:44 -0400)]
reorder

2 years agoupdate
Joey Hess [Mon, 1 Jul 2024 15:38:29 +0000 (11:38 -0400)]
update

2 years agotoc
Joey Hess [Mon, 1 Jul 2024 15:37:12 +0000 (11:37 -0400)]
toc

2 years agodocument proxying to special remotes
Joey Hess [Mon, 1 Jul 2024 15:33:55 +0000 (11:33 -0400)]
document proxying to special remotes

2 years agoupdate
Joey Hess [Mon, 1 Jul 2024 15:33:07 +0000 (11:33 -0400)]
update

2 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 1 Jul 2024 15:29:38 +0000 (11:29 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

2 years agoupdate
Joey Hess [Mon, 1 Jul 2024 15:29:04 +0000 (11:29 -0400)]
update

2 years agoMerge branch 'master' into proxy-specialremotes
Joey Hess [Mon, 1 Jul 2024 15:23:21 +0000 (11:23 -0400)]
Merge branch 'master' into proxy-specialremotes

2 years agofix display when proxied GET yields ERROR
Joey Hess [Mon, 1 Jul 2024 15:19:02 +0000 (11:19 -0400)]
fix display when proxied GET yields ERROR

The error message is not displayed to the use, but this mirrors the
behavior when a regular get from a special remote fails. At least now
there is not a protocol error.

2 years agoavoid populating proxy's object file when storing on special remote
Joey Hess [Mon, 1 Jul 2024 14:53:49 +0000 (10:53 -0400)]
avoid populating proxy's object file when storing on special remote

Now that storeKey can have a different object file passed to it, this
complication is not needed. This avoids a lot of strange situations,
and will also be needed if streaming is eventually supported.

2 years agoadd optional object file location to storeKey
Joey Hess [Mon, 1 Jul 2024 14:42:27 +0000 (10:42 -0400)]
add optional object file location to storeKey

This will be used by the next commit to simplify the proxy.

2 years agodup stdio handles for P2P proxy
Joey Hess [Mon, 1 Jul 2024 14:04:45 +0000 (10:04 -0400)]
dup stdio handles for P2P proxy

Special remotes might output to stdout, or read from stdin, which would
mess up the P2P protocol. So dup the handles to avoid any such problem.

2 years agoinitial report on file jumping from locked to unlocked
yarikoptic [Sun, 30 Jun 2024 18:52:23 +0000 (18:52 +0000)]
initial report on file jumping from locked to unlocked

2 years agoTab completion of many commands like info and trust now includes remotes
Joey Hess [Sun, 30 Jun 2024 16:39:18 +0000 (12:39 -0400)]
Tab completion of many commands like info and trust now includes remotes

Especially useful with proxied remotes and clusters, where the user may not
be entirely familiar with the name and can learn by tab completion.

2 years agooriginal report on change in behavior with addurl --batch
yarikoptic [Sun, 30 Jun 2024 16:04:30 +0000 (16:04 +0000)]
original report on change in behavior with addurl --batch

2 years agowording
Joey Hess [Sun, 30 Jun 2024 15:28:17 +0000 (11:28 -0400)]
wording

2 years agoMerge branch 'master' into proxy-specialremotes
Joey Hess [Sun, 30 Jun 2024 15:16:20 +0000 (11:16 -0400)]
Merge branch 'master' into proxy-specialremotes

2 years agolist proxied remotes and cluster gateways in git-annex info
Joey Hess [Sun, 30 Jun 2024 15:14:13 +0000 (11:14 -0400)]
list proxied remotes and cluster gateways in git-annex info

Wanted to also list a cluster's nodes when showing info for the cluster,
but that's hard because it needs getting the name of the proxying
remote, which is some prefix of the cluster's name, but if the names
contain dashes there's no good way to know which prefix it is.

2 years agotodo
Joey Hess [Fri, 28 Jun 2024 21:14:18 +0000 (17:14 -0400)]
todo

2 years agoPUT to proxied special remote working
Joey Hess [Fri, 28 Jun 2024 21:07:01 +0000 (17:07 -0400)]
PUT to proxied special remote working

Still needs some work.

The reason that the waitv is necessary is because without it,
runNet loops back around and reads the next protocol message. But it's
not finished reading the whole bytestring yet, and so it reads some part
of it.

2 years agoGET from proxied special remote
Joey Hess [Fri, 28 Jun 2024 19:32:00 +0000 (15:32 -0400)]
GET from proxied special remote

Working, but lots of room for improvement...

Without streaming, so there is a delay before download begins as the
file is retreived from the special remote.

And when resuming it retrieves the whole file from the special remote
*again*.

Also, if the special remote throws an exception, currently it
shows as "protocol error".

2 years agofix handling of ERROR in response to REMOVE
Joey Hess [Fri, 28 Jun 2024 18:07:23 +0000 (14:07 -0400)]
fix handling of ERROR in response to REMOVE

This allows an error message from a proxied special remote to be
displayed to the client.

In the case where removal from several nodes of a cluster fails,
there can be several errors. What to do? I decided to only show
the first error to the user. Probably in this case the user is not in a
position to do anything about an error message, so best keep it simple.
If the problem with the first node is fixed, they'll see the error from
the next node.

2 years agofix handling of ERROR in response to CHECKPRESENT
Joey Hess [Fri, 28 Jun 2024 17:42:25 +0000 (13:42 -0400)]
fix handling of ERROR in response to CHECKPRESENT

That error is now rethrown on the client, so it will be displayed.

For example:

$ git-annex fsck x --fast --from AMS-dir
fsck x (special remote reports: directory /home/joey/tmp/bench2/dir is not accessible) failed

No protocol version check is needed. Because in order to talk to a
proxied special remote, the client has to be running the upcoming
git-annex release. Which has this fix in it.

2 years agoproxying special remotes
Joey Hess [Fri, 28 Jun 2024 17:22:56 +0000 (13:22 -0400)]
proxying special remotes

This is early, but already working for CHECKPRESENT.

However, when the special remote throws an exception on checkPresent,
this happens:

[2024-06-28 13:22:18.520884287] (P2P.IO) [ThreadId 4] P2P > ERROR directory /home/joey/tmp/bench2/dir is not accessible
[2024-06-28 13:22:18.521053135] (P2P.IO) [ThreadId 4] P2P < ERROR expected SUCCESS or FAILURE
git-annex: client error: expected SUCCESS or FAILURE
(fixing location log) p2pstdio: 1 failed

  ** Based on the location log, x
  ** was expected to be present, but its content is missing.
failed

2 years agoshut down RemoteSides cleanly
Joey Hess [Fri, 28 Jun 2024 17:19:57 +0000 (13:19 -0400)]
shut down RemoteSides cleanly

Before it just exited without actually shutting down the RemoteSides,
when the client hung up.

2 years agosupport a P2PConnection that uses TMVars rather than Handles
Joey Hess [Fri, 28 Jun 2024 15:22:29 +0000 (11:22 -0400)]
support a P2PConnection that uses TMVars rather than Handles

This will allow having an internal thread speaking P2P protocol,
which will be needed to support proxying to external special remotes.

No serialization is done on the internal P2P protocol of course.

When a ByteString is being exchanged, it may or may not be exactly
the length indicated by DATA. While that has to be carefully managed
for the serialized P2P protocol, here it would require buffering the
whole lazy bytestring in memory to check its length when sending,
so it's better to do length checks on the receiving side.

2 years agoremove mention of XMPP which is no longer used
Joey Hess [Thu, 27 Jun 2024 19:56:30 +0000 (15:56 -0400)]
remove mention of XMPP which is no longer used

2 years agolayout
Joey Hess [Thu, 27 Jun 2024 19:52:58 +0000 (15:52 -0400)]
layout

2 years agolayout
Joey Hess [Thu, 27 Jun 2024 19:52:10 +0000 (15:52 -0400)]
layout

2 years agoimprove
Joey Hess [Thu, 27 Jun 2024 19:50:27 +0000 (15:50 -0400)]
improve

2 years agomerged the proxy branch into master!
Joey Hess [Thu, 27 Jun 2024 19:44:11 +0000 (15:44 -0400)]
merged the proxy branch into master!

2 years agoMerge branch 'proxy'
Joey Hess [Thu, 27 Jun 2024 19:43:45 +0000 (15:43 -0400)]
Merge branch 'proxy'

2 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 27 Jun 2024 19:43:42 +0000 (15:43 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

2 years agomove clusters page to tips
Joey Hess [Thu, 27 Jun 2024 19:41:38 +0000 (15:41 -0400)]
move clusters page to tips

also add a section on the front page highlighting major new features

2 years agomake extendcluster also updatecluster
Joey Hess [Thu, 27 Jun 2024 19:34:45 +0000 (15:34 -0400)]
make extendcluster also updatecluster

This avoids the user forgetting to do it and simplifies the
documentation.

2 years agoupdate
Joey Hess [Thu, 27 Jun 2024 19:28:10 +0000 (15:28 -0400)]
update

2 years agogive proxied cluster nodes a higher cost than the cluster gateway
Joey Hess [Thu, 27 Jun 2024 19:21:03 +0000 (15:21 -0400)]
give proxied cluster nodes a higher cost than the cluster gateway

This makes eg git-annex get default to using the cluster rather than an
arbitrary node, which is better UI.

The actual cost of accessing a proxied node vs using the cluster is
basically the same. But using the cluster allows smarter load-balancing
to be done on the cluster.

2 years agoGET and CHECKPRESENT amoung lowest cost cluster nodes
Joey Hess [Thu, 27 Jun 2024 18:36:55 +0000 (14:36 -0400)]
GET and CHECKPRESENT amoung lowest cost cluster nodes

Before it was using a node that might have had a higher cost.

Also threw in a random selection from amoung the low cost nodes. Of
course this is a poor excuse for load balancing, but it's better than
nothing. Most of the time...

2 years agoupdate
Joey Hess [Thu, 27 Jun 2024 17:40:09 +0000 (13:40 -0400)]
update

2 years agoremove a TODO marker
Joey Hess [Thu, 27 Jun 2024 17:36:04 +0000 (13:36 -0400)]
remove a TODO marker

I have a todo item for this outside the code

2 years agoremove viconfig item
Joey Hess [Thu, 27 Jun 2024 17:34:24 +0000 (13:34 -0400)]
remove viconfig item

it works when run on a client that has the cluster gateway as a remote,
just not when on the cluster gateway

2 years agodocument various multi-gateway cluster considerations
Joey Hess [Thu, 27 Jun 2024 17:33:04 +0000 (13:33 -0400)]
document various multi-gateway cluster considerations

Perhaps this will avoid me needing to eg, implement spanning tree
protocol. ;-)

2 years agoupdates
Joey Hess [Thu, 27 Jun 2024 16:57:08 +0000 (12:57 -0400)]
updates

2 years agoupdate for clusters
Joey Hess [Thu, 27 Jun 2024 16:47:26 +0000 (12:47 -0400)]
update for clusters

2 years agoMerge branch 'master' into proxy
Joey Hess [Thu, 27 Jun 2024 16:41:57 +0000 (12:41 -0400)]
Merge branch 'master' into proxy

2 years agoremove unused import
Joey Hess [Thu, 27 Jun 2024 16:38:32 +0000 (12:38 -0400)]
remove unused import

2 years agoavoid unfiltered debugging from git-annex-shell
Joey Hess [Thu, 27 Jun 2024 16:35:35 +0000 (12:35 -0400)]
avoid unfiltered debugging from git-annex-shell

When --debugfilter or annex.debugfilter is set, avoid propigating debug
output from git-annex-shell, since it cannot be filtered.

It would be possible to pass --debugfilter on to git-annex-shell,
but it only started accepting that option in 2022. So it would break
interop with older versions.

2 years agodistributed cluster cycle prevention
Joey Hess [Thu, 27 Jun 2024 16:20:22 +0000 (12:20 -0400)]
distributed cluster cycle prevention

Added BYPASS to P2P protocol, and use it to avoid cycling between
cluster gateways.

Distributed clusters are working well now!

2 years ago(no commit message)
lykos@d125a37d89b1cfac20829f12911656c40cb70018 [Thu, 27 Jun 2024 10:47:43 +0000 (10:47 +0000)]

2 years agoavoid loop between cluster gateways
Joey Hess [Wed, 26 Jun 2024 19:27:16 +0000 (15:27 -0400)]
avoid loop between cluster gateways

The VIA extension is still needed to avoid some extra work and ugly
messages, but this is enough that it actually works.

This filters out the RemoteSides that are a proxied connection via a
remote gateway to the cluster.

The VIA extension will not filter those out, but will send VIA to them
on connect, which will cause the ones that are accessed via the listed
gateways to be filtered out.

2 years agosupport multi-gateway clusters
Joey Hess [Wed, 26 Jun 2024 19:02:10 +0000 (15:02 -0400)]
support multi-gateway clusters

VIA extension still needed otherwise a copy to a cluster can loop
forever.

2 years agoupdate for multi-gateway clusters
Joey Hess [Wed, 26 Jun 2024 18:21:35 +0000 (14:21 -0400)]
update for multi-gateway clusters

2 years agofix cycle prevention code
Joey Hess [Wed, 26 Jun 2024 17:21:51 +0000 (13:21 -0400)]
fix cycle prevention code

2 years agogit-annex-shell: proxy nodes located beyond remote cluster gateways
Joey Hess [Wed, 26 Jun 2024 16:56:16 +0000 (12:56 -0400)]
git-annex-shell: proxy nodes located beyond remote cluster gateways

Walking a tightrope between security and convenience here, because
git-annex-shell needs to only proxy for things when there has been
an explicit, local action to configure them.

In this case, the user has to have run `git-annex extendcluster`,
which now sets annex-cluster-gateway on the remote.

Note that any repositories that the gateway is recorded to
proxy for will be proxied onward. This is not limited to cluster nodes,
because checking the node log would not add any security; someone could
add any uuid to it. The gateway of course then does its own
checking to determine if it will allow proxying for the remote.

2 years agoset up proxies for cluster nodes that are themselves proxied via a remote
Joey Hess [Wed, 26 Jun 2024 15:24:55 +0000 (11:24 -0400)]
set up proxies for cluster nodes that are themselves proxied via a remote

When there are multiple gateways to a cluster, this sets up proxying
for nodes that are accessed via a remote gateway.

Eg, when running in nyc and amsterdam is the remote gateway,
and it has node1 and node2, this sets up proxying for
amsterdam-node1 and amsterdam-node2. A client that has nyc as a remote
will see proxied remotes nyc-amsterdam-node1 and nyc-amsterdam-node2.

2 years agoupdatecluster: support multiple gateways
Joey Hess [Wed, 26 Jun 2024 14:51:14 +0000 (10:51 -0400)]
updatecluster: support multiple gateways

Just look at the existing proxied remotes that correspond to already
existing nodes of the cluster, and keep those nodes in the cluster.
While adding any remotes of the local repo that are configured as
cluster nodes. This allows removing cluster nodes from the local repo
and updating, without it also removing nodes provided by other gateways.

2 years agoadded git-annex extendcluster
Joey Hess [Wed, 26 Jun 2024 14:26:54 +0000 (10:26 -0400)]
added git-annex extendcluster

This works, but updatecluster does not work yet in multi-gateway
clusters, nor do gateways relay to other gateways.

2 years agoAdded a comment
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92 [Wed, 26 Jun 2024 10:20:29 +0000 (10:20 +0000)]
Added a comment

2 years agoDo checkpresentkey with --debug set
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92 [Wed, 26 Jun 2024 10:11:58 +0000 (10:11 +0000)]
Do checkpresentkey with --debug set

2 years ago(no commit message)
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92 [Wed, 26 Jun 2024 08:06:37 +0000 (08:06 +0000)]

2 years agotodo
Joey Hess [Tue, 25 Jun 2024 21:58:45 +0000 (17:58 -0400)]
todo

2 years agoimprove docs
Joey Hess [Tue, 25 Jun 2024 21:50:22 +0000 (17:50 -0400)]
improve docs

2 years agoupdate
Joey Hess [Tue, 25 Jun 2024 21:26:26 +0000 (17:26 -0400)]
update

2 years agodesign for distributed clusters
Joey Hess [Tue, 25 Jun 2024 21:20:49 +0000 (17:20 -0400)]
design for distributed clusters

2 years agothoughts on cycles
Joey Hess [Tue, 25 Jun 2024 19:27:03 +0000 (15:27 -0400)]
thoughts on cycles

Rejected the idea of automatically instantiating remotes for proxies-of-proxies.
That needs cycle protection, while the current behavior, which happened
for free, is that running git-annex updateproxy on the proxy can be used
to configure it, but only for topologies that actually exist.

2 years agosupport annex.jobs for clusters
Joey Hess [Tue, 25 Jun 2024 18:52:47 +0000 (14:52 -0400)]
support annex.jobs for clusters

2 years agoimprove handling of cluster nodes disconnecting
Joey Hess [Tue, 25 Jun 2024 18:10:06 +0000 (14:10 -0400)]
improve handling of cluster nodes disconnecting

2 years agogave up on upload fanout to cluster's proxy
Joey Hess [Tue, 25 Jun 2024 17:35:12 +0000 (13:35 -0400)]
gave up on upload fanout to cluster's proxy

The problem with that idea is that the cluster's proxy is necessarily a
remote, and necessarily one that we'll want to sync with, since the git
repository is stored there. So when its preferred content wants a file,
and the cluster does too, the file will get uploaded to it as well as to
the cluster. With fanout, the upload to the cluster will populate the
proxy as well, avoiding a second upload. But only if the file is sent to
the cluster first. If it's sent to the proxy first, there will be two
uploads.

Another, lesser problem is that a repository can proxy for more than one
cluster. So when does it make sense to drop content from the repository?
It could be done when dropping from one cluster, but what of the other
one?

This complication was not necessary anyway. Instead, if it's desirable
to have some content accessed from close to the proxy, one of the
cluster nodes can just be put on the same filesystem as it. That will be
just as fast as storing the content on the proxy.

2 years ago(no commit message)
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92 [Tue, 25 Jun 2024 15:59:36 +0000 (15:59 +0000)]

2 years agohonor preferred content settings of cluster nodes
Joey Hess [Tue, 25 Jun 2024 15:35:41 +0000 (11:35 -0400)]
honor preferred content settings of cluster nodes

Except when no nodes want a file, it has to be stored somewhere, so
store it on all. Which is not really desirable, but neither is having to
pick one.

ProtoAssociatedFile deserialization is rather broken, and this could
possibly affect preferred content expressions that match on filenames.

The inability to roundtrip whitespace like tabs and newlines through is
not a problem because preferred content expressions can't be written
that match on whitespace such as a tab. For example:

joey@darkstar:~/tmp/bench/z>git-annex wanted  origin-node2 'exclude=*CTRL-VTab*'
wanted origin-node2
git-annex: Parse error: Parse failure: near "*"

But, the filtering of control characters could perhaps be a problem. I think
that filtering is now obsolete, git-annex has comprehensive filtering of
control characters when displaying filenames, that happens at a higher level.
However, I don't want to risk a security hole so am leaving in that filtering
in ProtoAssociatedFile deserialization for now.

2 years agoPUT to cluster send to all nodes rather than none
Joey Hess [Tue, 25 Jun 2024 14:32:34 +0000 (10:32 -0400)]
PUT to cluster send to all nodes rather than none

If the location log says all nodes contain content, pass in all nodes,
rather than none.

The location log can be wrong. While it's good to avoid unncessessary
connections to nodes that already contain a key, it would be bad to
refuse to accept an upload at all when the location log is wrong.

Also, passing in no nodes leaves the proxy in an untenable state. It
can't proxy to no nodes. So it closes the connection. Passing in all
nodes means it has to do the work to connect to all of them, and see
that they say they already have the content, and then it can tell the
client that.

2 years agodon't sync with cluster nodes by default
Joey Hess [Tue, 25 Jun 2024 14:06:28 +0000 (10:06 -0400)]
don't sync with cluster nodes by default

Avoid `git-annex sync --content` etc from operating on cluster nodes by default
since syncing with a cluster implicitly syncs with its nodes. This avoids a
lot of unncessary work when a cluster has a lot of nodes just in checking
if each node's preferred content is satisfied. And it avoids content
being sent to nodes individually, so instead syncing with clusters always
fanout uploads to nodes.

The downside is that there are situations where a cluster's preferred content
settings can be met, but those of its nodes are not. Or where a node does not
contain a key, but the cluster does, and there are not enough copies of the key
yet, so it would be desirable the send it there. I think that's an acceptable
tradeoff. These kind of situations are ones where the cluster itself should
probably be responsible for copying content to the node. Which it can do much
less expensively than a client can. Part of the balanced preferred content
design that I will be working on in a couple of months involves rebalancing
clusters, so I expect to revisit this.

The use of annex-sync config does allow running git-annex sync with a specific
node, or nodes, and it will sync with it. And it's also possible to set
annex-sync git configs to make it sync with a node by default. (Although that
will require setting up an explicit git remote for the node rather than relying
on the proxied remote.)

Logs.Cluster.Basic is needed because Remote.Git cannot import Logs.Cluster
due to a cycle. And the Annex.Startup load of clusters happens
too late for Remote.Git to use that. This does mean one redundant load
of the cluster log, though only when there is a proxy.

2 years ago(no commit message)
m.risse@77eac2c22d673d5f10305c0bade738ad74055f92 [Tue, 25 Jun 2024 10:46:13 +0000 (10:46 +0000)]

2 years agoadd annex-proxied
Joey Hess [Mon, 24 Jun 2024 14:13:13 +0000 (10:13 -0400)]
add annex-proxied

This makes git-annex sync and similar not treat proxied remotes as git
syncable remotes.

Also, display in git-annex info remote when the remote is proxied.

2 years agofix git-annex sync --content with proxied remotes
Joey Hess [Mon, 24 Jun 2024 13:40:57 +0000 (09:40 -0400)]
fix git-annex sync --content with proxied remotes

Loading the remote list a second time was removing all proxied remotes.
That happened because setting up the proxied remote added some config
fields to the in-memory git config, and on the second load, it saw those
configs and decided not to overwrite them with the proxy.

Now on the second load, that still happens. But now, the proxied
git configs are used to generate a remote same as if those configs were
all set. The reason that didn't happen before was twofold,
the gitremotes cache was not dropped, and the remote's url field was not
set correctly.

The problem with the remote's url field is that while it was marked as
proxy inherited, all other proxy inherited fields are annex- configs.
And the code to inherit didn't work for the url field.

Now it all works, but git-annex sync is left running git push/pull on
the proxied remote, which doesn't work. That still needs to be fixed.

2 years agodrop gitremotes cache when config is changed
Joey Hess [Mon, 24 Jun 2024 13:36:21 +0000 (09:36 -0400)]
drop gitremotes cache when config is changed

2 years agoremove attempt to avoid git syncing with instantiate proxied remotes
Joey Hess [Mon, 24 Jun 2024 13:35:24 +0000 (09:35 -0400)]
remove attempt to avoid git syncing with instantiate proxied remotes

It didn't work. Actually, sync was skipping those remotes due to a bug.

2 years agoupdate
Joey Hess [Sun, 23 Jun 2024 20:38:01 +0000 (16:38 -0400)]
update

2 years agoupload fanout resume seems free of fenceposts
Joey Hess [Sun, 23 Jun 2024 20:22:39 +0000 (16:22 -0400)]
upload fanout resume seems free of fenceposts

Tested it with small chunk sizes (like 2) and resumes that were
eg 1 byte from the end of the file or beginning of file.

Also, git-annex testremote passes now against a cluster!

2 years agofix comparison
Joey Hess [Sun, 23 Jun 2024 20:01:58 +0000 (16:01 -0400)]
fix comparison

With this a PUT to two remotes that have different partial amounts
transferred works reliably. I'm not sure though that it doesn't have
fencepost errors.

2 years agoupdate
Joey Hess [Sun, 23 Jun 2024 16:48:22 +0000 (12:48 -0400)]
update

2 years agoupdate
Joey Hess [Sun, 23 Jun 2024 16:31:00 +0000 (12:31 -0400)]
update

2 years agoalways check numcopies when moving from cluster
Joey Hess [Sun, 23 Jun 2024 16:00:50 +0000 (12:00 -0400)]
always check numcopies when moving from cluster

When the destination does not start with a copy, the cluster has one or
more copies. If more, dropping would reduce the number of copies, so
numcopies must be checked.

Considered checking how many nodes of the cluster contain a copy. If
only 1 node does, it could allow a move without checking numcopies.
The problem with that, though, is that other nodes of the cluster could
have copies that we don't know about. And dropping from a cluster tries
to drop from all nodes, so will drop even from those. So any drop from a
cluster can remove more than 1 copy.

2 years agotodo
Joey Hess [Sun, 23 Jun 2024 14:09:11 +0000 (10:09 -0400)]
todo

2 years agodon't use SUCCESS-PLUS unncessarily
Joey Hess [Sun, 23 Jun 2024 13:57:40 +0000 (09:57 -0400)]
don't use SUCCESS-PLUS unncessarily

When dropping from a proxied remote that is not a cluster,
SUCCESS-PLUS is not needed, so don't use it.

2 years agofix location log update for copy to 1-node cluster
Joey Hess [Sun, 23 Jun 2024 13:53:33 +0000 (09:53 -0400)]
fix location log update for copy to 1-node cluster

2 years agodropping from clusters
Joey Hess [Sun, 23 Jun 2024 13:28:18 +0000 (09:28 -0400)]
dropping from clusters

Dropping from a cluster drops from every node of the cluster.
Including nodes that the cluster does not think have the content.
This is different from GET and CHECKPRESENT, which do trust the
cluster's location log. The difference is that removing from a cluster
should make 100% the content is gone from every node. So doing extra
work is ok. Compare with CHECKPRESENT where checking every node could
make it very expensive, and the worst that can happen in a false
negative is extra work being done.

Extended the P2P protocol with FAILURE-PLUS to handle the case where a
drop from one node succeeds, but a drop from another node fails. In that
case the entire cluster drop has failed.

Note that SUCCESS-PLUS is returned when dropping from a proxied remote
that is not a cluster, when the protocol version supports it. This is
because P2P.Proxy does not know when it's proxying for a single node
cluster vs for a remote that is not a cluster.