VMDisk cloned from an image with storage larger than the image hangs: clone replicas stay Outdated, LINSTOR refuses the resize
維護者通常 3 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start by checking whether the failure reproduces with DRBD 9.3.x, as the report suggests the older 9.2.16 version may be involved and references issue #3168. Follow the CSI clone and volume resize path, using the provided ControllerExpandVolume error and Outdated replica states as entry points. Done means a larger-than-image VMDisk clone becomes ready, or the documentation explains the limitation for affected node versions.
由索引模型根據 Issue 內容生成。
描述
Describe the bug
A VMDisk created from a golden image with storage larger than the image never becomes ready. CDI uses csi-clone for the image PVC and then has to expand the cloned volume to the requested size. LINSTOR creates the cloned resource with every replica in Outdated state, so the expansion is refused (Cannot resize volume, because we have a non-UpToDate DRBD device), the DataVolume stays in PrepClaimInProgress and the target PVC stays Pending indefinitely.
A VMDisk of exactly the image size from the same image (no expansion needed) clones and binds in about 20 seconds.
Environment
- Cozystack v1.7.1
- Provider: Hetzner bare metal (ws1–ws4), StorageClass
replicated(ZFS pooldata, 3 replicas) - Talos v1.12.6, kernel 6.18.18, DRBD 9.2.16 (nodes not yet upgraded to the Talos line that ships with 1.7.1)
- LINSTOR controller 1.33.3, linstor-csi
ghcr.io/cozystack/cozystack/linstor-csi:v1.7.1, CDI v1.66.1
To Reproduce
- In a tenant, apply:
apiVersion: apps.cozystack.io/v1alpha1 kind: VMDisk metadata: name: convert spec: source: image: name: ubuntu-20.04 # golden image PVC is 20Gi storage: 25Gi storageClass: replicated - Watch
kubectl get dv,pvcin the tenant namespace.
Expected behaviour
The disk is cloned from the image and expanded to 25Gi, as with any larger-than-source clone.
Actual behaviour
- DataVolume
vm-disk-convertstays inPrepClaimInProgress, target PVCPending(observed for 20+ minutes, never recovers). - The temporary clone PVC
tmp-pvc-<uid>incozy-publicisBoundat 20Gi with a pending resize to 25Gi. - All three replicas of the cloned LINSTOR resource are
Outdated; none isUpToDate:
The source image resource ispvc-9b6cfc52-… │ ws1 │ DRBD,STORAGE │ Unused │ Ok │ Outdated │ pvc-9b6cfc52-… │ ws3 │ DRBD,STORAGE │ Unused │ Ok │ Outdated │ pvc-9b6cfc52-… │ ws4 │ DRBD,STORAGE │ Unused │ Ok │ Outdated │UpToDateon all its replicas.
Logs
# tmp clone PVC in cozy-public
Warning VolumeResizeFailed resize volume "pvc-9b6cfc52-…" by resizer "linstor.csi.linbit.com" failed:
rpc error: code = Internal desc = ControllerExpandVolume - expand volume failed for &{pvc-9b6cfc52-… map[0:26843545600] …
Aux/csi-relocation-triggered:true …}: Message: 'Cannot resize volume, because we have a non-UpToDate DRBD device.'
Warning VolumeConditionAbnormal Resource with issues on node(s): ws1,ws3,ws4
# target PVC annotations
cdi.kubevirt.io/clonePhase: PrepClaim
cdi.kubevirt.io/cloneType: csi-clone
cdi.kubevirt.io/storage.condition.running.reason: Populator is running
Additional context
- Workaround: request exactly the image size (
storage: 20Giforubuntu-20.04) and grow the disk later. - The nodes still run DRBD 9.2.16, so this may share a root cause with #3168 (DRBD state handling fixed in 9.2.17 / 9.3.x). If it does not reproduce on DRBD 9.3.x, a note in the VM disk docs for clusters on the older node image would still help, since the stuck DataVolume gives no hint about the cause.
Checklist
- I have checked the documentation
- I have searched for similar issues
- I have included all required information
- I have provided clear steps to reproduce
- I have included relevant logs
- 主要語言
- Go
- 星號
- 2.2k
- 分支
- 209
- 平均合併
- 4 天 14 小時
- 30 天內合併 PR
- 140
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
cozystack/cozystack 的其他 Issue
-
triage/needs-triage
難度 2/5 1-3 小時 新手友好度 78/100
cozystack/cozystack#5464 · 1 個 reaction ·
維護者通常 3 天內回覆
-
test(kubernetes-nodes): stop hand-typing the default Talos version in tests that are not about it未關閉area/testing kind/cleanup triage/needs-triage
難度 2/5 1-3 小時 新手友好度 74/100
cozystack/cozystack#5456 · 1 個 reaction ·
維護者通常 3 天內回覆
-
area/testing kind/cleanup triage/needs-triage
難度 2/5 1-3 小時 新手友好度 83/100
cozystack/cozystack#5447 · 1 個 reaction ·
維護者通常 3 天內回覆
-
area/kubernetes kind/bug triage/needs-triage
難度 2/5 1-3 小時 新手友好度 72/100
cozystack/cozystack#5445 · 1 個 reaction ·
維護者通常 3 天內回覆
-
kind/bug triage/needs-triage
難度 2/5 1-3 小時 新手友好度 74/100
cozystack/cozystack#5438 · 1 個 reaction ·
維護者通常 3 天內回覆
查看 cozystack/cozystack 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
-
Correct local module testing instructions for Go sample contributors可能已有人在做 @slievrly 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8可能已有人在做 @pacwestnobody 今天認領。 未關閉go good first issue help wanted
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -race可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
factory:subtask
難度 1/5 1 小時以內 新手友好度 95/100
維護者通常 1 天內回覆