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 palyground init and destroy error #379

Open
JashBook opened this issue Jul 1, 2024 · 3 comments
Open

[BUG] kbcli palyground init and destroy error #379

JashBook opened this issue Jul 1, 2024 · 3 comments
Assignees
Labels
bug Something isn't working Stale

Comments

@JashBook
Copy link
Collaborator

JashBook commented Jul 1, 2024

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. install kbcli
curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash -s v0.9.0-beta.1
  1. kbcli palyground init
kbcli playground  init --cloud-provider=aws --region=us-west-2 --auto-approve --version 0.9.0-beta.42
  1. See error
KubeBlocks will be installed to namespace "kb-system"
Kubernetes version 1.25.16
Kubernetes provider EKS
kbcli version 0.9.0-beta.1
Create CRDs                                        OK
Add and update repo kubeblocks                     OK
Install KubeBlocks 0.9.0-beta.42                   OK
Create cluster mycluster (ClusterDefinition: apecloud-mysql) FAIL
error: failed to create cluster mycluster: clusterdefinitions.apps.kubeblocks.io "apecloud-mysql" not found

addon is enable

➜  ~ kubectl get pod -n kb-system
NAME                                                     READY   STATUS            RESTARTS   AGE
install-grafana-addon-97nkj                              1/1     Running           0          78s
install-prometheus-addon-n4rf9                           1/1     Running           0          78s
kb-addon-alertmanager-webhook-adaptor-5c9464fc6b-fn6gd   2/2     Running           0          69s
kb-addon-apecloud-otel-collector-gmn54                   1/1     Running           0          67s
kb-addon-apecloud-otel-collector-jt8dt                   1/1     Running           0          67s
kb-addon-apecloud-otel-collector-km5bf                   1/1     Running           0          67s
kb-addon-apecloud-otel-collector-kmxgh                   1/1     Running           0          67s
kb-addon-apecloud-otel-collector-lpstz                   1/1     Running           0          67s
kb-addon-apecloud-otel-collector-nplms                   1/1     Running           0          67s
kb-addon-aws-load-balancer-controller-759cb9955-zdcjk    1/1     Running           0          62s
kb-addon-grafana-56dd66cb6c-xg9gb                        0/3     PodInitializing   0          53s
kb-addon-prometheus-alertmanager-0                       1/2     Running           0          49s
kb-addon-prometheus-server-0                             1/2     Running           0          49s
kb-addon-snapshot-controller-76d7f5669b-6ccbf            1/1     Running           0          66s
kubeblocks-665ff5b8c7-5gxhn                              1/1     Running           0          98s
kubeblocks-dataprotection-86c67f6746-9nmln               1/1     Running           0          98s

➜  ~ kbcli addon list
NAME                           VERSION         PROVIDER    STATUS     AUTO-INSTALL   
csi-driver-nfs                 4.5.0           community   Disabled   false          
csi-hostpath-driver            0.7.0           community   Disabled   false          
csi-s3                         0.7.0           community   Disabled   false          
external-dns                   6.20.4          community   Disabled   false          
fault-chaos-mesh               2.5.2           apecloud    Disabled   false          
kubebench                      0.0.1           apecloud    Disabled   false          
kubeblocks-csi-driver          0.1.4           community   Disabled   false          
llm                            0.9.0           community   Disabled   false          
loki                           5.8.9           community   Disabled   false          
migration                      0.1.1           apecloud    Disabled   false          
minio                          12.8.12         community   Disabled   false          
nvidia-gpu-exporter            0.3.1           community   Disabled   false          
nyancat                        0.7.0           apecloud    Disabled   false          
pyroscope-server               0.2.92          community   Disabled   false          
qdrant                         0.9.0           community   Disabled   false          
victoria-metrics-agent         0.8.41          community   Disabled   false          
alertmanager-webhook-adaptor   0.1.4           apecloud    Enabled    true           
apecloud-mysql                 0.9.0-beta.10   apecloud    Enabled    true           
apecloud-otel-collector        0.1.2-beta.3    apecloud    Enabled    true           
aws-load-balancer-controller   1.4.8           community   Enabled    true           
kafka                          0.9.0           community   Enabled    true           
mongodb                        0.9.0           apecloud    Enabled    true           
mysql                          0.9.1           community   Enabled    true           
postgresql                     0.9.0           community   Enabled    true           
pulsar                         0.9.0           community   Enabled    true           
redis                          0.9.0           community   Enabled    true           
snapshot-controller            1.7.2           community   Enabled    true           
grafana                        6.43.5          community   Enabling   true           
prometheus                     15.16.1         community   Enabling   true  
kubectl get cd
NAME               TOPOLOGIES                                     SERVICEREFS   STATUS      AGE
apecloud-mysql                                                                  Available   2m11s
kafka                                                                           Available   2m9s
mongodb                                                                         Available   2m10s
mongodb-sharding                                                                Available   2m10s
mysql                                                                           Available   117s
postgresql                                                                      Available   114s
pulsar                                                                          Available   2m6s
pulsar-zookeeper                                                                Available   2m6s
redis              replication,replication-twemproxy,standalone                 Available   116s
  1. See error
➜  ~ kbcli playground  destroy --purge=true --auto-approve                                                
Warning: This action will destroy the kubernetes cluster, there may be residual resources,
  please confirm and manually clean up related resources after this action.

Do you really want to destroy the kubernetes cluster kb-playground-w5qkz?
  cloud provider: aws
  cluster name: kb-playground-w5qkz
  region: us-west-2

  The operation cannot be rollbacked. Only 'yes' will be accepted to confirm.

Write kubeconfig to /Users/huangzhangshu/.kbcli/playground/kubeconfig OK
Delete clusters created by KubeBlocks              OK
Uninstall KubeBlocks in namespace "kb-system"
Wait for addons to be disabled
  alertmanager-webhook-adaptor                     Disabling
  apecloud-mysql                                   Disabling
  apecloud-otel-collector                          Disabling
  aws-load-balancer-controller                     Disabling
  grafana                                          Disabling
  kafka                                            Disabling
  mongodb                                          Disabling
  mysql                                            Disabling
  postgresql                                       Disabling
  prometheus                                       Disabling
  pulsar                                           Disabling
  redis                                            Disabling
  snapshot-controller                              Disabling

Disabling addons: apecloud-mysql, apecloud-otel-collector, mysql, pulsar, snapshot-controller, aws-load-balancer-controller, mongodb, postgresql, alertmanager-webhook-adaptor, prometheus, grafana, kafka, redis
Please wait for a while and try to run "kbcli addon list" to check addons status.
Failed to uninstall addons, run "kbcli kubeblocks uninstall" to retry.
error: context deadline exceeded

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
Repeated execution successful

@JashBook JashBook added the bug Something isn't working label Jul 1, 2024
@weicao
Copy link
Contributor

weicao commented Jul 10, 2024

The error exists in v0.9.0

@weicao
Copy link
Contributor

weicao commented Jul 10, 2024

It appears that the addons are in the process of installation. Before the addon installation is complete, the system may experience various malfunctions and errors.

For instance, if you create a cluster during this time, you might find an event stating that 'csi-hostpath' does not exist. In reality, this occurs because the installation of the 'csi-hostpath' addon has not yet finished.

$ kubectl get events
...
3m46s       Warning   ProvisioningFailed                persistentvolumeclaim/data-weed44-mysql-1        storageclass.storage.k8s.io "csi-hostpath-sc" not found
1s          Normal    ExternalProvisioning              persistentvolumeclaim/data-weed44-mysql-2        waiting for a volume to be created, either by external provisioner "hostpath.csi.k8s.io" or manually created by system administrator
$ kbcli addon list
...
csi-hostpath-driver            0.7.0           community   Enabling   true
...

Copy link

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 Aug 12, 2024
@gnolong gnolong linked a pull request Aug 12, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

4 participants