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

オープン
#5,460 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
140

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cozystack/cozystack のほかの issue

cozystack/cozystack の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。