- Kubernetesオペレータ・ユーザーズ・ガイド
- Helmを使用したTimesTen KubernetesオペレータおよびTimesTenClassicオブジェクトのデプロイ
- TimesTenのアップグレードのロールバック
TimesTenのアップグレードのロールバック
Helmを使用して、TimesTenのアップグレードをロールバックできます。これにより、TimesTenClassicオブジェクトとそれに関連付けられたTimesTen Classicデータベースのアクティブ・スタンバイ・ペアが初期リリースに戻されます。
「TimesTenのアップグレード」の説明に従って、TimesTenをアップグレードしたとします。ただし、今度はアップグレードをロールバックする必要があります。Helmを使用してロールバックを実行する方法を次に示します。
この例では、TimesTenリリース22.1.1.20.0
から22.1.1.19.0
にダウングレードします。TimesTenリリースの詳細は、『Oracle TimesTen In-Memory Databaseインストレーション、移行およびアップグレード・ガイド』のリリース番号の概要を参照してください。
ノート:
必ず、適切なタイミングでダウングレードを実行してください。本番の1日のうち最もビジーな時間にはダウングレードを実行しないことをお薦めします。ダウングレード手順の結果として、アプリケーションはリソース不足になり、パフォーマンスが低下する場合もあります。- ネームスペースにデプロイされている
ttclassic
チャートの現在のリリースを確認します。helm list
出力。
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION samplettc mynamespace 2 2023-10-24 19:55:45.303709067 +0000 UTC deployed ttclassic-2211200.1.0 22.1.1.20.0 samplettop mynamespace 2 2023-10-24 16:15:21.79683595 +0000 UTC deployed ttoperator-2211200.1.0 22.1.1.20.0 ttcrd mynamespace 2 2023-10-24 16:00:21.530832896 +0000 UTC deployed ttcrd-2211200.1.0 22.1.1.20.0
デプロイされる
samplettc
リリースは、リビジョン2
です。ttclassic
チャートのversion
は、22.1.1.20.0
TimesTenリリースに対応する2211200.1.0
です。 ttclassic
チャートのリビジョン履歴を確認します。helm history samplettc
出力。
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Mon Oct 23 23:18:03 2023 superseded ttclassic-2211190.1.0 22.1.1.19.0 Install complete 2 Tue Oct 24 19:55:45 2023 deployed ttclassic-2211200.1.0 22.1.1.20.0 Upgrade complete
samplettc
ttclassic
チャートのリビジョン2
は現在デプロイされています。リビジョン1
のttclassic
チャートのversion
は、TimesTenリリース22.1.1.19.0
に対応する2211190.1.0
です。- リビジョン
1
にロールバックします。helm rollback samplettc 1
出力。
Rollback was a success! Happy Helming!
- リビジョン履歴を確認します。
helm history samplettc
出力。
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Mon Oct 23 23:18:03 2023 superseded ttclassic-2211190.1.0 22.1.1.19.0 Install complete 2 Tue Oct 24 19:55:45 2023 superseded ttclassic-2211200.1.0 22.1.1.20.0 Upgrade complete 3 Tue Oct 24 21:31:06 2023 deployed ttclassic-2211190.1.0 22.1.1.19.0 Rollback to 1
samplettc
リリースのリビジョン3
がネームスペースにデプロイされました。ttclassic
チャートのバージョンは2211190.1
です。TimesTenClassicオブジェクトが置換され、TimesTenオペレータがトリガーされて、TimesTenリリース22.1.1.19.0
へのダウングレードが開始されます。 - ダウングレードを確認します。
kubectl describe ttc samplettc
出力。
Name: samplettc Namespace: mynamespace Labels: app.kubernetes.io/managed-by=Helm ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Upgrade 6m38s timesten Image updated, automatic upgrade started Normal Upgrade 6m38s timesten Deleted standby pod samplettc-0 during upgrade Normal Info 6m34s timesten Pod samplettc-0 Agent Down Normal StateChange 6m34s timesten Pod samplettc-0 is Not Ready Warning StateChange 6m34s timesten TimesTenClassic was Normal, now ActiveTakeover Normal StateChange 6m33s timesten TimesTenClassic was ActiveTakeover, now StandbyDown Normal Info 5m38s timesten Pod samplettc-0 Agent Up Normal Info 5m38s timesten Pod samplettc-0 Instance Exists Normal Info 5m38s timesten Pod samplettc-0 Daemon Down Normal Info 5m37s timesten Pod samplettc-0 Daemon Up Normal Info 5m37s timesten Pod samplettc-0 Database Unloaded Normal Info 5m35s timesten Pod samplettc-0 Database None DEBUG Info 5m32s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 597 secs DEBUG Info 5m29s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 594 secs DEBUG Info 5m26s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 591 secs DEBUG Info 5m23s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 588 secs DEBUG Info 5m20s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 585 secs Normal Info 5m16s timesten Pod samplettc-0 Database Loaded Normal Info 5m16s timesten Pod samplettc-0 RepAgent Not Running Normal Info 5m16s timesten Pod samplettc-0 RepScheme Exists Normal StateChange 5m16s timesten Pod samplettc-0 RepState IDLE Normal Info 5m11s timesten Pod samplettc-0 RepAgent Running Normal StateChange 5m11s timesten Pod samplettc-0 RepState STANDBY Normal StateChange 5m11s timesten Pod samplettc-0 is Ready Normal Upgrade 5m10s timesten Upgrade of standby complete Normal StateChange 5m10s timesten TimesTenClassic was StandbyDown, now Normal Normal Upgrade 4m39s timesten Deleted active pod samplettc-1 during upgrade Normal Info 3m38s timesten Pod samplettc-1 Agent Down Normal StateChange 3m38s timesten Pod samplettc-1 is Not Ready Normal StateChange 3m38s timesten Pod samplettc-1 is Not Active Ready Warning StateChange 3m38s timesten TimesTenClassic was Normal, now ActiveDown Normal Info 3m37s timesten Pod samplettc-0 Database Updatable Normal StateChange 3m37s timesten Pod samplettc-0 RepState ACTIVE Normal StateChange 3m37s timesten Pod samplettc-0 is Not Ready Normal StateChange 3m37s timesten TimesTenClassic was ActiveDown, now ActiveTakeover Normal StateChange 3m36s timesten Pod samplettc-0 is Ready Normal StateChange 3m36s timesten Pod samplettc-0 is Active Ready Normal StateChange 3m36s timesten TimesTenClassic was ActiveTakeover, now StandbyDown Normal Info 3m33s timesten Pod samplettc-1 Agent Up Normal Info 3m33s timesten Pod samplettc-1 Instance Exists Normal Info 3m33s timesten Pod samplettc-1 Daemon Down Normal Info 3m33s timesten Pod samplettc-1 Daemon Up Normal Info 3m33s timesten Pod samplettc-1 Database Unloaded Normal Info 3m31s timesten Pod samplettc-1 Database None DEBUG Info 3m28s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 597 secs DEBUG Info 3m25s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 594 secs DEBUG Info 3m22s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 591 secs DEBUG Info 3m19s timesten pollAsyncStatus: Async polling for RepDuplicate, timeout in 588 secs Normal Info 3m15s timesten Pod samplettc-1 Database Loaded Normal Info 3m15s timesten Pod samplettc-1 RepAgent Not Running Normal Info 3m15s timesten Pod samplettc-1 RepScheme Exists Normal StateChange 3m15s timesten Pod samplettc-1 RepState IDLE Normal Info 3m10s timesten Pod samplettc-1 RepAgent Running Normal StateChange 3m10s timesten TimesTenClassic was StandbyDown, now StandbyStarting Normal StateChange 3m9s timesten TimesTenClassic was StandbyStarting, now StandbyCatchup Normal StateChange 2m31s timesten Pod samplettc-1 RepState STANDBY Normal Upgrade 2m30s timesten Upgrade completed in 248 secs Normal StateChange 2m30s timesten TimesTenClassic was StandbyCatchup, now Normal
- TimesTenClassicオブジェクトが
Normal
状態であることを確認します。kubectl get ttc samplettc
出力。
NAME STATE ACTIVE AGE samplettc Normal samplettc-0 22h
TimesTenClassicオブジェクトは
Normal
状態です。samplettc-0
がアクティブになりました。 - TimesTenClassicオブジェクトが元のイメージを実行していることを確認します。
kubectl get ttc samplettc -o yaml | grep image
出力。
image: phx.ocir.io/youraccount/tt2211190image:1 imagePullPolicy: Always imagePullSecret: sekret imageUpdatePending: false
TimesTenClassicオブジェクトは、新しいイメージを実行しています。
samplettc
リリースがダウングレードされていることを確認します。helm list
出力。
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION samplettc mynamespace 3 2023-10-24 21:31:06.866255824 +0000 UTC deployed ttclassic-2211190.1.0 22.1.1.19.0 samplettop mynamespace 2 2023-10-24 16:15:21.896107706 +0000 UTC deployed ttoperator-2211200.1.0 22.1.1.20.0 ttcrd mynamespace 2 2023-10-24 16:10:21.530832896 +0000 UTC deployed ttcrd-2211200.1.0 22.1.1.20.0
ttclassic
チャートのversion
は、22.1.1.19.0
TimesTenリリースに対応する2211190.1.0
です。