Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] mongodb cluster is always in creating status after applying yaml file #8121

Closed
tianyue86 opened this issue Sep 10, 2024 · 1 comment
Closed
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@tianyue86
Copy link

Describe the bug

Kubernetes: v1.29.7-gke.1274000
KubeBlocks: 0.9.1-beta.24
kbcli: 0.9.1-beta.10

To Reproduce
Steps to reproduce the behavior:

  1. Create cluster - kubectl apply -f test_create_mongo-wkjznc.yaml
apiVersion: apps.kubeblocks.io/v1alpha1
kind: Cluster
metadata:
  name: mongo-wkjznc
  namespace: default
spec:
  clusterDefinitionRef: mongodb
  clusterVersionRef: mongodb-5.0
  terminationPolicy: WipeOut
  componentSpecs:
    - name: mongodb
      componentDefRef: mongodb
      replicas: 1
      resources:
        requests:
          cpu: 100m
          memory: 0.5Gi
        limits:
          cpu: 100m
          memory: 0.5Gi
      volumeClaimTemplates:
        - name: data
          spec:
            storageClassName:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 3Gi
  1. Check status
tianyue@localhost ~ % k get cluster -A
NAMESPACE   NAME           CLUSTER-DEFINITION   VERSION       TERMINATION-POLICY   STATUS     AGE
default     mongo-wkjznc   mongodb              mongodb-5.0   WipeOut              Creating   29m
  1. Check cmp
tianyue@localhost ~ % k get cmp | grep mongo-wkjznc
mongo-wkjznc-mongodb                                    Creating   18m
tianyue@localhost ~ % k describe cmp mongo-wkjznc-mongodb 
Name:         mongo-wkjznc-mongodb
Namespace:    default
Labels:       app.kubernetes.io/instance=mongo-wkjznc
              app.kubernetes.io/managed-by=kubeblocks
              apps.kubeblocks.io/cluster-uid=acaaca5f-88b9-4cb2-970c-3290cc8e5f68
              apps.kubeblocks.io/component-name=mongodb
              clusterdefinition.kubeblocks.io/name=mongodb
              clusterversion.kubeblocks.io/name=mongodb-5.0
Annotations:  kubeblocks.io/generation: 1
API Version:  apps.kubeblocks.io/v1alpha1
Kind:         Component
Metadata:
  Creation Timestamp:  2024-09-10T06:32:17Z
  Finalizers:
    cluster.kubeblocks.io/finalizer
    component.kubeblocks.io/finalizer
  Generation:  1
  Owner References:
    API Version:           apps.kubeblocks.io/v1alpha1
    Block Owner Deletion:  true
    Controller:            true
    Kind:                  Cluster
    Name:                  mongo-wkjznc
    UID:                   acaaca5f-88b9-4cb2-970c-3290cc8e5f68
  Resource Version:        5027679
  UID:                     9852d77f-100b-4931-9954-fd3955103a20
Spec:
  Comp Def:  
  Replicas:  1
  Resources:
    Limits:
      Cpu:     100m
      Memory:  512Mi
    Requests:
      Cpu:     100m
      Memory:  512Mi
  Scheduling Policy:
    Affinity:
      Node Affinity:
        Preferred During Scheduling Ignored During Execution:
          Preference:
            Match Expressions:
              Key:       kb-data
              Operator:  In
              Values:
                true
          Weight:  100
    Tolerations:
      Effect:    NoSchedule
      Key:       kb-data
      Operator:  Equal
      Value:     true
  Volume Claim Templates:
    Name:  data
    Spec:
      Access Modes:
        ReadWriteOnce
      Resources:
        Requests:
          Storage:  3Gi
Status:
  Conditions:
    Last Transition Time:  2024-09-10T06:32:17Z
    Message:               The operator has started the provisioning of Cluster: mongo-wkjznc-mongodb
    Observed Generation:   1
    Reason:                PreCheckSucceed
    Status:                True
    Type:                  ProvisioningStarted
  Observed Generation:     1
  Phase:                   Creating
Events:
  Type    Reason                    Age   From                  Message
  ----    ------                    ----  ----                  -------
  Normal  ComponentPhaseTransition  19m   component-controller  component is Creating

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@tianyue86 tianyue86 added the kind/bug Something isn't working label Sep 10, 2024
@tianyue86 tianyue86 added this to the Release 0.9.1 milestone Sep 10, 2024
@ldming ldming assigned xuriwuyun and unassigned ldming Sep 10, 2024
@xuriwuyun
Copy link
Contributor

test_create_mongo-wkjznc.yaml is no longer valid; please use the MongoDB cluster Helm chart instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants