Trident: blkid ์‹œ๊ฐ„ ์ดˆ๊ณผ๋กœ ์ธํ•œ ์ž„์˜์˜ pvc ๋งˆ์šดํŠธ ์‹คํŒจ

์— ๋งŒ๋“  2020๋…„ 10์›” 14์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: NetApp/trident

๋ฒ„๊ทธ ์„ค๋ช…
netapp pvc๋ฅผ ๋งˆ์šดํŠธํ•  ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์— ContainerCreating ์ƒํƒœ์—์„œ ๋ฌด์ž‘์œ„๋กœ ๋ฉˆ์ถ˜ ๋งŽ์€ ํฌ๋“œ๋ฅผ ๊ด€์ฐฐํ–ˆ์Šต๋‹ˆ๋‹ค. ํฌ๋“œ๋ฅผ ์„ค๋ช…ํ•˜๋Š” ๋™์•ˆ iSCSI ์žฅ์น˜ ์ •๋ณด ๋ฐ ํŠธ๋ผ์ด๋˜ํŠธ ๋ฐ๋ชฌ์…‹ ๋กœ๊ทธ๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ๋™์•ˆ ์‹œ๊ฐ„ ์ดˆ๊ณผ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Œ์„ ์„ค๋ช…ํ•˜๋ฉด ํ˜ธ์ŠคํŠธ์—์„œ blkid ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๋Š” ๋™์•ˆ ์‹œ๊ฐ„ ์ดˆ๊ณผ๊ฐ€ ๋ฐœ์ƒํ–ˆ๊ธฐ ๋•Œ๋ฌธ์ž„์„ ์•Œ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์ด๊ฒƒ์€ ๋ฌด์ž‘์œ„๋กœ ๋ฐœ์ƒํ•˜๋ฉฐ ์•„์ง ํŠน์ • pvc ๋ฐ ํ˜ธ์ŠคํŠธ์™€ ์ƒ๊ด€ ๊ด€๊ณ„๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

ํ™˜๊ฒฝ

  • ํŠธ๋ผ์ด๋˜ํŠธ ๋ฒ„์ „: 20.07.1
  • ์‚ฌ์šฉ๋œ ํŠธ๋ผ์ด๋˜ํŠธ ์„ค์น˜ ํ”Œ๋ž˜๊ทธ: tridentctl install -n sys-trident --generate-custom-yaml (๊ทธ๋Ÿฐ ๋‹ค์Œ kubectl apply -f - ์ƒ์„ฑ๋œ ๋งค๋‹ˆํŽ˜์ŠคํŠธ์— ๋Œ€ํ•ด)
  • ์ปจํ…Œ์ด๋„ˆ ๋Ÿฐํƒ€์ž„: docker://19.3.12
  • ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๋ฒ„์ „: v1.19.2
  • Kubernetes ์กฐ์ •์ž: ์—†์Œ
  • Kubernetes ์ง€์› ๊ธฐ๋Šฅ ๊ฒŒ์ดํŠธ: kubernetes ๊ธฐ๋ณธ๊ฐ’๋งŒ
  • OS: Kinvolk์˜ Flatcar Container Linux 2605.6.0(Oklo) 5.4.67-flatcar
  • NetApp ๋ฐฑ์—”๋“œ ์œ ํ˜•: ontap-san, ONTAP 9.7.0

์žฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด
ํด๋Ÿฌ์Šคํ„ฐ ๋…ธ๋“œ์—์„œ ๋ฌด์ž‘์œ„๋กœ ๊ด€์ฐฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค(ํŠน์ • ํ˜ธ์ŠคํŠธ ๊ทธ๋ฃน๊ณผ ๊ด€๋ จ์ด ์—†๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค).

์˜ˆ์ƒ๋˜๋Š” ํ–‰๋™
ํ•ฉ๋ฆฌ์ ์ธ ๊ธฐ๊ฐ„ ๋‚ด์— ์ผ๊ด€๋œ ๋งˆ์šดํŠธ ๋™์ž‘.

