メインコンテンツへスキップ

OpenShift Virtualization VMの削除後、Tridentボリュームが削除状態のままになる

Views:
1
Visibility:
Public
Votes:
0
Category:
astra_trident
Specialty:
astra
Last Updated:

環境

  • NetApp Trident 26.02
  • OpenShift Container Platform (OCP) 4.x
  • OpenShift Virtualization (OCP Virt) 4.x

問題

OpenShift Virtualization で仮想マシン(VM)を削除した後、1 つ以上の Trident PVC が volumeState=deleting のまま無期限に残り、回収されません。
  • tridentctl get volumes -n tridentは、deleting状態で進行しないボリュームを示しています。
  • Tridentコントローラーのログには次の内容が含まれます:
    • level=warning msg="Backend update resulted in an orphaned volume." backend=<backend-name> vol.Config.InternalName=trident_<backend>_pvc_<uuid> volume=pvc-<uuid> workflow="cr=reconcile"
    • Tridentlevel=debug msg="Updating an existing volume." volume=pvc-<uuid> volumeState=deleting volume_orphaned=true workflow="cr=reconcile"
    • level=debug msg="Attempting snapshot delete."backend=<backend-name> snapshotName=snapshot-<uuid> volumeName=pvc-<uuid>
      workflow="snapshot=delete"
    • level=warning msg="Retried locked snapshot delete, clone split timer not yet expired." logLayer=core requestID=<id> requestSource=CSI secondsBeforeSplit=86366.62 snapshot=pvc-<uuid>
  • VolumeSnapshotオブジェクト(vmsnapshot-*)はVM削除後も名前空間に残ります。
  • VM作成率が高い環境では、Tridentコントローラーのパフォーマンスも低下する可能性があります(tridentctl応答の遅延、タイムアウト)。

原因

  • OpenShift Virtualization(OCP Virt)でVMが削除されても、関連するVolumeSnapshotオブジェクト(vmsnapshot-*)は自動的には削除されません。残りの各VolumeSnapshotは、Tridentボリューム削除カスケードをブロックするKubernetesファイナライザーのチェーンを保持しています:
          VolumeSnapshot
            → VolumeSnapshotContent (bound-protection finalizer)
              → TridentSnapshot (trident.netapp.io finalizer)
                → ONTAP snapshot
                  → TridentVolume stuck in deleting
  • Trident 26.02では、cloneSplitDelayパラメータのデフォルト値は86400秒(24時間)です。 

解決策

    警告

    スナップショットを削除する前に、VMが不要であることを確認してください。VolumeSnapshotを削除すると、他のファイナライザーがブロックしていない場合、VolumeSnapshotContentとTridentSnapshotの連鎖的な削除がトリガーされます。

     スタックしたボリュームごとに、以下の手順を繰り返してください。

    1. OCP Virt VolumeSnapshotオブジェクト(存在する場合)を削除するには、影響を受ける名前空間内のvmsnapshot-*オブジェクトを特定して削除します:
      1. oc get volumesnapshot -n <namespace>
      2. oc delete volumesnapshot <vmsnapshot-name> -n <namespace>
    2. 孤立したONTAPスナップショットを削除します:
      1. ONTAPボリュームに直接残っているスナップショットを確認します: snapshot show -vserver <svm> -volume <trident_internal_volume_name>
      2. Busy=falseで対応するKubernetesオブジェクトがないものをすべて削除します: snap delete -vserver <svm> -volume <trident_internal_volume_name> -snapshot <snapshot_name>
    3. OCP Virtワークロードで使用されるすべてのTridentバックエンド構成でcloneSplitDelay300秒に削減します:(これにより、クローン スプリットが5分以内に完了し、ソースVMの削除によってボリュームがスタックする可能性のある期間が大幅に短縮されます。)
      1. "cloneSplitDelay": 300
    4. 利用可能になったらTrident 26.06にアップグレードします

    パートナーノート

    partnerNotes_text

    追加情報

    テンプレートから VM を作成する際、Trident は各 PVC に対してスナップショットとクローンを作成します。スナップショットは、クローン スプリット完了後に自動的に削除されることが期待されます。86400 秒の遅延がある場合、分割ウィンドウが閉じる前にソース VM が削除されると、スナップショットが残ってしまい、削除チェーンがブロックされます。多数の VM が存在する環境では、これにより多数の孤立したスナップショットが発生し、Trident コントローラーのパフォーマンスが低下します。

    内部情報

    ONTAP ボリュームと Snapshot がすでに削除されているにもかかわらず、ボリュームが削除状態のままである場合は、TridentSnapshot および TridentVolume CRD からファイナライザーを削除します。

    • 特定のPVCのTridentSnapshot名を確認するには:
      • kubectl get tridentsnapshot -n trident | grep <pvc-name>
      • kubectl patch tridentsnapshot <snapshot-name> -n trident \
          -p '{"metadata":{"finalizers":[]}}' --type=merge
      • kubectl delete tridentsnapshot <snapshot-name> -n trident
        kubectl patch tridentvolume <pvc-name> -n trident \
          -p '{"metadata":{"finalizers":[]}}' --type=merge
      • kubectl delete tridentvolume <pvc-name> -n trident

    バグ TRID-19333: https://jira.ngage.netapp.com/browse/TRID-19333

    Sign in to view the entire content of this KB article.

    New to NetApp?

    Learn more about our award-winning Support

    NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.