偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Kubernetes Pod 突然就無(wú)法掛載 Ceph RBD 存儲(chǔ)卷了.....

存儲(chǔ) 存儲(chǔ)軟件
Kubernetes 集群中部署了高可用 Harbor 鏡像倉(cāng)庫(kù),并使用 Ceph RBD 提供持久化存儲(chǔ)。本來(lái)是挺美滋滋的,誰(shuí)料昨天有一臺(tái)節(jié)點(diǎn) NotReady 了,導(dǎo)致 Harbor 的某個(gè)組件所在的 Pod 被重新調(diào)度了,但是重新調(diào)度后的 Pod 并沒(méi)有啟動(dòng)成功。

 [[375120]]

本文轉(zhuǎn)載自微信公眾號(hào)「云原生實(shí)驗(yàn)室」,作者米開(kāi)朗基楊 。轉(zhuǎn)載本文請(qǐng)聯(lián)系云原生實(shí)驗(yàn)室公眾號(hào)。  

 前言

Kubernetes 坑不坑?坑!Ceph 坑不坑?坑!他倆湊到一起呢?巨坑!

之前在 Kubernetes 集群中部署了高可用 Harbor 鏡像倉(cāng)庫(kù),并使用 Ceph RBD 提供持久化存儲(chǔ)。本來(lái)是挺美滋滋的,誰(shuí)料昨天有一臺(tái)節(jié)點(diǎn) NotReady 了,導(dǎo)致 Harbor 的某個(gè)組件所在的 Pod 被重新調(diào)度了,但是重新調(diào)度后的 Pod 并沒(méi)有啟動(dòng)成功。

進(jìn)一步通過(guò) describe pod 查看 events,發(fā)現(xiàn)如下 Warning:

  1. Events: 
  2.   Type     Reason              Age   From                     Message 
  3.   ----     ------              ----  ----                     ------- 
  4.   Normal   Scheduled           23s   default-scheduler        Successfully assigned harbor/harbor-harbor-registry-5796cdddd7-kxzp9 to k8s03 
  5.   Warning  FailedAttachVolume  22s   attachdetach-controller  Multi-Attach error for volume "pvc-ec045b5e-2471-469d-9a1b-6e7db0e938b3" Volume is already exclusively attached to one node and can't be attached to another 

好家伙,當(dāng)前的 PV 所對(duì)應(yīng)的 RBD image 還在被另一個(gè) Pod 占用著,所以無(wú)法掛載到新 Pod 中。我到 NotReady 的節(jié)點(diǎn)中通過(guò) docker rm -vf xxx 直接將之前的 Pod 刪除,仍然不起作用。

現(xiàn)在看來(lái)我只能從之前的 Pod 所在節(jié)點(diǎn)中將 RBD image 映射的塊設(shè)備強(qiáng)行 unmount 了。首先得找到該 PV 所對(duì)應(yīng)的 RBD image,直接查看 PV 的信息:

  1. 🐳  → kubectl -n harbor get pv pvc-ec045b5e-2471-469d-9a1b-6e7db0e938b3 -o go-template='{{.spec.csi.volumeAttributes.imageName}}' 
  2.  
  3. csi-vol-bf0dc641-4a5a-11eb-988c-6ab597a1411c 

到 Ceph 管理節(jié)點(diǎn)中查看該 image 正在被誰(shuí)使用:

  1. 🐳  → rbd status kubernetes/csi-vol-bf0dc641-4a5a-11eb-988c-6ab597a1411c 
  2. Watchers: 
  3.  watcher=172.16.7.1:0/3619044864 client.195600 cookie=18446462598732840980 

找到了罪魁禍?zhǔn)?,于是登錄?172.16.7.1 將塊設(shè)備強(qiáng)行卸載:

  1. 🐳  → docker ps|grep csi 
  2. 77255fe4f26b        650757c4f32d                  "/usr/local/bin/ceph…"   3 weeks ago         Up 3 weeks                              k8s_liveness-prometheus_csi-rbdplugin-hscf8_ceph-csi_2b7da817-3f4a-4e8f-9f99-a39da07c5b94_5 
  3. fb4e5e10f064        650757c4f32d                  "/usr/local/bin/ceph…"   3 weeks ago         Up 3 weeks                              k8s_csi-rbdplugin_csi-rbdplugin-hscf8_ceph-csi_2b7da817-3f4a-4e8f-9f99-a39da07c5b94_5 
  4. 5330c84529e9        37c1d9ea538b                  "/csi-node-driver-re…"   3 weeks ago         Up 3 weeks                              k8s_driver-registrar_csi-rbdplugin-hscf8_ceph-csi_2b7da817-3f4a-4e8f-9f99-a39da07c5b94_6 
  5. 4452755ffccf        k8s.gcr.io/pause:3.2          "/pause"                 3 weeks ago         Up 3 weeks                              k8s_POD_csi-rbdplugin-hscf8_ceph-csi_2b7da817-3f4a-4e8f-9f99-a39da07c5b94_5 
  6.  
  7. 🐳  → docker exec -it fb4e5e10f064 bash 
  8. [root@k8s01 /]# rbd showmapped|grep csi-vol-bf0dc641-4a5a-11eb-988c-6ab597a1411c 
  9. 4   kubernetes             csi-vol-bf0dc641-4a5a-11eb-988c-6ab597a1411c  -     /dev/rbd4 
  10.  
  11. [root@k8s01 /]# rbd unmap -o force /dev/rbd4 

