5 Validating CNCC Core Configuration
A pre install hook named Validation-hook is introduced for validating M-CNCC Core and A-CNCC Core helm configurations.
Validation hook pod will be auto deleted if validation succeeds, in case of failure pod status shows as Error.
In case of Validation hook errors, refer log for the following listed error codes:
Table 5-1 Validation Hook Errors
Error Code | Error Message Format | Error Scenarios | Sample Error Messages |
---|---|---|---|
1002 | Duplicate value. Resource: <Configuration Name>, ID: <ID>, Attribute: <Attribute>. <More Info> |
|
Duplicate value(s). Resource: aCncc, ID: [Cluster3], Attribute: id. |
1003 | Invalid Reference. Resource: <Configuration Name>, ID: <ID>, Attribute: <Attribute>. <More Info> |
|
|
1001 | Invalid value. Resource: <Configuration Name>, ID: <ID>, Attribute: <Attribute>. <More Info> |
|
|
1004 | Missing value. Resource: <Configuration Name>, ID: <ID>, Attribute: <Attribute>. <More Info> |
|
|
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 Validationhook 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 Validationhook 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"
}