Bug 539316 - Disable transparent mirroring system
Summary: Disable transparent mirroring system
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Servers (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Denis Roy CLA
QA Contact: Denis Roy CLA
URL:
Whiteboard:
Keywords:
: 541186 543464 549671 (view as bug list)
Depends on:
Blocks: 539280 541186
  Show dependency tree
 
Reported: 2018-09-21 04:25 EDT by Ed Merks CLA
Modified: 2019-09-24 08:09 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Merks CLA 2018-09-21 04:25:12 EDT
One symptom of this problem was seen yesterday in the following Bugzilla:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=539280

I ran into the problem this morning again.  Looking into issues from the newcomers forum about problems with the latest installer on the Mac, I did a new nightly build which created new installers.

Our wiki uses the appropriate URL for using mirrors to download the latest:

https://www.eclipse.org/downloads/download.php?file=/oomph/products/latest/eclipse-inst-mac64.tar.gz

The mirror page indicates there are currently (as I write this note) no mirrors. But when I download the contents from "the main site" I get the wrong contents. 

I also get the wrong contents using this URL:

http://download.eclipse.org/oomph/products/latest/eclipse-inst-mac64.tar.gz

I know for sure the contents are wrong; the downloaded file is not the correct size, i.e., not the size I see on the server looking at it with WinSCP.

So it seems clear to me that the transparent mirroring can and does return stale content.

This is a particularly bad problem when transparent mirroring is used for serving up p2 metadata at a location with changing contents, which happens with http://download.eclipse.org/releases/latest but also with http://download.eclipse.org/releases/2018-09 just minutes before the release is made available.

I get the impression that transparent mirroring is not doing proper checking that its returning the proper content.  I'm sure it's expensive/difficult to check the timestamp of the local version and that of the mirror to which the server redirects, so perhaps a simple check of the local timestamp to see if the content is less than a day old, and in that case return the local content would suffice...
Comment 1 Ed Merks CLA 2018-09-27 01:02:20 EDT
I suspect that the server behavior can also lead to circular redirects as is suggested by this problem report:

https://www.eclipse.org/forums/index.php/mv/msg/1095347/1795677/#msg_1795677
Comment 2 Denis Roy CLA 2018-10-18 15:44:03 EDT
Will look at this right after EclipseCon.
Comment 3 Denis Roy CLA 2018-10-31 11:31:20 EDT
If I understand correctly, the problem happens when you upload a new version of an existing file? You are sent to a mirror that still has the old version?
Comment 4 Ed Merks CLA 2018-10-31 12:13:14 EDT
Exactly.
Comment 5 Ed Merks CLA 2019-01-15 01:35:01 EST
Note that in https://bugs.eclipse.org/bugs/show_bug.cgi?id=515596 it's also evident that being transparently redirected to a mirror can result in being redirected to a mirror that's unresponsive.  This can make it next to impossible to download the resource you need or to access a p2 update site you need, depending on one's physical/logical location in the network.

Let least if there were some query string that the server would accept to indicate "please really get this resource from the main site", or perhaps more generally a query string that allowed one to specify the mirror to be used, with the main site being one such possible choice...
Comment 6 Gunnar Wagenknecht CLA 2019-01-15 01:41:02 EST
(In reply to Ed Merks from comment #5)
> Let least if there were some query string that the server would accept to
> indicate "please really get this resource from the main site", or perhaps
> more generally a query string that allowed one to specify the mirror to be
> used, with the main site being one such possible choice...

See bug 541186. It's impossible for some folks to even get to all the possible mirrors due to network restrictions. 

A query string might be too easy to abuse. However, in case the Friends of Eclipse mirror is still available this one could be a possibility in combination with authentication.
Comment 7 Ed Merks CLA 2019-01-15 09:54:28 EST
Yet more problems reported on the forum, in this case not stale content, but truncated contents:

https://www.eclipse.org/forums/index.php/mv/msg/1097082/1801211/#msg_1801211
Comment 8 Gunnar Wagenknecht CLA 2019-01-15 11:15:39 EST
*** Bug 543464 has been marked as a duplicate of this bug. ***
Comment 9 Denis Roy CLA 2019-02-26 11:07:35 EST
FWIW, we are no longer using transparent mirroring for JAR and XZ files, so that should cover the most important content.
Comment 10 Denis Roy CLA 2019-06-13 10:02:35 EDT
Ed, I'll close this as fixed. Please let me know if there are other improvements that can be made.
Comment 11 Mikaël Barbero CLA 2019-07-31 04:46:21 EDT
*** Bug 549671 has been marked as a duplicate of this bug. ***
Comment 12 Mikaël Barbero CLA 2019-07-31 04:46:58 EDT
Reopening as there is another case with bug 549671.
Comment 13 Scott Kurz CLA 2019-07-31 09:03:16 EDT
Thanks for the explanation in Bug 549671 and pointer here.  I'm wondering, did you mean to also change the status (it still shows RESOLVED FIXED, FYI..)?
Comment 14 Mikaël Barbero CLA 2019-07-31 09:04:01 EDT
yes, reopening.
Comment 15 Denis Roy CLA 2019-09-12 08:29:13 EDT
I'm considering turning this off.

It's a great way to save bandwidth, but after having it on for some while it's caused many issues. And from a "are we doing the right thing" it doesn't feel so.
Comment 16 Gunnar Wagenknecht CLA 2019-09-12 11:16:47 EDT
(In reply to Denis Roy from comment #15)
> I'm considering turning this off.
> 
> It's a great way to save bandwidth, but after having it on for some while
> it's caused many issues. And from a "are we doing the right thing" it
> doesn't feel so.

+1
Comment 17 Ed Merks CLA 2019-09-12 11:55:31 EDT
+1

I run into problems from this all the time so I can never feel sure I've really downloaded something that I'm just put in place.
Comment 18 Ed Merks CLA 2019-09-20 01:31:56 EDT
Eike and I ran into what appears to be this problem yet again today.

For a composite update site, p2 ended up downloading inconsistent versions of compositeArtifacts.jar and compositeContent.jar, so it could resolve the IUs to the expected latest versions, but then p2 couldn't find the artifacts because the compositeArtifacts pointed at a different build than did the compontentContent.jar.

It's just super error prone and confusing that one cannot ever be really sure that one is getting the latest version of anything as opposed to some not-yet-properly-and-still-out-of-date mirrored version.

And I see exactly the symptoms of this same type of problem in the newcomers forum on a semi-regular basis.
Comment 19 Denis Roy CLA 2019-09-20 11:55:29 EDT
Patch is pending review.
Comment 20 Denis Roy CLA 2019-09-23 13:16:21 EDT
It's been turned off.
Comment 21 Gunnar Wagenknecht CLA 2019-09-24 08:09:51 EDT
*** Bug 541186 has been marked as a duplicate of this bug. ***