agalue / opennms-drift-kubernetes

OpenNMS Drift Deployment in Kubernetes for testing and learning purposes
14 stars 6 forks source link

Sentinel never reaches Ready status #11

Open diogoideguchi opened 2 years ago

diogoideguchi commented 2 years ago

I was able to deploy the reduced setup in a K3S environment with some minor modifications (mainly by transforming the init scripts into configmaps and updating the images to 29.0.10). Core, minion and the databases presented no problems, but Sentinel keeps restarting and never reaches Ready status. Any idea on what could be wrong? Any way I can debug Sentinel to get more logs/evidences?

 kubectl get pod sentinel-0 -n opennms
NAME         READY   STATUS    RESTARTS   AGE
sentinel-0   0/1     Running   4          23m
$ kubectl logs sentinel-0 -n opennms
WARNING: Credentials can be exposed via docker inspect and log files. Please consider to use a keystore file.
         You can initialize a keystore file with the -s option.
[main] INFO org.opennms.features.scv.jceks.JCEKSSecureCredentialsVault - No existing keystore found at: scv.jce. Using empty keystore.
[main] INFO org.opennms.features.scv.jceks.JCEKSSecureCredentialsVault - Loading existing keystore from: scv.jce
Apply custom etc configuration from /opt/sentinel-etc-overlay.
No custom config found in /opt/sentinel-overlay. Use default configuration.
agalue commented 2 years ago

It would help if you inspected the pod with "kubectl describe" to see the reason for the failure. Depending on that, you can check the last logs of the container. Unfortunately, the container level logs are not as specific as karaf.log. For that, you need to dig inside the running container, which might be trickier if it fails.

It could also be that Sentinel now requires more time to start, and you should adjust the startup/readiness probes.

It's been a while since the last time I used that lab. Also, I never had time to update it to work correctly with Horizon 29 and newer, so another possible cause is that something changed, and the main manifests and init-scripts must be updated.