- Kubernetes Operator User's Guide
- Use Helm to Deploy the TimesTen Kubernetes Operator and TimesTenClassic Objects
- Roll Back a TimesTen Upgrade
Roll Back a TimesTen Upgrade
You can use Helm to roll back a TimesTen upgrade. This reverts the TimesTenClassic object and its associated active standby pair of TimesTen Classic databases to the initial release.
Let's assume you upgraded TimesTen as discussed in Upgrade TimesTen. However, you now want to roll back the upgrade. Here's how to perform the rollback using Helm.
This example downgrades from TimesTen release 22.1.1.20.0
to 22.1.1.19.0
. For more information about TimesTen releases, see Overview of release numbers in the Oracle TimesTen In-Memory Database Installation, Migration, and Upgrade Guide.
Note:
Ensure you perform a downgrade at the appropriate time. We recommend that you do not perform a downgrade at the busiest time of a production day. Applications see shortages and perhaps reduced performance as a result of the downgrade procedure.- Review the current release of the
ttclassic
chart that is deployed in your namespace.helm list
Output.
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
The
samplettc
release that is deployed is revision2
. Thettclassic
chartversion
is2211200.1.0
corresponding to the22.1.1.20.0
TimesTen release. - Review the
ttclassic
chart's revision history.helm history samplettc
Output.
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
Revision
2
of thesamplettc
ttclassic
chart is currently deployed. Thettclassic
chartversion
for revision1
is2211190.1.0
corresponding to TimesTen release22.1.1.19.0
. - Roll back to revision
1
.helm rollback samplettc 1
Output.
Rollback was a success! Happy Helming!
- Review the revision history.
helm history samplettc
Output.
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
Revision
3
of thesamplettc
release is now deployed in your namespace. Thettclassic
chart version is2211190.1
. The TimesTenClassic object is replaced, which triggers the TimesTen Operator to initiate an downgrade to TimesTen release22.1.1.19.0
. - Observe the downgrade.
kubectl describe ttc samplettc
Output.
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
- Confirm the TimesTenClassic object is in the
Normal
state.kubectl get ttc samplettc
Output.
NAME STATE ACTIVE AGE samplettc Normal samplettc-0 22h
The TimesTenClassic object is in the
Normal
state. Thesamplettc-0
is now the active. - Confirm the TimesTenClassic object is running the original image.
kubectl get ttc samplettc -o yaml | grep image
Output.
image: phx.ocir.io/youraccount/tt2211190image:1 imagePullPolicy: Always imagePullSecret: sekret imageUpdatePending: false
The TimesTenClassic object is running the new image.
- Confirm the
samplettc
release is downgraded.helm list
Output.
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
The
ttclassic
chartversion
is2211190.1.0
corresponding to the22.1.1.19.0
TimesTen release.