この文書は自動機械翻訳技術を使用して翻訳されています。 正確な翻訳を提供するように努めておりますが、翻訳された内容の完全性、正確性、信頼性については一切保証いたしません。 相違がある場合は、元の英語版 英語 が優先され、正式なテキストとなります。

v1.3.2からv1.4.0にアップグレードする

一般情報

新しいSUSE Virtualizationバージョンが利用可能になると、*ダッシュボード*画面に*アップグレード*ボタンが表示されます。詳細については、アップグレードを開始するを参照してください。

エアギャップ環境の場合は、エアギャップアップグレードの準備を参照してください。

アップグレード中の仮想マシンイメージの破損を防ぐ

アップグレードを開始する前に、BackingImage CRDが SUSE Storage *v1.7.2*バージョンに更新されていることを確認してください。

CRDの更新をスキップすると、 問題 #10644に記載されているように、バックイメージの破損が発生する可能性があります。

アップグレードを開始する前に、以下の手順を実行してください。

  1. 関連するエラーや警告を回避するために、*SUSE Virtualization ManagedChartオブジェクト*をパッチします。

    kubectl patch managedchart harvester \
    -n fleet-local \
    --type='json' \
    -p='[
      {
        "op":"add",
        "path":"/spec/diff/comparePatches/-",
        "value": {
          "apiVersion":"apiextensions.k8s.io/v1",
          "jsonPointers":["/spec","/metadata/annotations", "/metadata/labels", "/status"],
          "kind":"CustomResourceDefinition",
          "name":"backingimages.longhorn.io"
        }
      }
    ]'
  2. SUSE Storage v1.7.2 BackingImage CRDを適用します。

    apiVersion: apiextensions.k8s.io/v1
    kind: CustomResourceDefinition
    metadata:
      annotations:
        controller-gen.kubebuilder.io/version: v0.15.0
      labels:
        app.kubernetes.io/name: longhorn
        app.kubernetes.io/instance: longhorn
        app.kubernetes.io/version: v1.7.2
        longhorn-manager: ""
      name: backingimages.longhorn.io
    spec:
      conversion:
        strategy: Webhook
        webhook:
          clientConfig:
            service:
              name: longhorn-conversion-webhook
              namespace: longhorn-system
              path: /v1/webhook/conversion
              port: 9501
          conversionReviewVersions:
          - v1beta2
          - v1beta1
      group: longhorn.io
      names:
        kind: BackingImage
        listKind: BackingImageList
        plural: backingimages
        shortNames:
        - lhbi
        singular: backingimage
      scope: Namespaced
      versions:
      - additionalPrinterColumns:
        - description: The backing image name
          jsonPath: .spec.image
          name: Image
          type: string
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
        name: v1beta1
        schema:
          openAPIV3Schema:
            description: BackingImage is where Longhorn stores backing image object.
            properties:
              apiVersion:
                description: |-
                  APIVersion defines the versioned schema of this representation of an object.
                  Servers should convert recognized schemas to the latest internal value, and
                  may reject unrecognized values.
                  More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
                type: string
              kind:
                description: |-
                  Kind is a string value representing the REST resource this object represents.
                  Servers may infer this from the endpoint the client submits requests to.
                  Cannot be updated.
                  In CamelCase.
                  More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
                type: string
              metadata:
                type: object
              spec:
                x-kubernetes-preserve-unknown-fields: true
              status:
                x-kubernetes-preserve-unknown-fields: true
            type: object
        served: true
        storage: false
        subresources:
          status: {}
      - additionalPrinterColumns:
        - description: The system generated UUID
          jsonPath: .status.uuid
          name: UUID
          type: string
        - description: The source of the backing image file data
          jsonPath: .spec.sourceType
          name: SourceType
          type: string
        - description: The backing image file size in each disk
          jsonPath: .status.size
          name: Size
          type: string
        - description: The virtual size of the image (may be larger than file size)
          jsonPath: .status.virtualSize
          name: VirtualSize
          type: string
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
        name: v1beta2
        schema:
          openAPIV3Schema:
            description: BackingImage is where Longhorn stores backing image object.
            properties:
              apiVersion:
                description: |-
                  APIVersion defines the versioned schema of this representation of an object.
                  Servers should convert recognized schemas to the latest internal value, and
                  may reject unrecognized values.
                  More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
                type: string
              kind:
                description: |-
                  Kind is a string value representing the REST resource this object represents.
                  Servers may infer this from the endpoint the client submits requests to.
                  Cannot be updated.
                  In CamelCase.
                  More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
                type: string
              metadata:
                type: object
              spec:
                description: BackingImageSpec defines the desired state of the Longhorn
                  backing image
                properties:
                  checksum:
                    type: string
                  diskFileSpecMap:
                    additionalProperties:
                      properties:
                        evictionRequested:
                          type: boolean
                      type: object
                    type: object
                  diskSelector:
                    items:
                      type: string
                    type: array
                  disks:
                    additionalProperties:
                      type: string
                    description: Deprecated. We are now using DiskFileSpecMap to assign
                      different spec to the file on different disks.
                    type: object
                  minNumberOfCopies:
                    type: integer
                  nodeSelector:
                    items:
                      type: string
                    type: array
                  secret:
                    type: string
                  secretNamespace:
                    type: string
                  sourceParameters:
                    additionalProperties:
                      type: string
                    type: object
                  sourceType:
                    enum:
                    - download
                    - upload
                    - export-from-volume
                    - restore
                    - clone
                    type: string
                type: object
              status:
                description: BackingImageStatus defines the observed state of the Longhorn
                  backing image status
                properties:
                  checksum:
                    type: string
                  diskFileStatusMap:
                    additionalProperties:
                      properties:
                        lastStateTransitionTime:
                          type: string
                        message:
                          type: string
                        progress:
                          type: integer
                        state:
                          type: string
                      type: object
                    nullable: true
                    type: object
                  diskLastRefAtMap:
                    additionalProperties:
                      type: string
                    nullable: true
                    type: object
                  ownerID:
                    type: string
                  size:
                    format: int64
                    type: integer
                  uuid:
                    type: string
                  virtualSize:
                    description: Virtual size of image, which may be larger than physical
                      size. Will be zero until known (e.g. while a backing image is uploading)
                    format: int64
                    type: integer
                type: object
            type: object
        served: true
        storage: true
        subresources:
          status: {}

