VMDisk cloned from an image with storage larger than the image hangs: clone replicas stay Outdated, LINSTOR refuses the resize

未關閉
#5,460 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 3 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
go, kubernetes
領域
backend

研究方向

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 內容生成。

描述

kind/bug triage/needs-triage

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 pool data, 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

  1. 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
    
  2. Watch kubectl get dv,pvc in 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-convert stays in PrepClaimInProgress, target PVC Pending (observed for 20+ minutes, never recovers).
  • The temporary clone PVC tmp-pvc-<uid> in cozy-public is Bound at 20Gi with a pending resize to 25Gi.
  • All three replicas of the cloned LINSTOR resource are Outdated; none is UpToDate:
    pvc-9b6cfc52-… │ ws1 │ DRBD,STORAGE │ Unused │ Ok │ Outdated │
    pvc-9b6cfc52-… │ ws3 │ DRBD,STORAGE │ Unused │ Ok │ Outdated │
    pvc-9b6cfc52-… │ ws4 │ DRBD,STORAGE │ Unused │ Ok │ Outdated │
    
    The source image resource is UpToDate on 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: 20Gi for ubuntu-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

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

cozystack/cozystack 的其他 Issue

查看 cozystack/cozystack 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。