Skip to content

bug: scale down of pools does not work #80

@AmitKumarDas

Description

@AmitKumarDas

Title: scaling down pools does not work in CStorClusterConfig
Recreation Steps: Create CStorClusterConfig with defaults auto set by controller. Edit the CStorClusterConfig with MinPoolCount set to 2.
Expect: CStor pools should scale down from 3 to 2.
Actual: CStor pools remain at 3
Other Details: There is a visible skew in MinPoolCount in last applied state vs. specs.

  basic > kubectl -n openebs get cstorclusterconfig -oyaml
apiVersion: v1
items:
- apiVersion: dao.mayadata.io/v1alpha1
  kind: CStorClusterConfig
  metadata:
    annotations:
      52234ef9-4702-11ea-a70d-42010a800115/gctl-last-applied: '{"apiVersion":"dao.mayadata.io/v1alpha1","kind":"CStorClusterConfig","metadata":{"name":"my-cstor-cluster","namespace":"openebs"},"spec":{"diskConfig":{"minCapacity":107374182400,"minCount":2},"maxPoolCount":0,"minPoolCount":3,"poolConfig":{"raidType":"mirror"}}}'
      52234ef9-4702-11ea-a70d-42010a800115/updated-due-to-watch: dao.mayadata.io-v1alpha1-CStorClusterConfig-openebs-my-cstor-cluster
      kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"dao.mayadata.io/v1alpha1","kind":"CStorClusterConfig","metadata":{"annotations":{},"name":"my-cstor-cluster","namespace":"openebs"},"spec":{"diskConfig":{"externalProvisioner":{"csiAttacherName":"pd.csi.storage.gke.io","storageClassName":"csi-gce-pd"}},"poolConfig":{"raidType":"mirror"}}}
    creationTimestamp: "2020-02-04T03:56:28Z"
    generation: 3
    name: my-cstor-cluster
    namespace: openebs
    resourceVersion: "23778614"
    selfLink: /apis/dao.mayadata.io/v1alpha1/namespaces/openebs/cstorclusterconfigs/my-cstor-cluster
    uid: 52234ef9-4702-11ea-a70d-42010a800115
  spec:
    diskConfig:
      externalProvisioner:
        csiAttacherName: pd.csi.storage.gke.io
        storageClassName: csi-gce-pd
      minCapacity: 107374182400
      minCount: 2
    maxPoolCount: 0
    minPoolCount: 2
    poolConfig:
      raidType: mirror
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
  basic > kubectl -n openebs get cstorclusterplan -oyaml
apiVersion: v1
items:
- apiVersion: dao.mayadata.io/v1alpha1
  kind: CStorClusterPlan
  metadata:
    annotations:
      52234ef9-4702-11ea-a70d-42010a800115/gctl-last-applied: '{"apiVersion":"dao.mayadata.io/v1alpha1","kind":"CStorClusterPlan","metadata":{"annotations":{"dao.mayadata.io/cstorclusterconfig-uid":"52234ef9-4702-11ea-a70d-42010a800115"},"name":"my-cstor-cluster","namespace":"openebs"},"spec":{"nodes":[{"name":"gke-amitd-dao-d-default-pool-fcc50975-wt3x","uid":"bb3318c7-1b11-11ea-a90b-42010a800016"},{"name":"gke-amitd-dao-d-default-pool-fcc50975-blz8","uid":"bb3c94a2-1b11-11ea-a90b-42010a800016"},{"name":"gke-amitd-dao-d-default-pool-fcc50975-fvsb","uid":"ba217ce0-1b11-11ea-a90b-42010a800016"}]}}'
      dao.mayadata.io/cstorclusterconfig-uid: 52234ef9-4702-11ea-a70d-42010a800115
      metac.openebs.io/created-due-to-watch: 52234ef9-4702-11ea-a70d-42010a800115
    creationTimestamp: "2020-02-04T03:56:28Z"
    generation: 1
    name: my-cstor-cluster
    namespace: openebs
    resourceVersion: "23774136"
    selfLink: /apis/dao.mayadata.io/v1alpha1/namespaces/openebs/cstorclusterplans/my-cstor-cluster
    uid: 5226123b-4702-11ea-a70d-42010a800115
  spec:
    nodes:
    - name: gke-amitd-dao-d-default-pool-fcc50975-wt3x
      uid: bb3318c7-1b11-11ea-a90b-42010a800016
    - name: gke-amitd-dao-d-default-pool-fcc50975-blz8
      uid: bb3c94a2-1b11-11ea-a90b-42010a800016
    - name: gke-amitd-dao-d-default-pool-fcc50975-fvsb
      uid: ba217ce0-1b11-11ea-a90b-42010a800016
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions