簡介
本文說明對策略控制功能(PCF)中出現的路徑調配器記憶體警報進行故障排除的過程。
必要條件
需求
思科建議您瞭解以下主題:
- PCF
- 5G雲端原生部署平台(CNDP)
- 道克斯和庫伯內特
採用元件
本文中的資訊係根據以下軟體和硬體版本:
- PCF REL_2023.01.2
- Kubernetes v1.24.6
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
在此設定中,CNDP承載PCF。
在電腦系統和基礎架構中,路徑調配器通常是指為應用程式或服務管理和調配儲存路徑或卷的元件或工具。
路徑調配器通常與雲環境或容器化設定中的動態儲存分配和管理相關聯。它允許應用程式或容器按需請求儲存卷或路徑,無需手動干預或預分配。
路徑調配器可以處理諸如建立或裝入儲存卷、管理訪問許可權以及將它們對映到特定應用程式例項等任務。它抽象化了底層儲存基礎架構,為應用程式與儲存資源互動提供了一個簡化的介面。
問題
登入到Common Execution Environment(CEE)Ops-center,並驗證路徑上調配器pods是否報告記憶體不足(OOM)警報。
Command:
cee# show alerts active summary summary
Example:
[pcf01/pcfapp] cee# show alerts active summary
NAME UID SEVERITY STARTS AT DURATION SOURCE SUMMARY
--------------------------------------------------------------------------------------------------------------------------------------------
container-memory-usag 10659b0bcae0 critical 01-22T22:59:46 path-provisioner-pxps Pod cee-pcf/path-provisioner-pxpss/k8s_path-p...
container-memory-usag b2f10b3725e7 critical 01-22T15:51:36 path-provisioner-pxps Pod cee-pcf/path-provisioner-pxpss/ uses high...
分析
當您在路徑布建器的Pod或容器上收到有關高記憶體使用率的警報時。Kubernetes(K8s)在Pod達到最大記憶體限制時重新啟動它。
或者,Pod在超過80%閾值時可以手動重新啟動,以避免高記憶體警報。
步驟 1.檢查並驗證此命令的活動摘要和輸出中報告的Pod名稱。
Command:
cloud-user@pcf01-master-1$ kubectl get pods --all-namespaces | grep "path-provisioner"
Example:
cloud-user@pcf01-master-1:~$ kubectl get pods --all-namespaces | grep "path-provisioner"
NAMESPACE NAME READY STATUS RESTARTS AGE
cee-pcf path-provisioner-27bjx 1/1 Running 0 110d
cee-pcf path-provisioner-4mlq8 1/1 Running 0 110d
cee-pcf path-provisioner-4zvjd 1/1 Running 0 110d
cee-pcf path-provisioner-566pn 1/1 Running 0 110d
cee-pcf path-provisioner-6d2dr 1/1 Running 0 110d
cee-pcf path-provisioner-7g6l4 1/1 Running 0 110d
cee-pcf path-provisioner-8psnx 1/1 Running 0 110d
cee-pcf path-provisioner-94p9f 1/1 Running 0 110d
cee-pcf path-provisioner-bfr5w 1/1 Running 0 110d
cee-pcf path-provisioner-clpq6 1/1 Running 0 110d
cee-pcf path-provisioner-dbjft 1/1 Running 0 110d
cee-mpcf path-provisioner-dx9ts 1/1 Running 0 110d
cee-pcf path-provisioner-fx72h 1/1 Running 0 110d
cee-pcf path-provisioner-hbxgd 1/1 Running 0 110d
cee-pcf path-provisioner-k6fzc 1/1 Running 0 110d
cee-pcf path-provisioner-l4mzz 1/1 Running 0 110d
cee-pcf path-provisioner-ldxbb 1/1 Running 0 110d
cee-pcf path-provisioner-lf2xx 1/1 Running 0 110d
cee-pcf path-provisioner-lxrjx 1/1 Running 0 110d
cee-pcf path-provisioner-mjhlw 1/1 Running 0 110d
cee-pcf path-provisioner-pq65p 1/1 Running 0 110d
cee-pcf path-provisioner-pxpss 1/1 Running 0 110d
cee-pcf path-provisioner-q4b7m 1/1 Running 0 110d
cee-pcf path-provisioner-qlkjb 1/1 Running 0 110d
cee-pcf path-provisioner-s2jth 1/1 Running 0 110d
cee-pcf path-provisioner-vhzhg 1/1 Running 0 110d
cee-pcf path-provisioner-wqpmr 1/1 Running 0 110d
cee-pcf path-provisioner-xj5k4 1/1 Running 0 110d
cee-pcf path-provisioner-z4h98 1/1 Running 0 110d
cloud-user@pcf01-master-1:~$
步驟 2.驗證活動路徑調配器Pod的總計數。
cloud-user@pcf01-master-1:~$ kubectl get pods --all-namespaces | grep "path-provisioner" | wc -l
29
cloud-user@pcf01-master-1:~$
解決方案
步驟 1.在CEE名稱空間下執行路徑置備程式Pod的重新啟動,以登入到主節點。
cloud-user@pcf01-master-1:~$ kubectl delete pod -n cee-pcf path-provisioner-pxpss
pod "path-provisioner-pxpss" deleted
步驟 2.確認從Kubernetes的吊艙已重新聯機。
cloud-user@pcf01-master-1:~$ kubectl get pods --all-namespaces | grep "path-provisioner"
cee-pcf path-provisioner-27bjx 1/1 Running 0 110d
cee-pcf path-provisioner-4mlq8 1/1 Running 0 110d
cee-pcf path-provisioner-4zvjd 1/1 Running 0 110d
cee-pcf path-provisioner-566pn 1/1 Running 0 110d
cee-pcf path-provisioner-6d2dr 1/1 Running 0 110d
cee-pcf path-provisioner-7g6l4 1/1 Running 0 110d
cee-pcf path-provisioner-8psnx 1/1 Running 0 110d
cee-pcf path-provisioner-94p9f 1/1 Running 0 110d
cee-pcf path-provisioner-bfr5w 1/1 Running 0 110d
cee-pcf path-provisioner-clpq6 1/1 Running 0 110d
cee-pcf path-provisioner-dbjft 1/1 Running 0 110d
cee-pcf path-provisioner-dx9ts 1/1 Running 0 110d
cee-pcf path-provisioner-fx72h 1/1 Running 0 110d
cee-pcf path-provisioner-hbxgd 1/1 Running 0 110d
cee-pcf path-provisioner-k6fzc 1/1 Running 0 110d
cee-pcf path-provisioner-l4mzz 1/1 Running 0 110d
cee-pcf path-provisioner-ldxbb 1/1 Running 0 110d
cee-pcf path-provisioner-lf2xx 1/1 Running 0 110d
cee-pcf path-provisioner-lxrjx 1/1 Running 0 110d
cee-pcf path-provisioner-mjhlw 1/1 Running 0 110d
cee-pcf path-provisioner-pq65p 1/1 Running 0 110d
cee-pcf path-provisioner-pxpss 1/1 Running 0 7s
cee-pcf path-provisioner-q4b7m 1/1 Running 0 110d
cee-pcf path-provisioner-qlkjb 1/1 Running 0 110d
cee-pcf path-provisioner-s2jth 1/1 Running 0 110d
cee-pcf path-provisioner-vhzhg 1/1 Running 0 110d
cee-pcf path-provisioner-wqpmr 1/1 Running 0 110d
cee-pcf path-provisioner-xj5k4 1/1 Running 0 110d
cee-pcf path-provisioner-z4h98 1/1 Running 0 110d
cloud-user@pcf01-master-1:~$
步驟 3.驗證Active Path-Provisioner Pod的總計數是否與重新啟動之前相同。
cloud-user@pcf01-master-1:~$ kubectl get pods --all-namespaces | grep "path-provisioner" | wc -l
29
cloud-user@pcf01-master-1:~$
步驟 4.驗證活動的警報,並確保與路徑調配器相關的警報已清除。
[pcf01/pcfapp] cee# show alerts active summary
NAME UID SEVERITY STARTS AT SOURCE SUMMARY
-----------------------------------------------------------------------------------------------------------------
watchdog 02d125c1ba48 minor 03-29T10:48:08 System This is an alert meant to ensure that the entire a...