既知の問題

1.アップグレードが「プレドレイン」状態で停止しています

コンテナディスクを持つ仮想マシンは、ライブマイグレーション機能の制限により移行できません。これにより、アップグレードプロセスが「プレドレイン」状態で停止します。

アップグレードプロセスを続行するには、仮想マシンを手動で停止してください。

関連する問題: #7005

2.アップグレードがバンドル待機中で停止しています

この問題は、SUSE® Rancher Prime: Continuous Deliveryエージェント(fleet-agent)が再デプロイされる際の競合状態によって引き起こされます。以下のエラーメッセージは、問題が存在することを示しています。

> kubectl get bundles -n fleet-local
NAME                                          BUNDLEDEPLOYMENTS-READY   STATUS
mcc-harvester                                 0/1                       ErrApplied(1) [Cluster fleet-local/local: encountered 2 deletion errors. First is: admission webhook "validator.harvesterhci.io" denied the request: Internal error occurred: no route match found for DELETE /v1, Kind=Secret harvester-system/sh.helm.release.v1.harvester.v2]
mcc-harvester-crd                             0/1                       ErrApplied(1) [Cluster fleet-local/local: admission webhook "validator.harvesterhci.io" denied the request: Internal error occurred: no route match found for DELETE /v1, Kind=Secret harvester-system/sh.helm.release.v1.harvester-crd.v1]

問題を修正するために、以下のスクリプトを実行できます。

#!/bin/bash

patch_fleet_bundle() {
  local bundleName=$1
  local generation=$(kubectl get -n fleet-local bundle ${bundleName} -o jsonpath='{.spec.forceSyncGeneration}')
  local new_generation=$((generation+1))
  patch_manifest="$(mktemp)"
  cat > "$patch_manifest" <<EOF
{
  "spec": {
    "forceSyncGeneration": $new_generation
  }
}
EOF
  echo "patch bundle to new generation: $new_generation"
  kubectl patch -n fleet-local bundle ${bundleName}  --type=merge --patch-file $patch_manifest
  rm -f $patch_manifest
}

echo "removing harvester validating webhook"
kubectl delete validatingwebhookconfiguration harvester-validator

