On Thu, Oct 14, 2021 at 10:28:07PM +0100, Richard W.M. Jones wrote:
I really need a way to test this with the curl plugin to check that
it
really does what I think it does. In particular I'm not convinced
curl will actually go through the whole redirect phase in this case,
which would mean it doesn't actually solve Alexander's problem.
Surprisingly to me this technique does actually work as expected.
I tested this now by setting up a mod_rewrite rule to do simple
round-robin with one broken mirror. This was sending back external
redirects, similar to how mirrorserver works.
(similar to lb.pl example here:
https://publib.boulder.ibm.com/httpserv/manual60/misc/rewriteguide.html )
I ran nbdkit with the filter and curl pointing to the mirror, and used
a single nbdsh session to read the mirror. I could tell by the data
being returned that it was redirected to a different mirror each
request, and it recovered transparently (after 2 seconds) when hitting
the broken mirror.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org