Hallo,
* Andras Korn [Sat, Oct 06 2012, 04:26:10PM]:

> > > It seems to me that in this case, tools like apt-get and debootstrap would
> > > try Packages.gz and Packages.bz2 as well (which do exist), but the 500 
> > > error
> > > throws them off.
> > 
> > Your guess is close but I think it's another thing. The "Bad mirror"
> > code is generated by the code that attempts to detect a mirror with
> > missing architecture. The skipping of other Packages files would also be
> > enforced by that code. But this method only becomes active if you have
> > used the keyfile=... keyword in your config. Have you?
> 
> Yes, see above.

I see. The keyfile= feature is actually a kludge, a bad workaround for a
problem of detecting which architecture the client might to need and
whether the particular mirror can deliver it. There is no need for this
thing if you only have complete mirrors in your backend list.

And in the long term this problem should be tackled by something with
real checks of package's architecture vs. what the particular mirror
provides. In fact, I have a pretty good idea of where to get and how to
handle that information, it's just a little bit tricky to implement.

> > > Resolving aptcacher (aptcacher)... 192.168.0.254
> > > Connecting to aptcacher (aptcacher)|192.168.0.254|:3142... connected.
> > > HTTP request sent, awaiting response...
> > >   HTTP/1.1 500 Bad mirror
> > >   Content-Length: 144
> > >   Content-Type: text/html
> > >   Date: Thu Aug  2 19:36:51 2012
> > >   Server: Debian Apt-Cacher NG/0.7.6
> > >   Connection: Keep-Alive
> > > 2012-08-02 21:36:51 ERROR 500: Bad mirror.
> > > 
> > > This is what happens when I query it directly instead of going through
> > > Squid. I suppose Squid discards "Bad mirror" and returns "Internal Server
> > > Error" based on an internal table of HTTP status codes.
> > > 
> > > Is there a good reason why the client is not allowed to see the 404 error?
> > 
> > Please ask Squid or APT guys!
> 
> What do they have to do with this? It's ACNG that sends the client a 500
> error instead of a 404 error.

It sends a 500 for a reason - misconfiguration - why should it send a
wrong 404 code instead? And squid replaces my message with a hard-coded
string from squid's internal table of error codes.

That is what I meant when I told you "there is no such message in acng".

> > The problem with wrappers like Squid is the use of persistent connections
> > for multiple client requests. This is usually ok unless the remote host
> > (here: apt-cacher-ng) tries to do clever things based on the connection
> > identity. In your case, I can imagine a scenario where you there is a
> > mirror list where some mirrors only contain files for arch A and others
> > for arch B. And you have different clients in your LAN, so the first
> > client (arch A) tells acng to blacklist mirrors not having arch A and the
> > next client requires arch B which is unfortunately not available on any
> > mirrors that have arch A.
> 
> Unlikely. I only have i386 and amd64 clients and the mirrors I prefer have
> both architectures; also, my test client was the only one accessing ACNG (I
> restarted ACNG before obtaining the error messages).

As said, keyfile= thing is a kludge and only works if the client sends
the request in the exact order from exactly the same connection.
Intermediate squid proxy does not follow that rules and also does not
report the outcome correctly, so ATM this is basically a dead end.

Regards,
Eduard.

-- 
<Aquarioph> Lieber Kinder zuhause, bitte nicht poppen, da ist am ende
        alles kleiner als am Anfang :)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to