edgexfoundry / edgex-helm

Owner: Core WG
Apache License 2.0
4 stars 7 forks source link

helm uninstall does not clear up the mount data from /mnt #26

Closed mohammedimrankasab closed 1 year ago

mohammedimrankasab commented 1 year ago

🐞 Bug Report

Affected Services [REQUIRED]

Metadata service is getting effected with this stale data The issue is located in: helm uninstall command. ### Is this a regression? No Yes, the previous version in which this bug was not present was: .... ### Description and Minimal Reproduction [**REQUIRED**] Command `helm uninstall edgex-minnesota -n edgex` is not clearing up the mounted data from `/mnt` directory. Maybe we can have some script to delete the residual data volumes once we uninstall using helm so that we have everything fresh when we install again. Because of this old data we have inconsistency in the metadata. Tested with Minnesota release (3.0.0) helm chart. ## πŸ”₯ Exception or Error

ls -ltra /mnt
total 12
drwxr-xr-x 18 root root      279 Mar 14  2023 ..
drwxr-xr-x  7 root root       79 Aug 23 13:12 edgex-kuiper-plugins
drwxr-xr-x  8 1001 wheel     185 Aug 23 13:12 edgex-kuiper-data
drwxr-xr-x  2 root root        6 Sep 20 05:55 edgex-kuiper-sources
drwxr-xr-x  2 root root        6 Sep 20 05:55 edgex-kuiper-connections
drwxr-xr-x  2 _apt root    6 Sep 20 05:55 edgex-vault-logs
drwxr-xr-x 17 root root     4096 Sep 20 05:55 .
drwxr-xr-x  3 _apt root   20 Sep 20 05:55 edgex-vault-config
drwxr-xr-x  6 _apt root   56 Sep 20 05:56 edgex-vault-data
drwxr-xr-x  6 _apt root  126 Sep 20 05:56 edgex-consul-data
drwxr-xr-x  2 _apt root   47 Sep 20 05:56 edgex-consul-config
drwxr-xr-x  2 root root       57 Sep 20 05:56 edgex-consul-acl-token
drwxr-xr-x  2 lxd  root   52 Sep 20 05:56 edgex-redis-config
drwxr-xr-x  6 root root     4096 Sep 21 06:01 edgex-init-volume
drwxr-xr-x 10 root root     4096 Sep 21 06:01 edgex-kuiper-etc
drwxr-xr-x  2 1001 wheel     138 Sep 22 05:13 edgex-kuiper-log
drwxr-xr-x  2 lxd  root       22 Sep 22 05:13 edgex-db


🌍 Your Environment

Deployment Environment:

Ubuntu single node cluster created with K3s

Distributor ID: Ubuntu Description: Ubuntu 22.04.2 LTS Release: 22.04 Codename: jammy

Kubernetes version Client Version: v1.27.4+k3s1 Kustomize Version: v5.0.1 Server Version: v1.27.4+k3s1

EdgeX Version [REQUIRED]: v3.0.0 (Minnesota)

Anything else relevant?

k get sc
NAME                   PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path   Delete          WaitForFirstConsumer   false                  29d
bnevis-i commented 1 year ago

Won't fix. Firstly, I don't think there is an uninstall script hook. Secondly, I wouldn't know to which nodes in your cluster the pods ended up deployed to.

If you don't want to use /mnt volumes, customize the parameters in the storage section (https://github.com/edgexfoundry/edgex-helm/blob/main/values.yaml#L649).

You will want to set edgex.storage.useHostPath=false and set the storageClass parameters to your local-path provisioner.

If you have a way to detect local-path pre-installed and dynamically adapt I'd be interested in knowing how to do it. Today, the installer scripts assume you have no storage provisioners at all.