Set the reexamine Value
This example shows you how to set the reexamine
value for a replicated TimesTenClassic object. The example also illustrates the action the TimesTen Operator takes after the reexamine
value has been changed.
- Set the
reexamine
value. The value must be different than the current value for the TimesTenClassic object. When the TimesTen Operator examines this value and notices it has changed since the last iteration, it takes appropriate action.Use the
kubectl
edit
command to edit the TimesTenClassic object.-
If there is a line for
reexamine
in the file, then modify its value. It must be different than the current value. -
If there is no line for
reexamine
in the file, then add a line and specify a value.
In this example, there is no
reexamine
line. This example adds thereexamine
line and sets the value forreexamine
toApril22reexamine1
(represented in bold).Note: Not all output is shown.
% kubectl edit timestenclassic sample # Please edit the object below. Lines beginning with a '#' will be ignored, # and an empty file will abort the edit. If an error occurs while saving this # file will be reopened with the relevant failures. # apiVersion: timesten.oracle.com/v4 kind: TimesTenClassic metadata: ... name: sample namespace: mynamespace ... repCreateStatement: | create active standby pair "{{tt-name}}" on "{{tt-node-0}}", "{{tt-name}}" on "{{tt-node-1}}" RETURN TWOSAFE store "{{tt-name}}" on "{{tt-node-0}}" PORT {{tt-rep-port}} FAILTHRESHOLD 0 TIMEOUT 999 store "{{tt-name}}" on "{{tt-node-1}}" PORT {{tt-rep-port}} FAILTHRESHOLD 0 TIMEOUT 999 spec: ttspec: bothDownBehavior: Best dbConfigMap: - sample image: container-registry.oracle.com/timesten/timesten:22.1.1.34.0 imagePullSecret: sekret storageClassName: oci-bv storageSize: 250Gi reexamine: April22reexamine1 ... timestenclassic.timesten.oracle.com/sample edited
-
- Use the
kubectl
get
command to assess the state of thesample
TimesTenClassic object. Observe how the state changes as you issue multiplekubectl
get
commands. Also note that the Operator has successfully configuredsample
-1
to be the active.% kubectl get ttc sample NAME STATE ACTIVE AGE sample Reexamine None 68m % kubectl get ttc sample NAME STATE ACTIVE AGE sample ConfiguringActive None 68m % kubectl get ttc sample NAME STATE ACTIVE AGE sample StandbyDown sample-1 68m % kubectl get ttc sample NAME STATE ACTIVE AGE sample Normal sample-1 71m
- Use the
kubectl
describe
command to further review the actions of the Operator (represented in bold).Not all output is shown:
% kubectl describe ttc sample Name: sample Namespace: mynamespace ... Kind: TimesTenClassic ... Rep Create Statement: create active standby pair "{{tt-name}}" on "{{tt-node-0}}", "{{tt-name}}" on "{{tt-node-1}}" RETURN TWOSAFE store "{{tt-name}}" on "{{tt-node-0}}" PORT {{tt-rep-port}} FAILTHRESHOLD 0 TIMEOUT 999 store "{{tt-name}}" on "{{tt-node-1}}" PORT {{tt-rep-port}} FAILTHRESHOLD 0 TIMEOUT 999 Spec: Ttspec: Both Down Behavior: Best Db Config Map: sample Image: container-registry.oracle.com/timesten/timesten:22.1.1.34.0 Image Pull Policy: Always Image Pull Secret: sekret Reexamine: April22reexamine1 Stop Managing: April21Stop1 Storage Class Name: oci-bv Storage Size: 250Gi Status: Classic Upgrade Status: Active Start Time: 0 Active Status: Image Update Pending: false Last Upgrade State Switch: 0 Prev Reset Upgrade State: Prev Upgrade State: Standby Start Time: 0 Standby Status: Upgrade Start Time: 0 Upgrade State: Active Pods: sample-1 High Level State: Normal Last Event: 54 Last High Level State Switch: 1619230912 Pod Status: Cache Status: Cache Agent: Not Running Cache UID Pwd Set: true N Cache Groups: 0 Db Status: Db: Loaded Db Id: 475 Db Updatable: No Initialized: true Last High Level State Switch: ? Pod Status: Agent: Up Last Time Reachable: 1619231126 Pod IP: 10.244.7.89 Pod Phase: Running Prev High Level State: Healthy Prev Image: Replication Status: Last Time Rep State Changed: 0 Rep Agent: Running Rep Peer P State: start Rep Scheme: Exists Rep State: STANDBY Times Ten Status: Daemon: Up Instance: Exists Release: 22.1.1.34.0 Admin User File: false Cache User File: false Cg File: false Disable Return: false High Level State: Healthy Intended State: Standby Local Commit: false Name: sample-0 Schema File: false Using Twosafe: false Cache Status: Cache Agent: Not Running Cache UID Pwd Set: true N Cache Groups: 0 Db Status: Db: Loaded Db Id: 476 Db Updatable: Yes Initialized: true Last High Level State Switch: ? Pod Status: Agent: Up Last Time Reachable: 1619231126 Pod IP: 10.244.6.149 Pod Phase: Running Prev High Level State: Healthy Prev Image: Replication Status: Last Time Rep State Changed: 1619228670 Rep Agent: Running Rep Peer P State: start Rep Scheme: Exists Rep State: ACTIVE Times Ten Status: Daemon: Up Instance: Exists Release: 22.1.1.34.0 Admin User File: false Cache User File: false Cg File: false Disable Return: false High Level State: Healthy Intended State: Active Local Commit: false Name: sample-1 Schema File: false Using Twosafe: false Prev High Level State: StandbyDown Prev Reexamine: April22reexamine1 Prev Stop Managing: April21Stop1 Rep Create Statement: create active standby pair "sample" on "sample-0.sample.mynamespace.svc.cluster.local", "sample" on "sample-1.sample.mynamespace.svc.cluster.local" NO RETURN store "sample" on "sample-0.sample.mynamespace.svc.cluster.local" PORT 4444 FAILTHRESHOLD 0 store "sample" on "sample-1.sample.mynamespace.svc.cluster.local" PORT 4444 FAILTHRESHOLD 0 Rep Port: 4444 Status Version: 1.0 Events: Type Reason Age From Message ---- ------ ---- ---- ------- - StateChange 58m ttclassic TimesTenClassic was Normal, now ManualInterventionRequired - StateChange 46m ttclassic Pod sample-0 Daemon Down - StateChange 41m ttclassic Pod sample-1 Daemon Down - StateChange 41m ttclassic Pod sample-1 Daemon Up - StateChange 41m ttclassic Pod sample-1 Database Unloaded - StateChange 40m ttclassic Pod sample-1 Database Loaded - StateChange 40m ttclassic Pod sample-1 RepState IDLE - StateChange 40m ttclassic Pod sample-1 RepAgent Not Running - StateChange 17m ttclassic Pod sample-1 Database Updatable - StateChange 17m ttclassic Pod sample-1 RepScheme None - StateChange 4m21s ttclassic TimesTenClassic was ManualInterventionRequired, now Reexamine - Error 4m16s ttclassic Active error: Daemon Down - StateChange 4m16s ttclassic TimesTenClassic was Reexamine, now ConfiguringActive - StateChange 4m10s ttclassic Pod sample-1 RepState ACTIVE - StateChange 4m10s ttclassic Pod sample-1 RepScheme Exists - StateChange 4m10s ttclassic Pod sample-1 RepAgent Running - StateChange 4m8s ttclassic TimesTenClassic was ConfiguringActive, now StandbyDown - StateChange 4m3s ttclassic Pod sample-0 Daemon Up - StateChange 4m3s ttclassic Pod sample-0 Database Unloaded - StateChange 3m56s ttclassic Pod sample-0 Database None - StateChange 3m42s ttclassic Pod sample-0 Database Loaded - StateChange 3m42s ttclassic Pod sample-0 Database Not Updatable - StateChange 3m42s ttclassic Pod sample-0 RepAgent Not Running - StateChange 3m42s ttclassic Pod sample-0 RepState IDLE - StateChange 3m36s ttclassic Pod sample-0 RepAgent Running - StateChange 3m36s ttclassic Pod sample-0 RepState STANDBY - StateChange 3m36s ttclassic TimesTenClassic was StandbyDown, now Normal
- Use the
kubectl
exec
-it
command to invoke the shell within thesample-1
Pod that contains the TimesTen database. Then, verify you can connect to the active database.% kubectl exec -it sample-1 -c tt -- /bin/bash $ ttIsql sample Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=sample"; Connection successful: DSN=sample;UID=timesten;DataStore=/tt/home/timesten/datastore/sample; DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=AL32UTF8;AutoCreate=0;PermSize=200;DDLReplicationLevel=3;ForceDisconnectEnabled=1; (Default setting AutoCommit=1) Command> call ttRepStateGet; < ACTIVE > 1 row found.
- Use the
kubectl
exec
-it
command to invoke the shell within thesample-0
Pod that contains the TimesTen database. Then, verify you can connect to the standby database.% kubectl exec -it sample-0 -c tt -- /bin/bash % ttIsql sample Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=sample"; Connection successful: DSN=sample;UID=timesten;DataStore=/tt/home/timesten/datastore/sample; DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=AL32UTF8;AutoCreate=0; PermSize=200;DDLReplicationLevel=3;ForceDisconnectEnabled=1; (Default setting AutoCommit=1) Command> call ttRepStateGet; < STANDBY > 1 row found.
The TimesTen Operator is now managing and monitoring your TimesTenClassic object. The TimesTenClassic object is in the Normal
state. Both databases are up and running and ready for use.