์ถ”๊ฐ€ ์ปจํ…์ŠคํŠธ
"๊ณ ์ •๋œ" ํฌ๋“œ๋ฅผ ์„ค๋ช…ํ•˜๋ฉด ๋‹ค์Œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Events:
  Type     Reason       Age                  From     Message
  ----     ------       ----                 ----     -------
  Warning  FailedMount  51m (x5 over 72m)    kubelet  Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[data thanos-storage vault-tls thanos-store-token-lj9j5]: timed out waiting for the condition
  Warning  FailedMount  42m (x3 over 56m)    kubelet  Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[thanos-storage vault-tls thanos-store-token-lj9j5 data]: timed out waiting for the condition
  Warning  FailedMount  17m (x15 over 74m)   kubelet  Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[vault-tls thanos-store-token-lj9j5 data thanos-storage]: timed out waiting for the condition
  Warning  FailedMount  14m (x22 over 74m)   kubelet  MountVolume.MountDevice failed for volume "pvc-e22cdf07-acfc-42af-a46a-bffd5ac32514" : rpc error: code = Internal desc = error getting iSCSI device information: process killed after timeout
  Warning  FailedMount  4m11s (x4 over 69m)  kubelet  Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[thanos-store-token-lj9j5 data thanos-storage vault-tls]: timed out waiting for the condition

trident daemonset ๊ฐ ํฌ๋“œ ๋กœ๊ทธ์˜ ๋™์ผํ•œ ๋…ธ๋“œ์—์„œ:

time="2020-10-14T14:32:41Z" level=debug msg=">>>> osutils.execCommandWithTimeout." args="[if=/dev/sdc bs=4096 count=1 status=none]" command=dd timeoutSeconds=5s
time="2020-10-14T14:32:41Z" level=debug msg="<<<< osutils.execCommandWithTimeout." command=dd error="<nil>"
time="2020-10-14T14:32:41Z" level=debug msg="<<<< osutils.ensureDeviceReadable"
time="2020-10-14T14:32:41Z" level=debug msg=">>>> osutils.getFSType" device=/dev/sdc
time="2020-10-14T14:32:41Z" level=debug msg=">>>> osutils.waitForDevice" device=/dev/sdc
time="2020-10-14T14:32:41Z" level=debug msg="Device found." device=/dev/sdc
time="2020-10-14T14:32:41Z" level=debug msg="<<<< osutils.waitForDevice" device=/dev/sdc
time="2020-10-14T14:32:41Z" level=debug msg=">>>> osutils.execCommandWithTimeout." args="[/dev/sdc]" command=blkid timeoutSeconds=5s
time="2020-10-14T14:32:46Z" level=error msg="process killed after timeout" process=blkid
time="2020-10-14T14:32:46Z" level=debug msg="<<<< osutils.execCommandWithTimeout." command=blkid error="process killed after timeout"
time="2020-10-14T14:32:46Z" level=debug msg="<<<< osutils.getFSType"
time="2020-10-14T14:32:46Z" level=debug msg="<<<< osutils.getDeviceInfoForLUN" iSCSINodeName="iqn.1992-08.com.netapp:sn.0205ffce026911ebb4d9d039ea1a7953:vs.9" lunID=1 needFSType=true
time="2020-10-14T14:32:46Z" level=debug msg="<<<< osutils.AttachISCSIVolume"
time="2020-10-14T14:32:46Z" level=debug msg="<<<< NodeStageVolume" Method=NodeStageVolume Type=CSI_Node
time="2020-10-14T14:32:46Z" level=debug msg="Released shared lock (NodeStageVolume-pvc-e22cdf07-acfc-42af-a46a-bffd5ac32514)." lock=csi_node_server
time="2020-10-14T14:32:46Z" level=error msg="GRPC error: rpc error: code = Internal desc = error getting iSCSI device information: process killed after timeout"

blkid ๋Š” ํ—ˆ์šฉ๋œ ์‹œ๊ฐ„ ์ฐฝ(?)
ํ˜ธ์ŠคํŠธ์— sshํ•˜๊ณ  ๋™์ผํ•œ ๋ช…๋ น์„ ์‹œ๋„ํ•˜๋Š” ๊ฒฝ์šฐ:

$ time sudo blkid /dev/sdc
/dev/sdc: UUID="f593b708-ed88-47b7-88ce-f9b8c85ab96b" TYPE="ext4"

real    0m36.393s
user    0m0.016s
sys     0m0.021s

