CSM: Драйверы CSI: Паника в контейнере external-health-monitor-controller приводит к перезапуску контроллера драйверов CSI
Сводка: Контейнер external-health-monitor-controller, предоставляемый Kubernetes, может вызвать сбой и перезапуск модулей Container Storage Interface (CSI) Driver Controller.
Симптомы
Проблема наблюдается с
драйверами Dell CSI: v2.1.0 и v2.2.0
csi-external-health-monitor-controller: v0.4.0
Контроллер отобразит 12 операций перезагрузки:
$ kubectl get pod -n isilon NAME READY STATUS RESTARTS AGE isilon-controller-xxxx-xxxx 5/5 Running 12 (141m ago) 32h ...
С помощью команды -p Чтобы получить предыдущие журналы, команда csi-external-health-monitor-controller container shows the following panic:
E0629 18:48:41.494845 1 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 200 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x184d660, 0x27951e0)
/workspace/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0x95
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
/workspace/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x86
panic(0x184d660, 0x27951e0)
/usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/kubernetes-csi/external-health-monitor/pkg/controller.(*NodeWatcher).deleteNode(0xc000612500, 0xc002fa3b90, 0x28, 0x0)
/workspace/pkg/controller/node_watcher.go:275 +0x29
github.com/kubernetes-csi/external-health-monitor/pkg/controller.(*NodeWatcher).WatchNodes.func1(0xb28012007187300)
/workspace/pkg/controller/node_watcher.go:181 +0x647
github.com/kubernetes-csi/external-health-monitor/pkg/controller.(*NodeWatcher).WatchNodes(0xc000612500)
/workspace/pkg/controller/node_watcher.go:185 +0x4b
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc000499d90)
/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:155 +0x5f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc000499d90, 0x1c820c0, 0xc002b10450, 0x1, 0xc000126060)
/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:156 +0x9b
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000499d90, 0xdf8475800, 0x0, 0x1, 0xc000126060)
/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x98
k8s.io/apimachinery/pkg/util/wait.Until(0xc000499d90, 0xdf8475800, 0xc000126060)
/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:90 +0x4d
created by github.com/kubernetes-csi/external-health-monitor/pkg/controller.(*NodeWatcher).Run
/workspace/pkg/controller/node_watcher.go:147 +0x194
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x168e749]
goroutine 200 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
/workspace/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:55 +0x109
panic(0x184d660, 0x27951e0)
/usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/kubernetes-csi/external-health-monitor/pkg/controller.(*NodeWatcher).deleteNode(0xc000612500, 0xc002fa3b90, 0x28, 0x0)
/workspace/pkg/controller/node_watcher.go:275 +0x29
github.com/kubernetes-csi/external-health-monitor/pkg/controller.(*NodeWatcher).WatchNodes.func1(0xb28012007187300)
/workspace/pkg/controller/node_watcher.go:181 +0x647
github.com/kubernetes-csi/external-health-monitor/pkg/controller.(*NodeWatcher).WatchNodes(0xc000612500)
/workspace/pkg/controller/node_watcher.go:185 +0x4b
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc000499d90)
/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:155 +0x5f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc000499d90, 0x1c820c0, 0xc002b10450, 0x1, 0xc000126060)
/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:156 +0x9b
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000499d90, 0xdf8475800, 0x0, 0x1, 0xc000126060)
/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x98
k8s.io/apimachinery/pkg/util/wait.Until(0xc000499d90, 0xdf8475800, 0xc000126060)
/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:90 +0x4d
created by github.com/kubernetes-csi/external-health-monitor/pkg/controller.(*NodeWatcher).Run
/workspace/pkg/controller/node_watcher.go:147 +0x194
Причина
Это известная проблема в расширении external-health-monitor версии 0.4.0, которую предоставляет Kubernetes и которая в драйвере CSI v2.1 и v2.2 использует:
https://github.com/kubernetes-csi/external-health-monitor/issues/100
https://github.com/kubernetes-csi/external-health-monitor/pull/101 
Эта проблема была исправлена и включена в следующую версию расширения external-health-monitor версии 0.5.0. Это было выпущено 4 марта 2022 г.
Разрешение
Разрешение:
Обновите драйвер CSI до версии 2.3.0 или более поздней, который использует расширение внешнего монитора работоспособности версии 0.5.0 в соответствии с документацией Dell Technologies Container Storage Modules:
https://dell.github.io/csm-docs/ 