You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/02/26 11:50:44 UTC

[1/5] stratos git commit: Updating pod query logic in pod activation wait method

Repository: stratos
Updated Branches:
  refs/heads/master 6e57bd561 -> fc54633fd
  refs/heads/master-deployment-policy-fix-merge 106f46561 -> 5415c2120


Updating pod query logic in pod activation wait method


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

Branch: refs/heads/master
Commit: fc54633fdf02e9b08da14dee9f512e19fe94581e
Parents: 6e57bd5
Author: Imesh Gunaratne <im...@apache.org>
Authored: Thu Feb 26 15:40:41 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Feb 26 15:41:40 2015 +0530

----------------------------------------------------------------------
 .../iaases/kubernetes/KubernetesIaas.java       | 16 ++-------
 .../live/KubernetesApiClientLiveTest.java       | 35 ++++++++++++++++----
 2 files changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/fc54633f/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
index 36cd3f3..7ea0f4a 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
@@ -40,7 +40,6 @@ import org.apache.stratos.kubernetes.client.KubernetesApiClient;
 import org.apache.stratos.kubernetes.client.KubernetesConstants;
 import org.apache.stratos.kubernetes.client.exceptions.KubernetesClientException;
 import org.apache.stratos.kubernetes.client.model.EnvironmentVariable;
-import org.apache.stratos.kubernetes.client.model.Labels;
 import org.apache.stratos.kubernetes.client.model.Pod;
 import org.apache.stratos.kubernetes.client.model.Service;
 import org.apache.stratos.messaging.domain.topology.KubernetesService;
