Antonio Rendina via Dng wrote:
> > File has unexpected size (10844 != 11820). Mirror sync in progress? [IP:
>
> I'm sorry :-)
> I forgot that I have apt-cacher-ng in place. It looks that the problem was
> there, I shut it down and it started to work.
> Funny thing is that I did a dist-upgrade without disabling it and it went
> quite smooth.
I have been a long time user of apt-cacher-ng used with Debian
repositories. But I routinely see the above errors when using it with
Devuan round-robin mirrors. I never see it when using apt-cacher-ng
using the primary mirror.
This leads me to believe, though I do not have facts to back this up,
that the round-robin mirrors are not atomically updated in a way that
provides a consistent view for downstream caching.
At one time upon having this problem I dug into the apt-cacher-ng
cache files and found that the problem file had been obtained from a
mirror and the validity of the file had not yet expired. Because the
file was still valid by what acng thought was true about the file
there was no reason for acng to try to update it. It was still valid.
I am going to describe this very fuzzy because it was some time ago, I
have slept many times since then, and I don't remember the actual
details. Look at the acng cached *.head file contents.
Of course by the time I was debugging if I looked at that upstream
mirrored file then I received the updated copy of the file. And if I
manually removed it from the acng cache then acng of course then
retrieved a fresh copy.
Note that each mirror sets their own caching policy on the http web
frontend serving those files. Some will be using Apache and some will
be using Nginx and others will be using other web front-ends.
for ip in $(host deb.devuan.org | awk '/has address/{print$NF}'); do
echo HEAD probe of $ip...
HEAD -H "Host: deb.devuan.org" http://$ip/merged/dists/daedalus/main/binary-all/Release
done
root@clash:/var/cache/apt-cacher-ng# find . -name '*.head' -exec head {} + | less
That's just a quickie hack query to show how every server is producing
a different set of headers for the same file. And then upon having
this problem I could look at the acng cached .head files and see that
acng thought it had a good version when the upstream had already
changed. I think by all of the information acng has at the moment it
thinks it is okay to continue caching the file but that meanwhile the
upstream copy of it has already changed.
Due to these problems I had to avoid using downstream caching with
apt-cacher-ng and the round-robin deb.devuan.org. Which is a mild
nuisance to me because it slows down quick rebuilds across multiple
repeated installations.
But I believe apt-cacher-ng is okay if one selects ONE consistent
mirror site instead. I am still gathering information about this on
my side of things so that's just a guess at best at this moment. But
then I can continue to get fast local cached package access for fast
repeated local installations.
Hope this fuzzy information dump helps illuminate while trying not to
create too much FUD about it along the way.
Bob