You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2014/10/11 05:44:26 UTC
[1/4] git commit: Adding member context,
soon after starting containers.
Repository: stratos
Updated Branches:
refs/heads/container-autoscaling 7708b8103 -> d16d37eac
Adding member context, soon after starting containers.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d16d37ea
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d16d37ea
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d16d37ea
Branch: refs/heads/container-autoscaling
Commit: d16d37eac35bc0f91db7e343e0e74bca21db2d2b
Parents: 8431476
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sat Oct 11 09:13:24 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sat Oct 11 09:13:38 2014 +0530
----------------------------------------------------------------------
.../stratos/cloud/controller/impl/CloudControllerServiceImpl.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d16d37ea/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
index 6717f74..5461bc2 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
@@ -1457,6 +1457,8 @@ public class CloudControllerServiceImpl implements CloudControllerService {
.getProperties(), StratosConstants.ALLOCATED_SERVICE_HOST_PORT,
String.valueOf(service.getPort())));
+ dataHolder.addMemberContext(context);
+
// wait till Pod status turns to running and send member spawned.
ScheduledThreadExecutor exec = ScheduledThreadExecutor.getInstance();
if (LOG.isDebugEnabled()) {
[3/4] git commit: Make getProperty method to use entry set instead of
key set.
Posted by ni...@apache.org.
Make getProperty method to use entry set instead of key set.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8431476d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8431476d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8431476d
Branch: refs/heads/container-autoscaling
Commit: 8431476d7e0ee703f57013e163df3f8b33e14b3e
Parents: 6dd6701
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sat Oct 11 09:12:39 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sat Oct 11 09:13:38 2014 +0530
----------------------------------------------------------------------
.../cloud/controller/util/CloudControllerUtil.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/8431476d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
index 6374cc9..fe2493d 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
@@ -293,12 +293,14 @@ public class CloudControllerUtil {
public static String getProperty(Properties properties, String key) {
if (key != null && properties != null) {
- for (Iterator<Object> iterator = properties.keySet().iterator(); iterator.hasNext();) {
- String prop = (String) iterator.next();
- if (key.equals(prop)) {
- return properties.getProperty(prop);
- }
- }
+ for (Iterator<Entry<Object, Object>> iterator = properties.entrySet().iterator(); iterator.hasNext();) {
+ Entry<Object, Object> type = (Entry<Object, Object>) iterator.next();
+ String propName = type.getKey().toString();
+ String propValue = type.getValue().toString();
+ if (key.equals(propName)) {
+ return propValue;
+ }
+ }
}
return null;
[2/4] git commit: Make pod activation error log to just print error
message as it clutters the log due to the frequency,
and print the full log on debug.
Posted by ni...@apache.org.
Make pod activation error log to just print error message as it clutters the log due to the frequency, and print the full log on debug.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/6dd6701b
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/6dd6701b
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/6dd6701b
Branch: refs/heads/container-autoscaling
Commit: 6dd6701bc2cf97c34dbfac2b1237f52a40e57778
Parents: d3b9835
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sat Oct 11 09:10:38 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sat Oct 11 09:13:38 2014 +0530
----------------------------------------------------------------------
.../stratos/cloud/controller/util/PodActivationWatcher.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/6dd6701b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/PodActivationWatcher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/PodActivationWatcher.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/PodActivationWatcher.java
index 672cfeb..23924b4 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/PodActivationWatcher.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/PodActivationWatcher.java
@@ -67,7 +67,12 @@ public class PodActivationWatcher implements Runnable {
}
} catch (Exception e) {
- LOG.error("Container Activation Watcher Failed.. ", e);
+ // not logging exception intentionally
+ LOG.error("Container Activation Watcher Failed.. Cause: "+e.getMessage());
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(e);
+ }
}
}
[4/4] git commit: Avoid response handler throwing
HttpResponseException.
Posted by ni...@apache.org.
Avoid response handler throwing HttpResponseException.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d3b98359
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d3b98359
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d3b98359
Branch: refs/heads/container-autoscaling
Commit: d3b98359ace5d68c09b5d1275072a7790cd9e3f6
Parents: 7708b81
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sat Oct 11 09:08:26 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sat Oct 11 09:13:38 2014 +0530
----------------------------------------------------------------------
.../kubernetes/client/rest/KubernetesResponseHandler.java | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d3b98359/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/KubernetesResponseHandler.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/KubernetesResponseHandler.java b/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/KubernetesResponseHandler.java
index da6aa90..828d996 100644
--- a/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/KubernetesResponseHandler.java
+++ b/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/KubernetesResponseHandler.java
@@ -40,11 +40,6 @@ public class KubernetesResponseHandler implements ResponseHandler<KubernetesResp
IOException {
StatusLine statusLine = response.getStatusLine();
HttpEntity entity = response.getEntity();
- if (statusLine.getStatusCode() >= 300) {
- throw new HttpResponseException(
- statusLine.getStatusCode(),
- statusLine.getReasonPhrase());
- }
if (entity == null) {
throw new ClientProtocolException("Response contains no content");
}