16.3.2. Lifecycle Agent を使用したイメージベースアップグレードの Upgrade ステージへの移行


シードイメージを生成し、Prep ステージを完了したら、ターゲットクラスターをアップグレードできます。アップグレードプロセス中に、OADP Operator は OADP カスタムリソース (CR) で指定されたアーティファクトのバックアップを作成し、その後、Lifecycle Agent がクラスターをアップグレードします。

アップグレードが失敗または停止した場合、Lifecycle Agent は自動的にロールバックを開始します。アップグレード後に問題が発生した場合は、手動でロールバックを実行できます。手動ロールバックの詳細は、「Lifecycle Agent を使用したイメージベースアップグレードの Rollback ステージへの移行」を参照してください。

前提条件

  • Prep ステージを完了した。

手順

  1. Upgrade ステージに移動するには、次のコマンドを実行して、ImageBasedUpgrade CR の stage フィールドの値を Upgrade に変更します。

    $ oc patch imagebasedupgrades.lca.openshift.io upgrade -p='{"spec": {"stage": "Upgrade"}}' --type=merge
  2. 次のコマンドを実行して、ImageBasedUpgrade CR のステータスを確認します。

    $ oc get ibu -o yaml

    以下の例は、進行中のアップグレードを示しています。

    status:
      conditions:
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: In progress
        observedGeneration: 5
        reason: InProgress
        status: "False"
        type: Idle
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: Prep completed
        observedGeneration: 5
        reason: Completed
        status: "False"
        type: PrepInProgress
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: Prep completed successfully
        observedGeneration: 5
        reason: Completed
        status: "True"
        type: PrepCompleted
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: |-
          Waiting for system to stabilize: one or more health checks failed
            - one or more ClusterOperators not yet ready: authentication
            - one or more MachineConfigPools not yet ready: master
            - one or more ClusterServiceVersions not yet ready: sriov-fec.v2.8.0
        observedGeneration: 1
        reason: InProgress
        status: "True"
        type: UpgradeInProgress
      observedGeneration: 1
      rollbackAvailabilityExpiration: "2024-05-19T14:01:52Z"
      validNextStages:
      - Rollback

    OADP Operator は、OADP Backup および Restore CR で指定されたデータのバックアップを作成し、ターゲットクラスターが再起動します。

  3. 次のコマンドを実行して、CR のステータスを監視します。

    $ oc get ibu -o yaml
  4. アップグレード後、以下のコマンドを実行して ImageBasedUpgrade CR の stage フィールドの値を Idle にパッチすることで変更を完了します。

    $ oc patch imagebasedupgrades.lca.openshift.io upgrade -p='{"spec": {"stage": "Idle"}}' --type=merge
    重要

    アップグレード後に Idle ステージに移行すると、変更をロールバックすることはできません。

    Lifecycle Agent は、アップグレードプロセス中に作成されたすべてのリソースを削除します。

  5. アップグレードが成功したら、OADP Operator とその設定ファイルを削除できます。詳細は、「クラスターからの Operator の削除」を参照してください。

検証

  1. 次のコマンドを実行して、ImageBasedUpgrade CR のステータスを確認します。

    $ oc get ibu -o yaml

    以下の例は、アップグレードが完了した状態を示しています。

    status:
      conditions:
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: In progress
        observedGeneration: 5
        reason: InProgress
        status: "False"
        type: Idle
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: Prep completed
        observedGeneration: 5
        reason: Completed
        status: "False"
        type: PrepInProgress
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: Prep completed successfully
        observedGeneration: 5
        reason: Completed
        status: "True"
        type: PrepCompleted
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: Upgrade completed
        observedGeneration: 1
        reason: Completed
        status: "False"
        type: UpgradeInProgress
      - lastTransitionTime: "2024-01-01T09:00:00Z"
        message: Upgrade completed
        observedGeneration: 1
        reason: Completed
        status: "True"
        type: UpgradeCompleted
      observedGeneration: 1
      rollbackAvailabilityExpiration: "2024-01-01T09:00:00Z"
      validNextStages:
      - Idle
      - Rollback
  2. 次のコマンドを実行して、クラスターの復元ステータスを確認します。

    $ oc get restores -n openshift-adp -o custom-columns=NAME:.metadata.name,Status:.status.phase,Reason:.status.failureReason

    以下の例は、復元が完了したケースを示しています。

    NAME             Status      Reason
    acm-klusterlet   Completed   <none>
    apache-app       Completed   <none>
    localvolume      Completed   <none>
    注記

    acm-klusterlet は RHACM 環境にのみ固有です。

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る