Data Gate pod fails to initialize

Data Gate pod fails to initialize with Init:CrashLoopBackOff state.

About this task

Starting from Data Gate 5.2 the target Db2 or Db2 Warehouse configuration changes are checked for invalid values.

Procedure

  1. Check whether the pod is initialized:
    oc get po | grep dg-
    dg-xx-data-gate-xx-xx         0/5     Init:CrashLoopBackOff   5 (94s ago)        4m25s
    
    Check the logs of the Db2 init container:
    oc logs dg-xx-data-gate-xx-xx  -c config-db2u
    If the logs show:
    Values in the datagate target cm configmap are invalid. Exiting.
    exit 1
    Check for which variable the value is invalid inside the logs. Example:
    ERROR: Invalid value for key 'DB2_STATISTICS': xxx
    
  2. You need to check the values entered in dg-{{ zenServiceInstanceId }}-target-db2-variables-cm config map and change the wrong value of the target Db2 or Db2 Warehouse:
    oc get cm | grep target-db2-variables
    dg-xxx-target-db2-variables-cm            1      xxd
    oc edit cm dg-xxx-target-db2-variables-cm
    
    Change the value of the variable mentioned in step 1. After you apply the change, save the config map dg-{{ zenServiceInstanceId }}-target-db2-variables-cm and restart the Data Gate pod.
  3. If the problem persists, and you are sure that the values you entered in the dg-{{ zenServiceInstanceId }}-target-db2-variables-cm are correct, you can disable the validation of the target Db2 or Db2 Warehouse configuration variables. Edit the dg-{{ zenServiceInstanceId }}-target-db2-variables-cm:
    oc get cm | grep target-db2-variables
    dg-xxx-target-db2-variables-cm            1      xxd
    oc edit cm dg-xxx-target-db2-variables-cm 
    
    Change the db2_check_values: true to false:
    db2_check_values: "false" 
    Save the config map and restart the Data Gate pod.
  4. Check whether the Data Gate pod has applied successfully the target Db2 or Db2 Warehouse configuration variables by inspecting the logs of the datagate db2 init container:
    oc get po | grep dg-
    dg-xx-data-gate-xx-xx        5/5     Running                 0                  5m
    oc logs dg-xx-data-gate-xx-xx  -c config-db2u