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]kbcli cluster connect redis cluster error #416

Open
ahjing99 opened this issue Jul 29, 2024 · 1 comment
Open

[BUG]kbcli cluster connect redis cluster error #416

ahjing99 opened this issue Jul 29, 2024 · 1 comment
Assignees
Labels
bug Something isn't working Stale

Comments

@ahjing99
Copy link
Collaborator

root@node1:~# k get cluster  cherr-657bbb6d7b -n kubeblocks-cloud-ns -o yaml
apiVersion: apps.kubeblocks.io/v1alpha1
kind: Cluster
metadata:
  annotations:
    cloud.kubeblocks.io/fields: '{"mode":"cluster","proxyEnabled":null}'
  creationTimestamp: "2024-07-29T02:13:02Z"
  finalizers:
  - cluster.kubeblocks.io/finalizer
  generation: 2
  labels:
    app.kubernetes.io/instance: cherr-657bbb6d7b
    app.kubernetes.io/version: 7.2.4
    cloud.kubeblocks.io/cluster: cherry39
    cloud.kubeblocks.io/organization: mjingz
    helm.sh/chart: redis-cluster-0.9.0
  name: cherr-657bbb6d7b
  namespace: kubeblocks-cloud-ns
  resourceVersion: "20387250"
  uid: 694756d6-921a-454e-a17e-40193efb478e
spec:
  affinity:
    podAntiAffinity: Required
    tenancy: SharedNode
    topologyKeys:
    - topology.kubernetes.io/zone
  backup:
    cronExpression: 0 18 * * *
    enabled: true
    method: datafile
    pitrEnabled: false
    repoName: minio
    retentionPeriod: 7d
    startingDeadlineMinutes: 0
  resources:
    cpu: "0"
    memory: "0"
  shardingSpecs:
  - name: shard
    shards: 3
    template:
      componentDef: redis-cluster-7
      name: redis
      replicas: 2
      resources:
        limits:
          cpu: "2"
          memory: 1Gi
        requests:
          cpu: "1"
          memory: 1Gi
      serviceVersion: 7.2.4
      services:
      - name: redis-advertised
        podService: true
        serviceType: NodePort
      systemAccounts:
      - name: default
        passwordConfig:
          length: 10
          letterCase: MixedCases
          numDigits: 5
          numSymbols: 0
          seed: cherr-657bbb6d7b
      volumeClaimTemplates:
      - name: data
        spec:
          accessModes:
          - ReadWriteOnce
          resources:
            requests:
              storage: 20Gi
  storage:
    size: "0"
  terminationPolicy: DoNotTerminate
status:
  conditions:
  - lastTransitionTime: "2024-07-29T02:13:02Z"
    message: Successfully applied for resources
    observedGeneration: 2
    reason: ApplyResourcesSucceed
    status: "True"
    type: ApplyResources
  - lastTransitionTime: "2024-07-29T02:13:02Z"
    message: 'The operator has started the provisioning of Cluster: cherr-657bbb6d7b'
    observedGeneration: 2
    reason: PreCheckSucceed
    status: "True"
    type: ProvisioningStarted
  - lastTransitionTime: "2024-07-29T02:13:22Z"
    message: all pods of components are ready, waiting for the probe detection successful
    reason: AllReplicasReady
    status: "True"
    type: ReplicasReady
  - lastTransitionTime: "2024-07-29T02:13:22Z"
    message: 'Cluster: cherr-657bbb6d7b is ready, current phase is Running'
    reason: ClusterReady
    status: "True"
    type: Ready
  observedGeneration: 2
  phase: Running

root@node1:~# kbcli cluster connect cherr-657bbb6d7b -n kubeblocks-cloud-ns
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/apecloud/kbcli/pkg/cmd/cluster.(*ConnectOptions).Complete(0xc00057ccc0)
	/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/connect.go:242 +0x530
github.com/apecloud/kbcli/pkg/cmd/cluster.NewConnectCmd.func1(0xc0015e3900?, {0xc00137b350?, 0x1?, 0x3?})
	/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/connect.go:126 +0x34
github.com/spf13/cobra.(*Command).execute(0xc0002c1b00, {0xc00137b2f0, 0x3, 0x3})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:987 +0xaa3
github.com/spf13/cobra.(*Command).ExecuteC(0xc001313200)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
k8s.io/component-base/cli.run(0xc001313200)
	/home/runner/go/pkg/mod/k8s.io/[email protected]/cli/run.go:146 +0x2c5
k8s.io/component-base/cli.RunNoErrOutput(...)
	/home/runner/go/pkg/mod/k8s.io/[email protected]/cli/run.go:84
main.main()
	/home/runner/work/kbcli/kbcli/cmd/cli/main.go:31 +0x18
@ahjing99 ahjing99 added the bug Something isn't working label Jul 29, 2024
Copy link

github-actions bot commented Sep 2, 2024

This issue has been marked as stale because it has been open for 30 days with no activity

@github-actions github-actions bot added the Stale label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

3 participants