C.1.1 Validation-hook Microservices and Logs

Validation-hook Microservice for M-CNCC Core

This section explains about Validation-hook Microservice for M-CNCC Core and A-CNCC Core.


NAME                                          READY   STATUS  RESTARTS   AGE
cncc-mcore-ingress-gateway-pre-install-rfpjq   0/1 Completed   0        40s
cncc-mcore-validation-hook-zt78c               0/1 Completed   0        24s

Validation-hook Logs

In case of validation-hook error, check logs for the error details.


NAME                                          READY   STATUS  RESTARTS   AGE
cncc-mcore-validation-hook-zt78c               0/1     Error      0   24s

Example:

kubectl logs -f cncc-mcore-validation-hook-zt78c -n cncc

Sample Validation-hook Logs

{
   "instant":{
      "epochSecond":1628155229,
      "nanoOfSecond":4094479
   },
   "thread":"main",
   "level":"ERROR",
   "loggerName":"com.oracle.cgbu.cne.cncc.core.Multi-ClusterConfigValidation",
   "message":"{\"type\":null,\"title\":\"Bad Request\",\"status\":400,\"detail\":\"[{\\\"type\\\":null,\\\"title\\\":\\\"Validation Error\\\",\\\"status\\\":1001,\\\"detail\\\":\\\"Invalid value. Resource: instance, ID: Cluster1-grafana, Attribute: N/A. Both ip and fqdn cannot be provided.\\\",\\\"instance\\\":null,\\\"cause\\\":null},{\\\"type\\\":null,\\\"title\\\":\\\"Validation Error\\\",\\\"status\\\":1001,\\\"detail\\\":\\\"Invalid value. Resource: instance, ID: Cluster3-policy-instance, Attribute: Port. It should be numeric value.\\\",\\\"instance\\\":null,\\\"cause\\\":null},{\\\"type\\\":null,\\\"title\\\":\\\"Validation Error\\\",\\\"status\\\":1004,\\\"detail\\\":\\\"Missing value. Resource: Instance, ID: Cluster3-grafana, Attribute: apiPrefix. \\\",\\\"instance\\\":null,\\\"cause\\\":null}]\",\"instance\":null,\"cause\":null}",
   "endOfBatch":false,
   "loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger",
   "contextMap":{
       
   },
   "threadId":1,
   "threadPriority":5,
   "messageTimestamp":"2021-08-05T09:20:29.004+0000",
   "application":"cncc",
   "engineering_version":"1.8.0",
   "marketing_version":"1.0.0",
   "microservice":"cncc-mcore-validation-hook",
   "cluster":"cncc-mcore",
   "namespace":"cncc",
   "node":"master",
   "pod":"cncc-mcore-validation-hook-zt78c"
}

Validation-hook Microservice for A-CNCC Core


NAME                                          READY   STATUS  RESTARTS   AGE
cncc-acore-ingress-gateway-pre-install-rfpjq   0/1 Completed   0        40s
cncc-acore-validation-hook-zt78c               0/1 Completed   0        24s

Validation-hook Logs

In case of validation-hook error, check logs for the error details.


NAME                                          READY   STATUS  RESTARTS   AGE
cncc-acore-validation-hook-zt78c               0/1     Error      0   24s

Example:

kubectl logs -f cncc-acore-validation-hook-zt78c -n cncc

Sample Validation-hook Logs

{
   "instant":{
      "epochSecond":1628155569,
      "nanoOfSecond":4076479
   },
   "thread":"main",
   "level":"ERROR",
   "loggerName":"com.oracle.cgbu.cne.cncc.core.Multi-ClusterConfigValidation",
   "message":"{\"type\":null,\"title\":\"Bad Request\",\"status\":400,\"detail\":\"[{\\\"type\\\":null,\\\"title\\\":\\\"Validation Error\\\",\\\"status\\\":1001,\\\"detail\\\":\\\"Invalid value. Resource: instance, ID: Cluster1-grafana, Attribute: N/A. Both ip and fqdn cannot be provided.\\\",\\\"instance\\\":null,\\\"cause\\\":null},{\\\"type\\\":null,\\\"title\\\":\\\"Validation Error\\\",\\\"status\\\":1001,\\\"detail\\\":\\\"Invalid value. Resource: instance, ID: Cluster3-policy-instance, Attribute: Port. It should be numeric value.\\\",\\\"instance\\\":null,\\\"cause\\\":null},{\\\"type\\\":null,\\\"title\\\":\\\"Validation Error\\\",\\\"status\\\":1004,\\\"detail\\\":\\\"Missing value. Resource: Instance, ID: Cluster3-grafana, Attribute: apiPrefix. \\\",\\\"instance\\\":null,\\\"cause\\\":null}]\",\"instance\":null,\"cause\":null}",
   "endOfBatch":false,
   "loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger",
   "contextMap":{
       
   },
   "threadId":1,
   "threadPriority":5,
   "messageTimestamp":"2021-08-05T09:20:29.004+0000",
   "application":"cncc",
   "engineering_version":"1.8.0",
   "marketing_version":"1.0.0",
   "microservice":"cncc-acore-validation-hook",
   "cluster":"cncc-acore",
   "namespace":"cncc",
   "node":"master",
   "pod":"cncc-acore-validation-hook-zt78c"
}