kubernetes / dashboard

General-purpose web UI for Kubernetes clusters
Apache License 2.0
14.49k stars 4.17k forks source link

Unable to initialize database tables: unable to open database file: out of memory - persistent volume attached to metricsScraper #9654

Open rubber-ant opened 1 week ago

rubber-ant commented 1 week ago

What happened?

│ I1112 15:36:28.587847       1 main.go:43] "Starting Metrics Scraper" version="1.2.1"                                                                                                  │
│ W1112 15:36:28.587961       1 client_config.go:659] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.                                │
│ I1112 15:36:28.588173       1 main.go:51] Kubernetes host: https://10.96.0.1:443                                                                                                      │
│ I1112 15:36:28.588181       1 main.go:52] Namespace(s): []                                                                                                                            │
│ F1112 15:36:28.588834       1 main.go:70] Unable to initialize database tables: unable to open database file: out of memory (14)                                                      │
│ Stream closed EOF for kubernetes-dashboard/kubernetes-dashboard-metrics-scraper-7c97bc8d64-wz254 (kubernetes-dashboard-metrics-scraper)

What did you expect to happen?

Volume mounted to metricScraper

How can we reproduce it (as minimally and precisely as possible)?

pvc.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-pvc
  namespace: kubernetes-dashboard
  annotations:
    volume.beta.kubernetes.io/storage-provisioner: rook-ceph.rbd.csi.ceph.com
    volume.kubernetes.io/storage-provisioner: rook-ceph.rbd.csi.ceph.com
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
  storageClassName: xfs

helm

    values:
      - metricsScraper:
          containers:
            args:
              - --v=0
              - --db-file=/mnt/metrics.db
            volumeMounts:
                - mountPath: /mnt
                  name: scraper-pv-storage
          volumes:
            - name: scraper-pv-storage
              persistentVolumeClaim:
                claimName: my-pvc

pv and pvc

kubectl  get pv,pvc -A | grep dashboard
persistentvolume/pvc-d837a84b-2d16-4b2b-a2d1-54d28c93fb82   100Gi      RWO            Retain           Bound    kubernetes-dashboard/my-pvc       xfs            <unset>                          4m52s
kubernetes-dashboard   persistentvolumeclaim/my-pvc                    Bound    pvc-d837a84b-2d16-4b2b-a2d1-54d28c93fb82   100Gi      RWO            xfs            <unset>                 12m

Anything else we need to know?

backend using ceph - using the same storageclass for other sts without any issue

Ref: https://github.com/kubernetes/dashboard/issues/5537

What browsers are you seeing the problem on?

No response

Kubernetes Dashboard version

7.9.0

Kubernetes version

1.29.10

Dev environment

No response