for bundle in mcc-harvester-crd mcc-harvester
do
  patch_fleet_bundle ${bundle}
done

echo "removing longhorn services"
kubectl delete svc longhorn-engine-manager -n longhorn-system --ignore-not-found=true
kubectl delete svc longhorn-replica-manager -n longhorn-system --ignore-not-found=true

3.アップグレードがSUSE® Rancher Prime: Continuous Deliveryの待機中で停止しています

v1.3.2からv1.4.0にアップグレードする際、アップグレードプロセスがSUSE® Rancher Prime: Continuous Deliveryの準備が整うのを待っている状態で停止する可能性があります。この問題は、SUSE Rancher Primeが再デプロイされる際の競合状態によって引き起こされます。

次の指標についてSUSE VirtualizationのログとSUSE® Rancher Prime: Continuous Deliveryの履歴を確認してください:

  • マニフェストポッドが`deployed`の状態で停止しています。

  • アップグレードは、デプロイされたチャートバージョンで保留中です。

例:

> kubectl logs -n harvester-system -l harvesterhci.io/upgradeComponent=manifest
wait helm release cattle-fleet-system fleet fleet-104.0.2+up0.10.2 0.10.2 deployed

> helm history -n cattle-fleet-system fleet
REVISION    UPDATED                     STATUS             CHART                    APP VERSION    DESCRIPTION
26          Tue Dec 10 03:09:13 2024    superseded         fleet-103.1.5+up0.9.5    0.9.5          Upgrade complete
27          Sun Dec 15 09:26:54 2024    superseded         fleet-103.1.5+up0.9.5    0.9.5          Upgrade complete
28          Sun Dec 15 09:27:03 2024    superseded         fleet-103.1.5+up0.9.5    0.9.5          Upgrade complete
29          Mon Dec 16 05:57:03 2024    deployed           fleet-103.1.5+up0.9.5    0.9.5          Upgrade complete
30          Mon Dec 16 05:57:13 2024    pending-upgrade    fleet-103.1.5+up0.9.5    0.9.5          Preparing upgrade

次のコマンドを実行して問題を修正できます。

helm rollback fleet -n cattle-fleet-system <last-deployed-revision>

4.「Dismiss it」ボタンがクリックされた後、アップグレードが予期せず再起動します。

Rancherを使用してSUSE Virtualizationをアップグレードすると、Rancher UIに「Dismiss it」とラベル付けされたボタンがあるダイアログが表示されます。このボタンをクリックすると、次の問題が発生する可能性があります:

  • status CRの`harvesterhci.io/v1beta1/upgrade`セクションがクリアされ、アップグレードに関するすべての重要な情報が失われます。

  • アップグレードプロセスが予期せず再起動します。

この問題は、Harvester UI Extensionのv1.0.2、v1.0.3、v1.0.4を使用しているRancher v2.10.xに影響します。すべてのSUSE Virtualization UIバージョンには影響しません。この問題は、Harvester UI Extension v1.0.5およびv1.5.0で修正されています。

この問題を回避するには、次のいずれかのアクションを実行してください:

  • アップグレードにはSUSE Virtualization UIを使用してください。SUSE Virtualization UIの「Dismiss it」ボタンをクリックしても、予期しない動作は発生しません。

  • Rancher UIのボタンをクリックする代わりに、クラスターに対して次のコマンドを実行してください:

    kubectl -n harvester-system label upgrades -l harvesterhci.io/latestUpgrade=true harvesterhci.io/read-message=true

関連する問題: #7791

5.移行可能なRWXボリュームを使用する仮想マシンが予期せず再起動します。

マイグレーション可能なRWXボリュームを使用する仮想マシンは、CSIプラグインポッドが再起動されると予期せず再起動します。この問題は、SUSE Virtualization v1.4.x、v1.5.0、およびv1.5.1に影響を与えます。

回避策は、アップグレードを開始する前に、SUSE Storage UI で設定 ボリュームが予期せず切り離されたときにワークロードポッドを自動的に削除する を無効にすることです。アップグレードが完了したら、再度設定を有効にする必要があります。

この問題は、SUSE Storage v1.8.3、v1.9.1、およびそれ以降のバージョンで修正されます。SUSE Virtualization v1.6.0 には SUSE Storage v1.9.1 が含まれます。

関連する問題: #8534 および #11158