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]the hscale offline ops of etcd cluster is always in running status #8768

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

Comments

@tianyue86
Copy link

tianyue86 commented Jan 9, 2025

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 etcd cluster with yaml below
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
  name: etcd-moryya
  namespace: default
spec:
  terminationPolicy: WipeOut
  componentSpecs:
    - name: etcd
      componentDef: etcd-3-1.0.0-alpha.0
      tls: false
      replicas: 3
      resources:
        requests:
          cpu: 100m
          memory: 0.5Gi
        limits:
          cpu: 100m
          memory: 0.5Gi
      volumeClaimTemplates:
        - name: data
          spec:
            storageClassName:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 20Gi
  1. list-instances shows that the cluster is running well
kbcli cluster list-instances etcd-moryya --namespace default
NAME                 NAMESPACE   CLUSTER       COMPONENT   STATUS    ROLE       ACCESSMODE   AZ                       
etcd-moryya-etcd-0   default     etcd-moryya   etcd        Running   leader     ReadWrite    cn-zhangjiakou-c   
etcd-moryya-etcd-1   default     etcd-moryya   etcd        Running   follower   Readonly     cn-zhangjiakou-c          
etcd-moryya-etcd-2   default     etcd-moryya   etcd        Running   follower   Readonly     cn-zhangjiakou-c  
  1. cluster hscale offline instances
apiVersion: operations.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
  generateName: etcd-moryya-hscaleoffinstance-
  labels:
    app.kubernetes.io/instance: etcd-moryya
    app.kubernetes.io/managed-by: kubeblocks
  namespace: default
spec:
  type: HorizontalScaling
  clusterName: etcd-moryya
  force: true
  horizontalScaling:
  - componentName: etcd
    scaleIn:
      onlineInstancesToOffline:
      - etcd-moryya-etcd-0 

kubectl create -f test_ops_cluster_etcd-moryya.yaml
  1. the hscale offline ops is always in running status
kbcli cluster list-ops etcd-moryya --status all  --namespace default
NAME                                  NAMESPACE   TYPE                CLUSTER       COMPONENT   STATUS    PROGRESS   CREATED-TIME                 
etcd-moryya-hscaleoffinstance-4vr5x   default     HorizontalScaling   etcd-moryya   etcd        Running   0/1        Jan 09,2025
  1. describe the opsrequest
Events:
  Type    Reason                    Age                From                    Message
  ----    ------                    ----               ----                    -------
  Normal  WaitForProgressing        13m                ops-request-controller  wait for the controller to process the OpsRequest: etcd-moryya-hscaleoffinstance-4vr5x in Cluster: etcd-moryya
  Normal  ValidateOpsRequestPassed  13m (x2 over 13m)  ops-request-controller  OpsRequest: etcd-moryya-hscaleoffinstance-4vr5x is validated
  Normal  HorizontalScalingStarted  13m (x2 over 13m)  ops-request-controller  Start to horizontal scale replicas in Cluster: etcd-moryya
  1. logs

report-cluster-etcd-moryya-2025-01-09-11-40-18.zip

Further testing: the same scenario works well in beta.20 version

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 9, 2025
@tianyue86 tianyue86 added this to the Release 1.0.0 milestone Jan 9, 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
@tianyue86
Copy link
Author

This issue is fixed in KB1.0.0-beta.23.

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

3 participants