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/01/14 07:24:48 UTC

git commit: persisting data after validating partitions of a dep policy, meaningful logs

Updated Branches:
  refs/heads/master 361d5c74a -> 0ca62397e


persisting data after validating partitions of a dep policy, meaningful logs


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/0ca62397
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/0ca62397
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/0ca62397

Branch: refs/heads/master
Commit: 0ca62397e05b2d8b5dbe627a869d6bf81c848ffa
Parents: 361d5c7
Author: Nirmal Fernando <ni...@apache.org>
Authored: Tue Jan 14 11:54:04 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Tue Jan 14 11:54:04 2014 +0530

----------------------------------------------------------------------
 .../impl/CloudControllerServiceImpl.java        | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ca62397/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 88075bf..e985744 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
@@ -207,7 +207,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
         String clusterId = memberContext.getClusterId();
         Partition partition = memberContext.getPartition();
 
-        log.info("Received an instance spawn request : " + memberContext.toString());
+		log.debug("Received an instance spawn request : " + memberContext.toString());
 
         ComputeService computeService = null;
         Template template = null;
@@ -247,11 +247,10 @@ public class CloudControllerServiceImpl implements CloudControllerService {
         IaasProvider iaasProvider = cartridge.getIaasProviderOfPartition(partitionId);
         if (iaasProvider == null) {
             String msg =
-                         "Instance start-up failed. " + memberContext.toString() + ". " +
-                                 "There's no IaaS provided for the partition: " + partitionId +
-                                 " and for the Cartridge type: " + cartridgeType+". Only following "
-                                 		+ "partitions can be found in this Cartridge: "
-                                 +cartridge.getPartitionToIaasProvider().keySet().toString();
+                         "Instance start-up failed. " + "There's no IaaS provided for the partition: " + partitionId +
+                         " and for the Cartridge type: " + cartridgeType+". Only following "
+                  		+ "partitions can be found in this Cartridge: "
+                  		+cartridge.getPartitionToIaasProvider().keySet().toString()+ memberContext.toString() + ". ";
             log.fatal(msg);
             throw new CloudControllerException(msg);
         }
@@ -534,7 +533,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
                         node.getPublicAddresses().iterator().hasNext()) {
                         ip = node.getPublicAddresses().iterator().next();
                         memberContext.setPublicIpAddress(ip);
-                        log.info("Public ip address: " + memberContext.toString());
+                        log.info("Public IP Address has been set. " + memberContext.toString());
                     }
 
                     // private IP
@@ -542,7 +541,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
                         node.getPrivateAddresses().iterator().hasNext()) {
                         ip = node.getPrivateAddresses().iterator().next();
                         memberContext.setPrivateIpAddress(ip);
-                        log.info("Private ip address: " + memberContext.toString());
+                        log.info("Private IP Address has been set. " + memberContext.toString());
                     }
 
                     dataHolder.addMemberContext(memberContext);
@@ -559,7 +558,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
                     // update the topology with the newly spawned member
                     // publish data
                     if (log.isDebugEnabled()) {
-                        log.debug("Node details: \n" + node.toString() + "\n***************\n");
+                        log.debug("Node details: \n" + node.toString());
                     }
 
             } catch (Exception e) {
@@ -965,6 +964,9 @@ public class CloudControllerServiceImpl implements CloudControllerService {
         // if and only if the deployment policy valid
         cartridge.addIaasProviders(partitionToIaasProviders);
         
+        // persist data
+        persist();
+        
         log.info("All partitions "+CloudControllerUtil.getPartitionIds(partitions)+
         		" were validated successfully, against the Cartridge: "+cartridgeType);