Monitor Deployment

Use the kubectl get and the kubectl describe commands to monitor the progress of the active standby pair as it is provisioned.

Note:

For the kubectl get timestenclassic and kubectl describe timestenclassic commands, you can alternatively specify kubectl get ttc and kubectl describe ttc respectively. timestenclassic and ttc are synonymous when used in these commands, and return the same results. The first kubectl get and the first kubectl describe examples in this appendix use timestenclassic. The remaining examples in this appendix use ttc for simplicity.

  1. Use the kubectl get command and review the STATE field. Observe the value is Initializing. The active standby pair provisioning has begun, but is not yet complete.
    % kubectl get timestenclassic sample
    NAME     STATE          ACTIVE   AGE
    sample   Initializing   None     11s
  2. Use the kubectl describe command to view the initial provisioning in detail.
    % kubectl describe timestenclassic sample
    Name:         sample
    Namespace:    mynamespace
    Labels:       <none>
    Annotations:  <none>
    API Version:  timesten.oracle.com/v1
    Kind:         TimesTenClassic
    Metadata:
      Creation Timestamp:  2021-05-31T15:35:12Z
      Generation:          1
      Resource Version:    20231755
      Self Link: 
    /apis/timesten.oracle.com/v1/namespaces/mynamespace/timestenclassics/sample
      UID:                 517a8646-a354-11ea-a9fb-0a580aed5e4a
    Spec:
      Ttspec:
        Db Config Map:
          sample
        Image:               container-registry.oracle.com/timesten/timesten:22.1.1.19.0
        Image Pull Policy:   Always
        Image Pull Secret:   sekret
        Storage Class Name:  oci-bv
        Storage Size:        250Gi
    Status:
      Active Pods:       None
      High Level State:  Initializing
      Last Event:        3
      Pod Status:
        Cache Status:
          Cache Agent:        Down
          Cache UID Pwd Set:  false
          N Cache Groups:     0
        Db Status:
          Db:            Unknown
          Db Id:         0
          Db Updatable:  Unknown
        Initialized:     true
        Pod Status:
          Agent:                Down
          Last Time Reachable:  0
          Pod IP:
          Pod Phase:            Pending
        Replication Status:
          Last Time Rep State Changed:  0
          Rep Agent:                    Down
          Rep Peer P State:             Unknown
          Rep Scheme:                   Unknown
          Rep State:                    Unknown
        Times Ten Status:
          Daemon:          Down
          Instance:        Unknown
          Release:         Unknown
        Admin User File:   false
        Cache User File:   false
        Cg File:           false
        High Level State:  Down
        Intended State:    Active
        Name:              sample-0
        Schema File:       false
        Cache Status:
          Cache Agent:        Down
          Cache UID Pwd Set:  false
          N Cache Groups:     0
        Db Status:
          Db:            Unknown
          Db Id:         0
          Db Updatable:  Unknown
        Initialized:     true
        Pod Status:
          Agent:                Down
          Last Time Reachable:  0
          Pod IP:
          Pod Phase:            Pending
        Replication Status:
          Last Time Rep State Changed:  0
          Rep Agent:                    Down
          Rep Peer P State:             Unknown
          Rep Scheme:                   Unknown
          Rep State:                    Unknown
        Times Ten Status:
          Daemon:            Down
          Instance:          Unknown
          Release:           Unknown
        Admin User File:     false
        Cache User File:     false
        Cg File:             false
        High Level State:    Unknown
        Intended State:      Standby
        Name:                sample-1
        Schema File:         false
      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
      ----  ------  ----  ----       -------
      -     Create  50s   ttclassic  Secret tt517a8646-a354-11ea-a9fb-0a580aed5e4a created
      -     Create  50s   ttclassic  Service sample created
      -     Create  50s   ttclassic  StatefulSet sample created
  3. Use the kubectl get command again to see if value of the STATE field has changed. In this example, the value is Normal, indicating the active standby pair of databases are now provisioned and the process is complete.
    % kubectl get ttc sample
    NAME     STATE    ACTIVE     AGE
    sample   Normal   sample-0   3m5s
  4. Use the kubectl describe command again to view the active standby pair provisioning in detail.

    Note: In this example, the now Normal line displays on its own line. In the actual output, this line does not display as its own line, but at the end of the StateChange previous line.

    % kubectl describe ttc sample
    Name:         sample
    Namespace:    mynamespace
    Labels:       <none>
    Annotations:  <none>
    API Version:  timesten.oracle.com/v1
    Kind:         TimesTenClassic
    Metadata:
      Creation Timestamp:  2021-05-31T15:35:12Z
      Generation:          1
      Resource Version:    20232668
      Self Link:
    /apis/timesten.oracle.com/v1/namespaces/mynamespace/timestenclassics/sample 
      UID:                 517a8646-a354-11ea-a9fb-0a580aed5e4a
    Spec:
      Ttspec:
        Db Config Map:
          sample
        Image:               container-registry.oracle.com/timesten/timesten:22.1.1.19.0
        Image Pull Policy:   Always
        Image Pull Secret:   sekret
        Storage Class Name:  oci-bv
        Storage Size:        250Gi
    Status:
      Active Pods:       sample-0
      High Level State:  Normal
      Last Event:        35
      Pod Status:
        Cache Status:
          Cache Agent:        Not Running
          Cache UID Pwd Set:  true
          N Cache Groups:     0
        Db Status:
          Db:            Loaded
          Db Id:         26
          Db Updatable:  Yes
        Initialized:     true
        Pod Status:
          Agent:                Up
          Last Time Reachable:  1590939597
          Pod IP:               192.0.2.1
          Pod Phase:            Running
        Replication Status:
          Last Time Rep State Changed:  0
          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.19.0
        Admin User File:   true
        Cache User File:   false
        Cg File:           false
        High Level State:  Healthy
        Intended State:    Active
        Name:              sample-0
        Schema File:       true
        Cache Status:
          Cache Agent:        Not Running
          Cache UID Pwd Set:  true
          N Cache Groups:     0
        Db Status:
          Db:            Loaded
          Db Id:         26
          Db Updatable:  No
        Initialized:     true
        Pod Status:
          Agent:                Up
          Last Time Reachable:  1590939597
          Pod IP:               192.0.2.2
          Pod Phase:            Running
        Replication Status:
          Last Time Rep State Changed:  1590939496
          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.19.0
        Admin User File:     true
        Cache User File:     false
        Cg File:             false
        High Level State:    Healthy
        Intended State:      Standby
        Name:                sample-1
        Schema File:         true
      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
      ----  ------       ----   ----       -------
      -     Create       4m43s  ttclassic  Secret tt517a8646-a354-11ea-a9fb-0a580aed5e4a created
      -     Create       4m43s  ttclassic  Service sample created
      -     Create       4m43s  ttclassic  StatefulSet sample created
      -     StateChange  3m47s  ttclassic  Pod sample-0 Daemon Unknown
      -     StateChange  3m47s  ttclassic  Pod sample-0 CacheAgent Unknown
      -     StateChange  3m47s  ttclassic  Pod sample-0 RepAgent Unknown
      -     StateChange  3m47s  ttclassic  Pod sample-1 Daemon Unknown
      -     StateChange  3m47s  ttclassic  Pod sample-1 CacheAgent Unknown
      -     StateChange  3m47s  ttclassic  Pod sample-1 RepAgent Unknown
      -     StateChange  3m26s  ttclassic  Pod sample-0 Agent Up
      -     StateChange  3m26s  ttclassic  Pod sample-0 Release 22.1.1.19.0
      -     StateChange  3m26s  ttclassic  Pod sample-0 Daemon Down
      -     StateChange  3m26s  ttclassic  Pod sample-1 Agent Up
      -     StateChange  3m26s  ttclassic  Pod sample-1 Release 22.1.1.19.0
      -     StateChange  3m26s  ttclassic  Pod sample-1 Daemon Down
      -     StateChange  3m26s  ttclassic  Pod sample-0 Daemon Up
      -     StateChange  3m25s  ttclassic  Pod sample-1 Daemon Up
      -     StateChange  2m13s  ttclassic  Pod sample-0 RepState IDLE
      -     StateChange  2m13s  ttclassic  Pod sample-0 Database Updatable
      -     StateChange  2m13s  ttclassic  Pod sample-0 CacheAgent Not Running
      -     StateChange  2m13s  ttclassic  Pod sample-0 RepAgent Not Running
      -     StateChange  2m13s  ttclassic  Pod sample-0 RepScheme None
      -     StateChange  2m13s  ttclassic  Pod sample-0 Database Loaded
      -     StateChange  2m11s  ttclassic  Pod sample-0 RepAgent Running
      -     StateChange  2m10s  ttclassic  Pod sample-0 RepScheme Exists
      -     StateChange  2m10s  ttclassic  Pod sample-0 RepState ACTIVE
      -     StateChange  113s   ttclassic  Pod sample-1 Database Loaded
      -     StateChange  113s   ttclassic  Pod sample-1 Database Not Updatable
      -     StateChange  113s   ttclassic  Pod sample-1 CacheAgent Not Running
      -     StateChange  113s   ttclassic  Pod sample-1 RepAgent Not Running
      -     StateChange  113s   ttclassic  Pod sample-1 RepScheme Exists
      -     StateChange  113s   ttclassic  Pod sample-1 RepState IDLE
      -     StateChange  106s   ttclassic  Pod sample-1 RepAgent Running
      -     StateChange  101s   ttclassic  Pod sample-1 RepState STANDBY
      -     StateChange  101s   ttclassic  TimesTenClassic was Initializing, now Normal

Your active standby pair of TimesTen databases are successfully deployed (as indicated by Normal.) There are two TimesTen databases, configured as an active standby pair. One database is active. (In this example, sample-0 is the active database, as indicated by Rep State ACTIVE). The other database is standby. (In this example, sample-1 is the standby database as indicated by Rep State STANDBY). The active database can be modified and queried. Changes made on the active database are replicated to the standby database. If the active database fails, the Operator automatically promotes the standby database to be the active. The formerly active database will be repaired or replaced, and will then become the standby.