Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 962E010B1D for ; Sat, 11 Jan 2014 01:13:03 +0000 (UTC) Received: (qmail 71503 invoked by uid 500); 11 Jan 2014 01:13:03 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 71480 invoked by uid 500); 11 Jan 2014 01:13:03 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 71473 invoked by uid 99); 11 Jan 2014 01:13:03 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Jan 2014 01:13:03 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 28F6A82D044; Sat, 11 Jan 2014 01:13:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mlsorensen@apache.org To: commits@cloudstack.apache.org Message-Id: <84c4e79accb54c02ad2421b29dfad7d7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to effa4c7 Date: Sat, 11 Jan 2014 01:13:03 +0000 (UTC) Updated Branches: refs/heads/master 5adc778d8 -> effa4c75b CLOUDSTACK-5843 For some reason the mgmt server is required to have access to the template being registered in order to check its size against resource limits during registration. This is bad, but worse, it's a sync call, so this call can hang for up to the default HTTP connection timeout. Reducing http timeout as a quick workaround, but this check needs to 1) be removed or 2) done later or 3)registerTemplate needs to be async and 4) moved off the mgmt server (ssvm is the only thing that needs access to template url). Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/effa4c75 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/effa4c75 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/effa4c75 Branch: refs/heads/master Commit: effa4c75b4970c1d87b2d1b0d83ae1f5e8312b0b Parents: 5adc778 Author: Marcus Sorensen Authored: Fri Jan 10 18:12:46 2014 -0700 Committer: Marcus Sorensen Committed: Fri Jan 10 18:12:46 2014 -0700 ---------------------------------------------------------------------- utils/src/com/cloud/utils/UriUtils.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/effa4c75/utils/src/com/cloud/utils/UriUtils.java ---------------------------------------------------------------------- diff --git a/utils/src/com/cloud/utils/UriUtils.java b/utils/src/com/cloud/utils/UriUtils.java index 4f9db85..1d5a513 100644 --- a/utils/src/com/cloud/utils/UriUtils.java +++ b/utils/src/com/cloud/utils/UriUtils.java @@ -147,6 +147,8 @@ public class UriUtils { URI uri = new URI(url); if (uri.getScheme().equalsIgnoreCase("http")) { httpConn = (HttpURLConnection)uri.toURL().openConnection(); + httpConn.setConnectTimeout(2000); + httpConn.setReadTimeout(5000); if (httpConn != null) { String contentLength = httpConn.getHeaderField("content-length"); if (contentLength != null) {