@@ -278,25 +277,14 @@ public class KubernetesIaas extends Iaas {
     private Pod waitForPodToBeActivated(MemberContext memberContext, KubernetesApiClient kubernetesApi)
             throws KubernetesClientException, InterruptedException {
 
-        Labels labels = new Labels();
-        String podName = memberContext.getKubernetesPodName();
-        labels.setName(podName);
-
         Pod pod;
-        List<Pod> pods;
         boolean podCreated = false;
         boolean podRunning = false;
         long startTime = System.currentTimeMillis();
 
         while (!podRunning) {
-            pods = kubernetesApi.queryPods(new Labels[]{labels});
-            if ((pods != null) && (pods.size() > 0)) {
-                if (pods.size() > 1) {
-                    throw new RuntimeException("System error, more than one pod found with the same pod name: "
-                            + podName);
-                }
-
-                pod = pods.get(0);
+            pod = kubernetesApi.getPod(memberContext.getKubernetesPodId());
+            if (pod != null) {
                 podCreated = true;
                 if (pod.getCurrentState().getStatus().equals(KubernetesConstants.POD_STATUS_RUNNING)) {
                     log.info(String.format("Pod status changed to running: [application] %s [cartridge] %s [member] %s " +

http://git-wip-us.apache.org/repos/asf/stratos/blob/fc54633f/components/org.apache.stratos.kubernetes.client/src/test/java/org/apache/stratos/kubernetes/client/live/KubernetesApiClientLiveTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.kubernetes.client/src/test/java/org/apache/stratos/kubernetes/client/live/KubernetesApiClientLiveTest.java b/components/org.apache.stratos.kubernetes.client/src/test/java/org/apache/stratos/kubernetes/client/live/KubernetesApiClientLiveTest.java
index 710e8e6..2d48724 100644
--- a/components/org.apache.stratos.kubernetes.client/src/test/java/org/apache/stratos/kubernetes/client/live/KubernetesApiClientLiveTest.java
+++ b/components/org.apache.stratos.kubernetes.client/src/test/java/org/apache/stratos/kubernetes/client/live/KubernetesApiClientLiveTest.java
@@ -27,7 +27,9 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.kubernetes.client.KubernetesApiClient;
 import org.apache.stratos.kubernetes.client.KubernetesConstants;
 import org.apache.stratos.kubernetes.client.exceptions.KubernetesClientException;
-import org.apache.stratos.kubernetes.client.model.*;
+import org.apache.stratos.kubernetes.client.model.Pod;
+import org.apache.stratos.kubernetes.client.model.Port;
+import org.apache.stratos.kubernetes.client.model.Service;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -56,6 +58,7 @@ public class KubernetesApiClientLiveTest extends TestCase{
     private static final int DEFAULT_CONTAINER_PORT = 6379; //80;
     private static final int SERVICE_PORT = 4500;
     private static final String DEFAULT_KUBERNETES_MASTER_IP = "172.17.8.100";
+    private static final int KUBERNETES_API_PORT = 8080;
     private static final String DEFAULT_DOCKER_IMAGE =  "gurpartap/redis"; //"stratos/php:4.1.0-alpha";
     private static final int POD_ACTIVATION_WAIT_TIME = 10000; // 10 seconds
 
@@ -71,7 +74,7 @@ public class KubernetesApiClientLiveTest extends TestCase{
         log.info("Setting up live test...");
         endpoint = System.getProperty("kubernetes.api.endpoint");
         if (endpoint == null) {
-            endpoint = "http://" + DEFAULT_KUBERNETES_MASTER_IP + ":8080/api/" + KubernetesConstants.KUBERNETES_API_VERSION + "/";
+            endpoint = "http://" + DEFAULT_KUBERNETES_MASTER_IP + ":" + KUBERNETES_API_PORT + "/api/" + KubernetesConstants.KUBERNETES_API_VERSION + "/";
         }
         log.info("Kubernetes endpoint: " + endpoint);
         client = new KubernetesApiClient(endpoint);
@@ -214,13 +217,21 @@ public class KubernetesApiClientLiveTest extends TestCase{
 
     public void deleteServices() {
         try {
+            int count = 0;
             List<Service> services = client.getServices();
-            if(services != null) {
+            while((services != null) && (services.size() > 0)) {
                 for (Service service : services) {
-                    if (!service.getId().contains("kubernetes")) {
+                    if ((StringUtils.isNotBlank(service.getId())) && (!service.getId().contains("kubernetes"))) {
                         client.deleteService(service.getId());
+                        count++;
+                        log.info(String.format("Service deleted: [service] %s", service.getId()));
                     }
                 }
+                services = client.getServices();
+            }
+
+            if(count > 0) {
+                log.info(String.format("%d services deleted", count));
             }
         } catch (KubernetesClientException e) {
             log.error("Could not delete services", e);
@@ -229,11 +240,21 @@ public class KubernetesApiClientLiveTest extends TestCase{
 
     public void deletePods() {
         try {
+            int count = 0;
             List<Pod> pods = client.getPods();
-            if(pods != null) {
-                for (Pod replicationController : pods) {
-                    client.deletePod(replicationController.getId());
+            while ((pods != null) || (pods.size() > 0)) {
+                for (Pod pod : pods) {
+                    if (StringUtils.isNotBlank(pod.getId())) {
+                        client.deletePod(pod.getId());
+                        count++;
+                        log.info(String.format("Pod deleted: [pod] %s", pod.getId()));
+                    }
                 }
+                pods = client.getPods();
+            }
+
+            if(count > 0) {
+                log.info(String.format("%d pods deleted", count));
             }
         } catch (KubernetesClientException e) {
             log.error("Could not delete pods", e);


[4/5] stratos git commit: Fixed issues in listDomainMappings.

Posted by im...@apache.org.
Fixed issues in listDomainMappings.


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

Branch: refs/heads/master-deployment-policy-fix-merge
Commit: 5415c21203171778fec35bd10c75c54a0ed6a075
Parents: 7f39d09
Author: Dinithi <di...@wso2.com>
Authored: Wed Feb 25 11:39:29 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Feb 26 16:20:08 2015 +0530

----------------------------------------------------------------------
 .../org/apache/stratos/cli/RestCommandLineService.java   | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/5415c212/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index e031ca2..67d6b7c 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -1256,17 +1256,16 @@ public class RestCommandLineService {
             List<DomainMappingBean> list = (List<DomainMappingBean>) restClient.listEntity(
                     ENDPOINT_DOMAIN_MAPPINGS.replace("{applicationId}", applicationId),
                     listType, "domain mappings");
-            if ((list != null) && (list.size() > 0)) {
+            if ((list == null) && (list.size() <= 0)) {
                 System.out.println("No domain mappings found in application: [application-id] " + applicationId);
                 return;
             }
 
             RowMapper<DomainMappingBean> rowMapper = new RowMapper<DomainMappingBean>() {
                 public String[] getData(DomainMappingBean domainMappingBean) {
-                    String[] data = new String[3];
-                    data[0] = domainMappingBean.getCartridgeAlias();
-                    data[1] = domainMappingBean.getDomainName();
-                    data[2] = domainMappingBean.getContextPath();
+                    String[] data = new String[2];
+                    data[0] = domainMappingBean.getDomainName();
+                    data[1] = domainMappingBean.getContextPath();
                     return data;
                 }
             };
@@ -1274,7 +1273,7 @@ public class RestCommandLineService {
             DomainMappingBean[] array = new DomainMappingBean[list.size()];
             array = list.toArray(array);
             System.out.println("Domain mappings found in application: [application-id] " + applicationId);
-            CliUtils.printTable(array, rowMapper, "Cartridge Alias", "Domain Name", "Context Path");
+            CliUtils.printTable(array, rowMapper, "Domain Name", "Context Path");
         } catch (Exception e) {
             String message = "Could not list domain mappings in application: [application-id] " + applicationId;
             printError(message, e);


[3/5] stratos git commit: CLI command added to Describe and delete application signup. domain-mapping.json file changed in single-cartridge sample

Posted by im...@apache.org.
CLI command added to Describe and delete application signup.
domain-mapping.json file changed in single-cartridge sample

Conflicts:
	components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java


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

Branch: refs/heads/master-deployment-policy-fix-merge
Commit: e8d120b8bb9a230b7e8f239f8c78b83c4a9c72dc
Parents: e7904d3
Author: Dinithi <di...@wso2.com>
Authored: Tue Feb 24 21:02:05 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Feb 26 16:20:02 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/cli/RestClient.java |  4 +--
 .../stratos/cli/RestCommandLineService.java     | 38 ++++++++++----------
 .../apache/stratos/cli/StratosApplication.java  |  6 ++++
 .../artifacts/domain-mappings.json              | 12 +++----
 4 files changed, 31 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/e8d120b8/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
index 404c0fa..7f06495 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
@@ -157,7 +157,7 @@ public class RestClient implements GenericRestClient {
     public void deployEntity(String serviceEndpoint, String entityBody, String entityName) {
         try {
             int responseCode = executePost(serviceEndpoint, entityBody);
-            if (responseCode == 201) {
+            if (responseCode == 201 || responseCode == 200) {
                 System.out.println(String.format("Successfully added %s", entityName));
             }
         } catch (Exception e) {
@@ -335,7 +335,7 @@ public class RestClient implements GenericRestClient {
         DefaultHttpClient httpClient = new DefaultHttpClient();
         try {
             System.out.println(getBaseURL() + serviceEndpoint.replace("{id}", identifier));
-            HttpResponse response = doDelete(httpClient, getBaseURL() + serviceEndpoint.replace("{id}", identifier));
+            HttpResponse response = doDelete(httpClient, getBaseURL() + serviceEndpoint);
 
             int responseCode = response.getStatusLine().getStatusCode();
             if (responseCode < 200 || responseCode >= 300) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/e8d120b8/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 9928962..e031ca2 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -1257,24 +1257,24 @@ public class RestCommandLineService {
                     ENDPOINT_DOMAIN_MAPPINGS.replace("{applicationId}", applicationId),
                     listType, "domain mappings");
             if ((list != null) && (list.size() > 0)) {
-                RowMapper<DomainMappingBean> rowMapper = new RowMapper<DomainMappingBean>() {
-                    public String[] getData(DomainMappingBean domainMappingBean) {
-                        String[] data = new String[3];
-                        data[0] = domainMappingBean.getCartridgeAlias();
-                        data[1] = domainMappingBean.getDomainName();
-                        data[2] = domainMappingBean.getContextPath();
-                        return data;
-                    }
-                };
-
-                DomainMappingBean[] array = new DomainMappingBean[list.size()];
-                array = list.toArray(array);
-                System.out.println("Domain mappings found in application: [application-id] " + applicationId);
-                CliUtils.printTable(array, rowMapper, "Cartridge Alias", "Domain Name", "Context Path");
-            } else {
                 System.out.println("No domain mappings found in application: [application-id] " + applicationId);
                 return;
             }
+
+            RowMapper<DomainMappingBean> rowMapper = new RowMapper<DomainMappingBean>() {
+                public String[] getData(DomainMappingBean domainMappingBean) {
+                    String[] data = new String[3];
+                    data[0] = domainMappingBean.getCartridgeAlias();
+                    data[1] = domainMappingBean.getDomainName();
+                    data[2] = domainMappingBean.getContextPath();
+                    return data;
+                }
+            };
+
+            DomainMappingBean[] array = new DomainMappingBean[list.size()];
+            array = list.toArray(array);
+            System.out.println("Domain mappings found in application: [application-id] " + applicationId);
+            CliUtils.printTable(array, rowMapper, "Cartridge Alias", "Domain Name", "Context Path");
         } catch (Exception e) {
             String message = "Could not list domain mappings in application: [application-id] " + applicationId;
             printError(message, e);
@@ -1408,15 +1408,15 @@ public class RestCommandLineService {
         DefaultHttpClient httpClient = new DefaultHttpClient();
         try {
             HttpResponse response = restClient.doPost(httpClient, restClient.getBaseURL()
-                    + ENDPOINT_UNDEPLOY_APPLICATION + "/" + applicationId, "");
+                    + ENDPOINT_UNDEPLOY_APPLICATION.replace("{id}",applicationId), "");
 
             String responseCode = "" + response.getStatusLine().getStatusCode();
 
             GsonBuilder gsonBuilder = new GsonBuilder();
             Gson gson = gsonBuilder.create();
 
-            if (responseCode.equals(CliConstants.RESPONSE_OK)) {
-                System.out.println("You have succesfully undelopyed application: " + applicationId);
+            if (Integer.parseInt(responseCode) < 300 && Integer.parseInt(responseCode) >= 200) {
+                System.out.println("You have successfully undeployed application: " + applicationId);
                 return;
             } else {
                 String resultString = CliUtils.getHttpResponseString(response);
@@ -1505,7 +1505,7 @@ public class RestCommandLineService {
      * @throws CommandException
      */
     public void addApplicationSignup (String entityBody, String applicationId) {
-        restClient.deployEntity(ENDPOINT_APPLICATION_SIGNUP.replace("{applicationId}", applicationId), entityBody, "application");
+        restClient.deployEntity(ENDPOINT_APPLICATION_SIGNUP.replace("{applicationId}", applicationId), entityBody, "application signup");
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/e8d120b8/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
index d9815e9..7d9c9be 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
@@ -267,6 +267,12 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
         command = new UpdateTenantCommand();
         commands.put(command.getName(), command);
 
+        command = new DescribeApplicationSignupCommand();
+        commands.put(command.getName(),command);
+
+        command = new DeleteApplicationSignupCommand();
+        commands.put(command.getName(),command);
+
         if (logger.isDebugEnabled()) {
             logger.debug("Created {} commands for the application. {}", commands.size(), commands.keySet());
         }

http://git-wip-us.apache.org/repos/asf/stratos/blob/e8d120b8/samples/applications/single-cartridge/artifacts/domain-mappings.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/artifacts/domain-mappings.json b/samples/applications/single-cartridge/artifacts/domain-mappings.json
index 2b96d58..cfa7d6e 100644
--- a/samples/applications/single-cartridge/artifacts/domain-mappings.json
+++ b/samples/applications/single-cartridge/artifacts/domain-mappings.json
@@ -1,9 +1,5 @@
 {
-	"domainMappings": [
-		{
-			"cartridgeAlias":"tomcat",
-			"domainName":"abc.com",
-			"contextPath":"/abc/app"
-		}
-	]
-}
\ No newline at end of file
+	"cartridgeAlias":"php1",
+	"domainName":"abc.com",
+	"contextPath":"/abc/app"
+}


[5/5] stratos git commit: domain-mapping.json file changed in single-cartridge sample

Posted by im...@apache.org.
domain-mapping.json file changed in single-cartridge sample


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

Branch: refs/heads/master-deployment-policy-fix-merge
Commit: 7f39d09eca1b1d1f85d4a4019432f514bb9ffa0f
Parents: e8d120b
Author: Dinithi <di...@wso2.com>
Authored: Wed Feb 25 09:33:37 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Feb 26 16:20:08 2015 +0530

----------------------------------------------------------------------
 .../single-cartridge/artifacts/domain-mappings.json     | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/7f39d09e/samples/applications/single-cartridge/artifacts/domain-mappings.json
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/artifacts/domain-mappings.json b/samples/applications/single-cartridge/artifacts/domain-mappings.json
index cfa7d6e..68a74aa 100644
--- a/samples/applications/single-cartridge/artifacts/domain-mappings.json
+++ b/samples/applications/single-cartridge/artifacts/domain-mappings.json
@@ -1,5 +1,9 @@
 {
-	"cartridgeAlias":"php1",
-	"domainName":"abc.com",
-	"contextPath":"/abc/app"
-}
+    "domainMappings": [
+        {
+            "cartridgeAlias":"php1",
+            "domainName":"abc.com",
+            "contextPath":"/abc/app"
+        }
+    ]
+}
\ No newline at end of file


[2/5] stratos git commit: Added common.feature.group to cc profile

Posted by im...@apache.org.
Added common.feature.group to cc profile


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

Branch: refs/heads/master-deployment-policy-fix-merge
Commit: e7904d30ad6c468875ba8aabf70f0da8fed482e6
Parents: 106f465
Author: hsbathiya <hs...@gmail.com>
Authored: Thu Feb 26 03:16:18 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Feb 26 15:43:32 2015 +0530

----------------------------------------------------------------------
 products/stratos/modules/p2-profile-gen/pom.xml | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/e7904d30/products/stratos/modules/p2-profile-gen/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/p2-profile-gen/pom.xml b/products/stratos/modules/p2-profile-gen/pom.xml
index a5a8ac1..f0fe056 100644
--- a/products/stratos/modules/p2-profile-gen/pom.xml
+++ b/products/stratos/modules/p2-profile-gen/pom.xml
@@ -814,6 +814,10 @@
                             <deleteOldProfileFiles>true</deleteOldProfileFiles>
                             <features>
                                 <feature>
+                                    <id>org.apache.stratos.common.feature.group</id>
+                                    <version>${project.version}</version>
+                                </feature>
+                                <feature>
                                     <id>org.wso2.carbon.webapp.mgt.server.feature.group</id>
                                     <version>${carbon.platform.patch.version.4.2.2}</version>
                                 </feature>