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]hscale offline ops of mongodb doesn't work as expected #8793

Closed
tianyue86 opened this issue Jan 10, 2025 · 1 comment
Closed

[BUG]hscale offline ops of mongodb doesn't work as expected #8793

tianyue86 opened this issue Jan 10, 2025 · 1 comment
Assignees
Labels
kind/bug Something isn't working severity/major Great chance user will encounter the same problem
Milestone

Comments

@tianyue86
Copy link

Describe the env
Kubernetes: v1.31.1-aliyun.1
KubeBlocks: 1.0.0-beta.22
kbcli: 1.0.0-beta.9

To Reproduce
Steps to reproduce the behavior:

  1. Create mongodb cluster with yaml below: successfully
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
  name: mongo-psfzat
  namespace: default
spec:
  clusterDef: mongodb
  topology: replicaset
  terminationPolicy: WipeOut
  componentSpecs:
    - name: mongodb
      serviceVersion: 6.0.16      
      replicas: 3
      serviceAccountName: kb-mongo-psfzat      
      resources:
        limits:
          cpu: 100m
          memory: 0.5Gi
        requests:
          cpu: 100m
          memory: 0.5Gi      
      volumeClaimTemplates:
        - name: data
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 20Gi
  1. cluster hscale offline instances
apiVersion: operations.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
  generateName: mongo-psfzat-hscaleoffinstance-
  labels:
    app.kubernetes.io/instance: mongo-psfzat
    app.kubernetes.io/managed-by: kubeblocks
  namespace: default
spec:
  type: HorizontalScaling
  clusterName: mongo-psfzat
  force: true
  horizontalScaling:
  - componentName: mongodb
    scaleIn:
      onlineInstancesToOffline:
      - mongo-psfzat-mongodb-0
  1. hscale offline doesn't work as expected
kbcli cluster list-ops mongo-psfzat --status all  --namespace default
NAME                                   NAMESPACE   TYPE                CLUSTER        COMPONENT   STATUS    PROGRESS   CREATED-TIME                 
mongo-psfzat-hscaleoffinstance-96j76   default     HorizontalScaling   mongo-psfzat   mongodb     Running   0/1        Jan 10,2025 19:06 UTC+0800

kbcli cluster list-instances mongo-psfzat --namespace default 
NAME                     NAMESPACE   CLUSTER        COMPONENT   STATUS    ROLE        ACCESSMODE   AZ                 CPU(REQUEST/LIMIT)   MEMORY(REQUEST/LIMIT)   STORAGE     NODE                                   CREATED-TIME                 
mongo-psfzat-mongodb-0   default     mongo-psfzat   mongodb     Running   primary     ReadWrite    cn-zhangjiakou-c   100m / 
mongo-psfzat-mongodb-1   default     mongo-psfzat   mongodb     Running   secondary   Readonly     cn-zhangjiakou-c   100m / 
mongo-psfzat-mongodb-2   default     mongo-psfzat   mongodb     Running   secondary   Readonly  cn-zhangjiakou-c   100m /
  1. See error
    report-cluster-mongo-psfzat-2025-01-10-19-17-39.zip

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 Jan 10, 2025
@tianyue86 tianyue86 added this to the Release 1.0.0 milestone Jan 10, 2025
@github-actions github-actions bot modified the milestones: Release 1.0.0, Release 0.9.3 Jan 14, 2025
@tianyue86 tianyue86 added the severity/major Great chance user will encounter the same problem label Jan 17, 2025
@xuriwuyun
Copy link
Contributor

Image
The offlineInstances is working as expected. Please reopen the issue if it occurs again.

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 severity/major Great chance user will encounter the same problem
Projects
None yet
Development

No branches or pull requests

4 participants