Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19081

Download update center from master by default

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The Jenkins update center retrieval code, as well as the code which obtains tool catalogues, is written to piggyback on the Internet connectivity of the user's browser, rather than directly downloading files. This has the advantage that if the master is not configured for a proxy (or cannot reach the Internet at all) you can still check for updates. But it has a number of disadvantages:

      1. The user's bandwidth is taken up, instead of the server's.

      2. The security mechanisms needed for this to work—signing to allow non-administrators to do the download, JSONP or postDocument to bypass same-origin restrictions, and some JavaScript AJAX glue—are complex and fragile, so when they break, updates are broken and it is tricky to debug the problem: you need to examine not only the server's logs and the update center's content, but the browser error console too.

      3. The download is interrupted by a new page load, so if a user clicks rapidly on several links, Jenkins goes into an exponential backoff procedure which can result in the download being significantly delayed with no clear explanation.

      4. The actual downloads of plugins or tools are still done directly, so you cannot really run with the master disconnected from the Internet—you can at best see that there are updates which could be installed.

      It would be better to default to making a direct connection, and fall back to the current browser tricks only if that fails.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/model/DownloadService.java
            core/src/main/java/hudson/model/UpdateCenter.java
            core/src/main/java/hudson/model/UpdateSite.java
            core/src/main/java/jenkins/model/DownloadSettings.java
            core/src/main/java/jenkins/security/DownloadSettings.java
            core/src/main/resources/hudson/PluginManager/advanced.jelly
            core/src/main/resources/hudson/model/UpdateCenter/PageDecoratorImpl/footer.jelly
            core/src/main/resources/jenkins/model/DownloadSettings/config.groovy
            core/src/main/resources/jenkins/model/DownloadSettings/help-useBrowser.html
            core/src/main/resources/jenkins/security/DownloadSettings/config.groovy
            core/src/main/resources/jenkins/security/DownloadSettings/help-checkSignature.html
            core/src/main/resources/jenkins/security/DownloadSettings/help-useBrowser.html
            core/src/main/resources/jenkins/security/Messages.properties
            test/src/test/java/hudson/model/DownloadServiceTest.java
            http://jenkins-ci.org/commit/jenkins/ca976dac70ad0945660db35d7e0bc6f063844472
            Log:
            JENKINS-19081 Removed DownloadSettings.checkSignature; back to using a plain system property for this.
            (cherry picked from commit df9c92e461443415be06743f0f8fc0b3937f2408)

            Compare: https://github.com/jenkinsci/jenkins/compare/de5e12f3b646...ca976dac70ad

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateCenter.java core/src/main/java/hudson/model/UpdateSite.java core/src/main/java/jenkins/model/DownloadSettings.java core/src/main/java/jenkins/security/DownloadSettings.java core/src/main/resources/hudson/PluginManager/advanced.jelly core/src/main/resources/hudson/model/UpdateCenter/PageDecoratorImpl/footer.jelly core/src/main/resources/jenkins/model/DownloadSettings/config.groovy core/src/main/resources/jenkins/model/DownloadSettings/help-useBrowser.html core/src/main/resources/jenkins/security/DownloadSettings/config.groovy core/src/main/resources/jenkins/security/DownloadSettings/help-checkSignature.html core/src/main/resources/jenkins/security/DownloadSettings/help-useBrowser.html core/src/main/resources/jenkins/security/Messages.properties test/src/test/java/hudson/model/DownloadServiceTest.java http://jenkins-ci.org/commit/jenkins/ca976dac70ad0945660db35d7e0bc6f063844472 Log: JENKINS-19081 Removed DownloadSettings.checkSignature; back to using a plain system property for this. (cherry picked from commit df9c92e461443415be06743f0f8fc0b3937f2408) Compare: https://github.com/jenkinsci/jenkins/compare/de5e12f3b646...ca976dac70ad
            Hide
            jglick Jesse Glick added a comment -

            JENKINS-15105 means that Downloadable.updateNow does not work.

            Show
            jglick Jesse Glick added a comment - JENKINS-15105 means that Downloadable.updateNow does not work.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/model/DownloadService.java
            core/src/main/java/hudson/model/UpdateCenter.java
            core/src/main/java/hudson/model/UpdateSite.java
            core/src/main/java/hudson/util/FormValidation.java
            core/src/main/java/jenkins/security/DownloadSettings.java
            core/src/main/resources/hudson/PluginManager/advanced.jelly
            core/src/main/resources/hudson/model/UpdateCenter/PageDecoratorImpl/footer.jelly
            core/src/main/resources/jenkins/security/DownloadSettings/config.groovy
            core/src/main/resources/jenkins/security/DownloadSettings/help-checkSignature.html
            core/src/main/resources/jenkins/security/DownloadSettings/help-useBrowser.html
            core/src/main/resources/jenkins/security/Messages.properties
            test/src/test/java/hudson/model/DownloadServiceTest.java
            http://jenkins-ci.org/commit/jenkins/33d88c015c7fc6c6cdb093d4a3d04a75aa85fa80
            Log:
            [FIXED JENKINS-19081] Offer the option of downloading metadata directly from the server.
            (cherry picked from commit 1ac77750e93f9a1970fecbecdf7f84279d0a62b9)

            Conflicts:
            core/src/main/java/hudson/model/DownloadService.java
            core/src/main/java/hudson/model/UpdateSite.java

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateCenter.java core/src/main/java/hudson/model/UpdateSite.java core/src/main/java/hudson/util/FormValidation.java core/src/main/java/jenkins/security/DownloadSettings.java core/src/main/resources/hudson/PluginManager/advanced.jelly core/src/main/resources/hudson/model/UpdateCenter/PageDecoratorImpl/footer.jelly core/src/main/resources/jenkins/security/DownloadSettings/config.groovy core/src/main/resources/jenkins/security/DownloadSettings/help-checkSignature.html core/src/main/resources/jenkins/security/DownloadSettings/help-useBrowser.html core/src/main/resources/jenkins/security/Messages.properties test/src/test/java/hudson/model/DownloadServiceTest.java http://jenkins-ci.org/commit/jenkins/33d88c015c7fc6c6cdb093d4a3d04a75aa85fa80 Log: [FIXED JENKINS-19081] Offer the option of downloading metadata directly from the server. (cherry picked from commit 1ac77750e93f9a1970fecbecdf7f84279d0a62b9) Conflicts: core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateSite.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/model/DownloadService.java
            core/src/main/java/hudson/model/UpdateCenter.java
            core/src/main/java/hudson/model/UpdateSite.java
            core/src/main/java/hudson/util/FormValidation.java
            core/src/main/java/jenkins/security/DownloadSettings.java
            core/src/main/resources/hudson/PluginManager/advanced.jelly
            core/src/main/resources/hudson/model/UpdateCenter/PageDecoratorImpl/footer.jelly
            core/src/main/resources/jenkins/security/DownloadSettings/config.groovy
            core/src/main/resources/jenkins/security/DownloadSettings/help-checkSignature.html
            core/src/main/resources/jenkins/security/DownloadSettings/help-useBrowser.html
            core/src/main/resources/jenkins/security/Messages.properties
            test/src/test/java/hudson/model/DownloadServiceTest.java
            http://jenkins-ci.org/commit/jenkins/33d88c015c7fc6c6cdb093d4a3d04a75aa85fa80
            Log:
            [FIXED JENKINS-19081] Offer the option of downloading metadata directly from the server.
            (cherry picked from commit 1ac77750e93f9a1970fecbecdf7f84279d0a62b9)

            Conflicts:
            core/src/main/java/hudson/model/DownloadService.java
            core/src/main/java/hudson/model/UpdateSite.java

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateCenter.java core/src/main/java/hudson/model/UpdateSite.java core/src/main/java/hudson/util/FormValidation.java core/src/main/java/jenkins/security/DownloadSettings.java core/src/main/resources/hudson/PluginManager/advanced.jelly core/src/main/resources/hudson/model/UpdateCenter/PageDecoratorImpl/footer.jelly core/src/main/resources/jenkins/security/DownloadSettings/config.groovy core/src/main/resources/jenkins/security/DownloadSettings/help-checkSignature.html core/src/main/resources/jenkins/security/DownloadSettings/help-useBrowser.html core/src/main/resources/jenkins/security/Messages.properties test/src/test/java/hudson/model/DownloadServiceTest.java http://jenkins-ci.org/commit/jenkins/33d88c015c7fc6c6cdb093d4a3d04a75aa85fa80 Log: [FIXED JENKINS-19081] Offer the option of downloading metadata directly from the server. (cherry picked from commit 1ac77750e93f9a1970fecbecdf7f84279d0a62b9) Conflicts: core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateSite.java
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3989
            [FIXED JENKINS-19081] Offer the option of downloading metadata directly from the server. (Revision 33d88c015c7fc6c6cdb093d4a3d04a75aa85fa80)

            Result = SUCCESS
            jesse glick : 33d88c015c7fc6c6cdb093d4a3d04a75aa85fa80
            Files :

            • core/src/main/resources/jenkins/security/DownloadSettings/help-checkSignature.html
            • test/src/test/java/hudson/model/DownloadServiceTest.java
            • core/src/main/java/hudson/model/DownloadService.java
            • core/src/main/resources/hudson/model/UpdateCenter/PageDecoratorImpl/footer.jelly
            • core/src/main/resources/jenkins/security/DownloadSettings/help-useBrowser.html
            • core/src/main/resources/jenkins/security/DownloadSettings/config.groovy
            • core/src/main/java/hudson/PluginManager.java
            • core/src/main/java/hudson/model/UpdateSite.java
            • core/src/main/java/jenkins/security/DownloadSettings.java
            • core/src/main/resources/hudson/PluginManager/advanced.jelly
            • core/src/main/resources/jenkins/security/Messages.properties
            • core/src/main/java/hudson/model/UpdateCenter.java
            • core/src/main/java/hudson/util/FormValidation.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3989 [FIXED JENKINS-19081] Offer the option of downloading metadata directly from the server. (Revision 33d88c015c7fc6c6cdb093d4a3d04a75aa85fa80) Result = SUCCESS jesse glick : 33d88c015c7fc6c6cdb093d4a3d04a75aa85fa80 Files : core/src/main/resources/jenkins/security/DownloadSettings/help-checkSignature.html test/src/test/java/hudson/model/DownloadServiceTest.java core/src/main/java/hudson/model/DownloadService.java core/src/main/resources/hudson/model/UpdateCenter/PageDecoratorImpl/footer.jelly core/src/main/resources/jenkins/security/DownloadSettings/help-useBrowser.html core/src/main/resources/jenkins/security/DownloadSettings/config.groovy core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/UpdateSite.java core/src/main/java/jenkins/security/DownloadSettings.java core/src/main/resources/hudson/PluginManager/advanced.jelly core/src/main/resources/jenkins/security/Messages.properties core/src/main/java/hudson/model/UpdateCenter.java core/src/main/java/hudson/util/FormValidation.java

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: