Uploaded image for project: 'Stratos'
  1. Stratos
  2. STRATOS-849

Stratos does not create specified min instance count in deployment policy

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0 RC3
    • Component/s: Autoscaler
    • Labels:
      None

      Description

      Use the following deployment policy with min count - 3

      {
      "id": "deployp",
      "partitionGroup": {
      "id": "ec2",
      "partitionAlgo": "one-after-another",
      "partition": [

      { "id": "P1", "partitionMax": "10", "partitionMin": "3" }

      ]
      }
      }

      Stratos will only create 1 LB and 1 service instance. When RuleLog DEBUG logs are enabled following can be observed.

      TID: [0] [STRATOS] [2014-09-30 10:19:17,862] DEBUG

      {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor} - Cluster monitor is running.. LbClusterMonitor [clusterId=lblb-1025611169.lb.domain, serviceId=lb] {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor}

      TID: [0] [STRATOS] [2014-09-30 10:19:17,862] DEBUG

      {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor} - Running minimum check for partition P1 {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor}

      TID: [0] [STRATOS] [2014-09-30 10:19:17,862] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - Running minimum rule: [network-partition] ec2 [partition] P1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:17,863] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [min-check] [network-partition] ec2 [partition] P1 Non terminated member count: 1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:17,863] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [min-check] [network-partition] ec2 [partition] P1 Minimum member count: 1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:17,863] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - Running obsolete instances rule: [partition] P1 [network-partition] ec2 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:17,863] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [obsolete-check] [network-partition] ec2 [partition] P1 Obsolete member count: 0 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:17,863] DEBUG

      {org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator} - Minimum check executed for : org.apache.stratos.autoscaler.PartitionContext@4eb71db {org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator}

      TID: [0] [STRATOS] [2014-09-30 10:19:30,421] DEBUG

      {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor} - Cluster monitor is running.. LbClusterMonitor [clusterId=jboss.jboss.domain, serviceId=jboss] {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor}

      TID: [0] [STRATOS] [2014-09-30 10:19:30,421] DEBUG

      {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor} - Running minimum check for partition P1 {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor}

      TID: [0] [STRATOS] [2014-09-30 10:19:30,421] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - Running minimum rule: [network-partition] ec2 [partition] P1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:30,421] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [min-check] [network-partition] ec2 [partition] P1 Non terminated member count: 1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:30,422] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [min-check] [network-partition] ec2 [partition] P1 Minimum member count: 1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:30,422] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - Running obsolete instances rule: [partition] P1 [network-partition] ec2 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:30,422] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [obsolete-check] [network-partition] ec2 [partition] P1 Obsolete member count: 0 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:19:30,422] DEBUG

      {org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator} - Minimum check executed for : org.apache.stratos.autoscaler.PartitionContext@31918b23 {org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator}

      TID: [0] [STRATOS] [2014-09-30 10:20:47,864] DEBUG

      {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor} - Cluster monitor is running.. LbClusterMonitor [clusterId=lblb-1025611169.lb.domain, serviceId=lb] {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor}

      TID: [0] [STRATOS] [2014-09-30 10:20:47,864] DEBUG

      {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor} - Running minimum check for partition P1 {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor}

      TID: [0] [STRATOS] [2014-09-30 10:20:47,865] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - Running minimum rule: [network-partition] ec2 [partition] P1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:20:47,865] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [min-check] [network-partition] ec2 [partition] P1 Non terminated member count: 1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:20:47,865] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [min-check] [network-partition] ec2 [partition] P1 Minimum member count: 1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:20:47,865] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - Running obsolete instances rule: [partition] P1 [network-partition] ec2 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:20:47,865] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [obsolete-check] [network-partition] ec2 [partition] P1 Obsolete member count: 0 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:20:47,866] DEBUG

      {org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator} - Minimum check executed for : org.apache.stratos.autoscaler.PartitionContext@4eb71db {org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator}

      TID: [0] [STRATOS] [2014-09-30 10:21:00,422] DEBUG

      {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor} - Cluster monitor is running.. LbClusterMonitor [clusterId=jboss.jboss.domain, serviceId=jboss] {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor}

      TID: [0] [STRATOS] [2014-09-30 10:21:00,423] DEBUG

      {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor} - Running minimum check for partition P1 {org.apache.stratos.autoscaler.monitor.VMLbClusterMonitor}

      TID: [0] [STRATOS] [2014-09-30 10:21:00,423] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - Running minimum rule: [network-partition] ec2 [partition] P1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:21:00,423] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [min-check] [network-partition] ec2 [partition] P1 Non terminated member count: 1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:21:00,424] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [min-check] [network-partition] ec2 [partition] P1 Minimum member count: 1 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:21:00,424] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - Running obsolete instances rule: [partition] P1 [network-partition] ec2 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:21:00,425] DEBUG

      {org.apache.stratos.autoscaler.rule.RuleLog} - [obsolete-check] [network-partition] ec2 [partition] P1 Obsolete member count: 0 {org.apache.stratos.autoscaler.rule.RuleLog}

      TID: [0] [STRATOS] [2014-09-30 10:21:00,425] DEBUG

      {org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator} - Minimum check executed for : org.apache.stratos.autoscaler.PartitionContext@31918b23 {org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator}

      It seems service instance is also created by VMLbClusterMonitor. This is wrong. This should be fixed in ClustorMonitorFactory class.

        Activity

        Hide
        ravihansa Akila added a comment -

        Fixed in 1c1e9ad7c5f50ee60e17c9c0769c4c6972fa04f4 commit by sajhak

        Show
        ravihansa Akila added a comment - Fixed in 1c1e9ad7c5f50ee60e17c9c0769c4c6972fa04f4 commit by sajhak
        Hide
        rajkumarr@wso2.com Rajkumar Rajaratnam added a comment -

        Hi Akila,

        There is no problem with ClusterMonitorFactory at all.

        isLbCluster attribute of cluster object is true for jboss cluster. Hence
        the factory is creating lb cluster jboss. We are looking into where the
        isLbCluster was set to true for jboss.

        Thanks.

        On Tue, Sep 30, 2014 at 4:33 PM, Rajkumar Rajaratnam (JIRA) <jira@apache.org


        Rajkumar Rajaratnam
        Software Engineer | WSO2, Inc.
        Mobile +94777568639 | +94783498120

        Show
        rajkumarr@wso2.com Rajkumar Rajaratnam added a comment - Hi Akila, There is no problem with ClusterMonitorFactory at all. isLbCluster attribute of cluster object is true for jboss cluster. Hence the factory is creating lb cluster jboss. We are looking into where the isLbCluster was set to true for jboss. Thanks. On Tue, Sep 30, 2014 at 4:33 PM, Rajkumar Rajaratnam (JIRA) <jira@apache.org – Rajkumar Rajaratnam Software Engineer | WSO2, Inc. Mobile +94777568639 | +94783498120
        Hide
        rajkumarr@wso2.com Rajkumar Rajaratnam added a comment -

        Hi Akila,

        There is no problem with ClusterMonitorFactory at all.

        isLbCluster attribute of cluster object is true for jboss cluster. Hence
        the factory is creating lb cluster jboss. We are looking into where the
        isLbCluster was set to true for jboss.

        Thanks.

        On Tue, Sep 30, 2014 at 4:33 PM, Rajkumar Rajaratnam (JIRA) <jira@apache.org


        Rajkumar Rajaratnam
        Software Engineer | WSO2, Inc.
        Mobile +94777568639 | +94783498120

        Show
        rajkumarr@wso2.com Rajkumar Rajaratnam added a comment - Hi Akila, There is no problem with ClusterMonitorFactory at all. isLbCluster attribute of cluster object is true for jboss cluster. Hence the factory is creating lb cluster jboss. We are looking into where the isLbCluster was set to true for jboss. Thanks. On Tue, Sep 30, 2014 at 4:33 PM, Rajkumar Rajaratnam (JIRA) <jira@apache.org – Rajkumar Rajaratnam Software Engineer | WSO2, Inc. Mobile +94777568639 | +94783498120
        Hide
        rajkumarr Rajkumar Rajaratnam added a comment -

        Hi,

        ClusterMonitorFactory.getMonitor(Cluster) works based on the type of cluster set on cluster object. If it is a service cluster, isLbCluster and isKubernetesCluster should be set to false.

        I will look into it.

        Show
        rajkumarr Rajkumar Rajaratnam added a comment - Hi, ClusterMonitorFactory.getMonitor(Cluster) works based on the type of cluster set on cluster object. If it is a service cluster, isLbCluster and isKubernetesCluster should be set to false. I will look into it.
        Hide
        ravihansa Akila added a comment -

        Raj, this issue is easily re-producible. I've pasted the full log in [1]

        [1] http://pastebin.com/qws7WqVf

        On Tue, Sep 30, 2014 at 4:16 PM, Rajkumar Rajaratnam (JIRA) <jira@apache.org

        Show
        ravihansa Akila added a comment - Raj, this issue is easily re-producible. I've pasted the full log in [1] [1] http://pastebin.com/qws7WqVf On Tue, Sep 30, 2014 at 4:16 PM, Rajkumar Rajaratnam (JIRA) <jira@apache.org
        Hide
        rajkumarr Rajkumar Rajaratnam added a comment -

        Hi,

        Can you attach the full log (from the point where cluster monitor is created) ?

        Show
        rajkumarr Rajkumar Rajaratnam added a comment - Hi, Can you attach the full log (from the point where cluster monitor is created) ?

          People

          • Assignee:
            Unassigned
            Reporter:
            ravihansa Akila
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development