6 Troubleshooting Cloud Native Policy Charging and Rules Function

This section provides information to troubleshoot the common error which can be encountered during the installation and upgrade of Cloud Native Policy Charging and Rules Function.

If helm install Command Fails

This section covers the reasons and troubleshooting procedures if the helm install command fails.

Reasons for helm install failure:
  • Chart syntax issue [This issue could be shown in the few seconds]

    Please resolve the chart specific things and reinstall the helm install command, because in this case, no hooks should have begun.

  • Most possible reason [TIMEOUT]

    If any job stuck in a pending/error state and not able to execute, it will result in the timeout after 5 minutes. As default timeout for helm install is 5 minutes. In this case, follow the below troubleshooting steps to troubleshoot.

  • All pods/deployment/replicasets/statefulsets/services are up and running but ExternalIP for LoadBalancer type service is in <pending> state
    If ExternalIP is in the pending state for LoadBalancer type services, then helm install will fail and purge the charts with the following error
    helm install /home/cloud-user/occnpcrf/pcrf --name occnpcrf --namespace occnpcrf -f custom-values-cnpcrf.yaml --atomic
    
    INSTALL FAILED
    PURGING CHART
    Error: release occnpcrf failed: timed out waiting for the conditionSuccessfully purged a chart!
    Error: release occnpcrf failed: timed out waiting for the condition
    In this case, Don't use --atomic option while executing the helm install
  • Helm install failed in case of duplicated chart
    helm install <helm-chart> --name occnpcrf --namespace occnpcrf -f custom-values-cnpcrf.yaml
    Error: release occnpcrf failed: configmaps "perfinfo-config-occnpcrf" already exists
    Here, configmap 'perfinfo-config-occnpcrf' exists multiple times while creating kubernetes objects after pre-install hooks, the installation will fail. In this case also please go through the below troubleshooting steps.
    Troubleshooting Steps:
    1. Execute the below command to cleanup the databases created by the "helm install" command :
      
      DROP DATABASE IF EXISTS `pcrf`;
      DROP DATABASE IF EXISTS `ocpm_config_server`;
      DROP DATABASE IF EXISTS `pcrf_release`;
    2. Execute the below command to get kubernetes objects:
      kubectl get all -n <release_namespace>
      This gives a detailed overview of which objects are stuck or in a failed state.
    3. Execute the below command to delete all kubernetes objects:
      kubectl delete all --all -n <release_namespace>
    4. Execute the below command :
      helm ls --all
      If this is in a failed state, perform purging using the command
      helm delete --purge <release_name>

      Note:

      If the execution of this command is taking more time, run the below command parallelly in another session to clear all the delete jobs.
      while true; do kubectl delete jobs --all -n <release_namespace>; sleep 5;done
      Monitor the helm delete --purge <release_name> command. Once that is succeeded, press "ctrl+c" to stop the above script.