๋ฐฑ์—”๋“œ json ๊ตฌ์„ฑ:
```
{
"๋ฒ„์ „": 1,
"storageDriverName": "ontap-san",
"๊ด€๋ฆฌLIF": "10.20.50.6",
"dataLIF": "10.20.50.4",
"svm": "dev_kube",
"igroupName": "dev_kube_trident",
"์‚ฌ์šฉ์ž ์ด๋ฆ„": "xxxxxxxxx",
"๋น„๋ฐ€๋ฒˆํ˜ธ": "xxxxxxxxxxxx",
"๊ธฐ๋ณธ๊ฐ’": {
"์•”ํ˜ธํ™”": "์ฐธ"
}
}
````

์šฐ๋ฆฌ๋Š” ์—ฌ๊ธฐ์—์„œ ์ •๋ง ๋ง‰ํ˜”์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์ด๊ฒƒ์— ๋Œ€ํ•œ ์–ด๋–ค ๋„์›€๋„ ๋Œ€๋‹จํžˆ ๊ฐ์‚ฌํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค!

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋„คํŠธ์›Œํฌ ๋งํฌ ์†๋„๋ฅผ ๋””๋ฒ„๊น…ํ•œ ์ดํ›„๋กœ ๋ณธ ์ ์ด ์—†์œผ๋ฏ€๋กœ ๋‹ซ์Šต๋‹ˆ๋‹ค. ๋„์›€์„ ์ฃผ์…”์„œ ๋Œ€๋‹จํžˆ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! :))

๋ชจ๋“  4 ๋Œ“๊ธ€

์•ˆ๋…•ํ•˜์„ธ์š” @ffilippopoulos ,

์ง€์ ํ–ˆ๋“ฏ์ด blkid๋Š” ํ˜ธ์ŠคํŠธ ์ˆ˜์ค€ ๋ช…๋ น์ž…๋‹ˆ๋‹ค. ์‹œ๊ฐ„์ด ์ดˆ๊ณผ๋˜๊ธฐ ์ „์— ์ด ๋ช…๋ น์ด ๋ฐ˜ํ™˜๋˜๋Š” ๊ธฐ๋Šฅ์€ Trident๊ฐ€ ์ œ์–ดํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ด ์•„๋‹™๋‹ˆ๋‹ค. Trident๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ํ˜ธ์ŠคํŠธ๋กœ sshํ•˜๊ณ  ์…ธ์—์„œ blkid๋ฅผ ์‹คํ–‰ํ•  ๋•Œ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒƒ๊ณผ ๋™์ผํ•œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค. ํ˜ธ์ŠคํŠธ์˜ ๋ถ€ํ•˜๋ฅผ ์กฐ์‚ฌํ–ˆ์Šต๋‹ˆ๊นŒ?

๋˜ํ•œ ์ด ๋ฌธ์ œ์™€ ๊ด€๋ จํ•˜์—ฌ ์ฆ‰๊ฐ์ ์ธ ์ง€์›์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ NetApp ์ง€์›์— ๋ฌธ์˜ํ•˜์‹ญ์‹œ์˜ค.

NetApp์œผ๋กœ ์‚ฌ๋ก€๋ฅผ ์—ด๋ ค๋ฉด https://mysupport.netapp.com/site/๋กœ ์ด๋™ํ•˜์‹ญ์‹œ์˜ค.
์™ผ์ชฝ ํ•˜๋‹จ '์ง€์› ๋ฌธ์˜' ํด๋ฆญ
๊ท€ํ•˜์˜ ์ง€์—ญ์—์„œ ์ „ํ™”๋ฅผ ๊ฑธ๊ฑฐ๋‚˜ ๋กœ๊ทธ์ธํ•  ์ ์ ˆํ•œ ๋ฒˆํ˜ธ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.
์ฐธ๊ณ : Trident๋Š” ํŽ˜์ด์ง€์— ๋‚˜์—ด๋˜์ง€ ์•Š์ง€๋งŒ ์ง€์›๋˜๋Š” Netapp ์Šคํ† ๋ฆฌ์ง€ SN์„ ๊ธฐ๋ฐ˜์œผ๋กœ NetApp์—์„œ ์ง€์›ํ•˜๋Š” ์ œํ’ˆ์ž…๋‹ˆ๋‹ค.
NetApp ์Šคํ† ๋ฆฌ์ง€ SN์˜ ์ผ€์ด์Šค๋ฅผ ์—ด๊ณ  ๋ฌธ์ œ์— ๋Œ€ํ•œ ์„ค๋ช…์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
์ œํ’ˆ์ด Kubernetes์˜ Trident์ž„์„ ์–ธ๊ธ‰ํ•˜๊ณ  ์„ธ๋ถ€ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•˜์‹ญ์‹œ์˜ค. ์ด GitHub๋ฅผ ์–ธ๊ธ‰ํ•˜์‹ญ์‹œ์˜ค.
์‚ฌ๋ก€๋Š” ์‘๋‹ต์„ ์œ„ํ•ด Trident ์ง€์› ์—”์ง€๋‹ˆ์–ด์—๊ฒŒ ์ „๋‹ฌ๋ฉ๋‹ˆ๋‹ค.

์•ˆ๋…•ํ•˜์„ธ์š” @gnarl ๋น ๋ฅธ ๋‹ต๋ณ€ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๋‚ด๊ฐ€ ๋ณผ ์ˆ˜์žˆ๋Š” ํ•œ tridents ํ•„๋“œ์—์žˆ๋Š”์ด ๋ช…๋ น์—๋Š” 5 ์ดˆ์˜ ์ œํ•œ ์‹œ๊ฐ„์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚ด๊ฐ€ ๋ณผ ์ˆ˜ ์žˆ๋Š” ํ•œ ์šฐ๋ฆฌ ๋…ธ๋“œ๊ฐ€ ์ „ํ˜€ ๋กœ๋“œ๋˜์ง€ ์•Š์•˜์œผ๋ฉฐ(์˜ˆ๋ฅผ ๋“ค์–ด ๋…ธ๋“œ์—์„œ ์ด์ œ load average: 0.54, 0.62, 0.61 ๋ฌธ์ œ๊ฐ€ ํ‘œ์‹œ๋จ) ์ด๊ฒƒ์ด ์šฐ๋ฆฌ๊ฐ€ ๊ด€์ฐฐํ•˜๋Š” ๋™์ž‘์„ ์„ค๋ช…ํ•  ๊ฒƒ์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
ํ•˜๋“œ์ฝ”๋”ฉ๋œ ์‹œ๊ฐ„ ์ดˆ๊ณผ์— ๋Œ€ํ•œ ์ด์œ ๊ฐ€ ์žˆ์Šต๋‹ˆ๊นŒ? ์šฐ๋ฆฌ๊ฐ€ ์•Œ์ง€ ๋ชปํ•˜๋Š” ์–ด๋–ค ์‚ฌ๊ฑด์„ ์˜ˆ๋ฐฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๊นŒ?

@ffilippopoulos , blkid๋Š” ์‹คํ–‰ํ•˜๋Š” ๋ฐ ๊ฑฐ์˜ 5์ดˆ๊ฐ€ ๊ฑธ๋ฆฌ์ง€ ์•Š์•„์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํ˜ธ์ŠคํŠธ์˜ ๋กœ๋“œ๊ฐ€ ์–‘ํ˜ธํ•ด ๋ณด์ด๋ฉด ํ˜ธ์ŠคํŠธ์™€ NetApp dataLIF ๊ฐ„์˜ ๋„คํŠธ์›Œํฌ ๋Œ€๊ธฐ ์‹œ๊ฐ„์„ ์กฐ์‚ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?

blkid๊ฐ€ ์ž‘๋™ํ•˜์ง€ ์•Š์œผ๋ฉด Trident๊ฐ€ ๋ณผ๋ฅจ์„ ์•ˆ์ „ํ•˜๊ฒŒ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์— blkid์— ๋Œ€ํ•œ ํ•˜๋“œ ํƒ€์ž„์•„์›ƒ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

๋„คํŠธ์›Œํฌ ๋งํฌ ์†๋„๋ฅผ ๋””๋ฒ„๊น…ํ•œ ์ดํ›„๋กœ ๋ณธ ์ ์ด ์—†์œผ๋ฏ€๋กœ ๋‹ซ์Šต๋‹ˆ๋‹ค. ๋„์›€์„ ์ฃผ์…”์„œ ๋Œ€๋‹จํžˆ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! :))

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