現(xiàn)在在來(lái)看新 Pod,已經(jīng)啟動(dòng)成功了:

  1. Events: 
  2.   Type     Reason                  Age                   From                     Message 
  3.   ----     ------                  ----                  ----                     ------- 
  4.   Normal   Scheduled               18m                   default-scheduler        Successfully assigned harbor/harbor-harbor-registry-5796cdddd7-kxzp9 to k8s03 
  5.   Warning  FailedAttachVolume      18m                   attachdetach-controller  Multi-Attach error for volume "pvc-ec045b5e-2471-469d-9a1b-6e7db0e938b3" Volume is already exclusively attached to one node and can't be attached to another 
  6.   Warning  FailedMount             14m                   kubelet, k8s03           Unable to attach or mount volumes: unmounted volumes=[registry-data], unattached volumes=[default-token-phjbz registry-data registry-root-certificate registry-htpasswd registry-config]: timed out waiting for the condition 
  7.   Normal   SuccessfulAttachVolume  12m                   attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-ec045b5e-2471-469d-9a1b-6e7db0e938b3" 
  8.   Warning  FailedMount             12m                   kubelet, k8s03           Unable to attach or mount volumes: unmounted volumes=[registry-data], unattached volumes=[registry-htpasswd registry-config default-token-phjbz registry-data registry-root-certificate]: timed out waiting for the condition 
  9.   Warning  FailedMount             5m21s (x2 over 16m)   kubelet, k8s03           Unable to attach or mount volumes: unmounted volumes=[registry-data], unattached volumes=[registry-config default-token-phjbz registry-data registry-root-certificate registry-htpasswd]: timed out waiting for the condition 
  10.   Warning  FailedMount             3m5s (x2 over 9m55s)  kubelet, k8s03           Unable to attach or mount volumes: unmounted volumes=[registry-data], unattached volumes=[registry-root-certificate registry-htpasswd registry-config default-token-phjbz registry-data]: timed out waiting for the condition 
  11.   Warning  FailedMount             2m54s (x9 over 11m)   kubelet, k8s03           MountVolume.MountDevice failed for volume "pvc-ec045b5e-2471-469d-9a1b-6e7db0e938b3" : rpc error: code = Internal desc = rbd image kubernetes/csi-vol-bf0dc641-4a5a-11eb-988c-6ab597a1411c is still being used 
  12.   Warning  FailedMount             50s (x2 over 7m39s)   kubelet, k8s03           Unable to attach or mount volumes: unmounted volumes=[registry-data], unattached volumes=[registry-data registry-root-certificate registry-htpasswd registry-config default-token-phjbz]: timed out waiting for the condition 
  13.   Normal   Pulling                 15s                   kubelet, k8s03           Pulling image "goharbor/registry-photon:v2.1.2" 
  14.   Normal   Pulled                  12s                   kubelet, k8s03           Successfully pulled image "goharbor/registry-photon:v2.1.2" 
  15.   Normal   Created                 12s                   kubelet, k8s03           Created container registry 
  16.   Normal   Started                 12s                   kubelet, k8s03           Started container registry 

 

責(zé)任編輯:武曉燕 來(lái)源: 米開(kāi)朗基楊
相關(guān)推薦

2022-08-22 07:58:14

容器云存儲(chǔ)開(kāi)發(fā)

2017-04-19 15:57:21

Ceph RBD mi原理分析

2020-10-31 16:40:13

5G運(yùn)營(yíng)商通信

2019-11-27 08:41:41

Java進(jìn)程虛擬機(jī)

2023-05-16 08:30:53

QuincyReef

2021-06-07 08:19:27

Java多線程進(jìn)程

2023-12-08 07:59:04

2018-01-30 09:07:36

Ceph分布式存儲(chǔ)

2023-02-16 08:03:01

開(kāi)源Kubernetes

2023-02-09 16:47:34

KubernetesPod優(yōu)先級(jí)

2015-12-08 11:08:00

戴爾云計(jì)算

2023-12-01 08:01:59

鏡像Ceph

2022-06-06 07:56:12

LUKSLUKS2PBKDF2

2017-12-06 14:35:01

OpenStackCeph存儲(chǔ)

2018-05-22 08:37:02

Ceph存儲(chǔ)存儲(chǔ)系統(tǒng)

2021-12-06 08:00:00

Kubernetes容器數(shù)據(jù)

2022-04-09 15:26:46

Kubernetes刪除操作源碼解析

2020-11-30 12:15:26

KubernetesPodLinux

2023-10-19 19:42:25

IstioPodkubernetes

2025-08-27 00:00:05

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)