Problem Note 69016: Consul pods fail to start in a SAS® Viya® environment
Your Consul pods fail to start if they fail to elect a cluster leader. You might see messages like the following in the logs of the pods:
2022/03/01 17:24:47 [WARN] raft: Election timeout reached, restarting election
2022/03/01 17:24:47 [INFO] raft: Node at IP-address:8300 [Candidate] entering Candidate state in term 17822
2022/03/01 17:24:52 [ERR] agent: failed to sync remote state: No cluster leader
The first step in recovering the Consul pods in this scenario is usually to scale the Consul StatefulSet down to zero replicas, then to just one replica, and finally back to the original three replicas. Take the following steps. Note: Replace Viya-namespace in each command below with the namespace where your SAS Viya environment is deployed:
- Scale the sas-consul-server StatefulSet to zero replicas with the following command:
kubectl -n Viya-namespace scale statefulset sas-consul-server –replicas=0
- Wait until all three Consul pods are terminated completely. To confirm that, run the following command and wait until it returns "condition met" messages:
kubectl -n Viya-namespace wait --for=delete pod sas-consul-server-{0..2}
- After you confirm that there are no Consul pods running, scale the sas-consul-server StatefulSet to just one replica with the following command:
kubectl –n Viya-namespace scale statefulset sas-consul-server –replicas=1
That should bring up a single sas-consul-server-0 pod.
- Wait for a few minutes and scale the sas-consul-server StatefulSet back to three replicas with the following command:
kubectl -n Viya-namespace scale statefulset sas-consul-server –replicas=3
That should bring up an additional two Consul pods, sas-consul-server-1 and sas-consul-server-2. When you run the following command, you should see three pods- sas-consul-server-0, sas-consul-server-1, and sas-consul-server-2:
kubectl -n Viya-namespace get pods -l app.kubernetes.io/name=sas-consul-server
- Check whether all three pods start successfully after a few minutes.
- If the pods still fail to start, there might be some additional manual steps required. Follow the steps from the Error When Consul Pods Move to Different Nodes section of the SAS® Viya® Administration guide. Make sure that you select the correct version of the guide that matches the cadence and version of your SAS Viya software.
If these steps do not help, contact SAS Technical Support with the following information and logs:
Operating System and Release Information
SAS System | SAS Viya | Linux for x64 | 2020.1 | | Viya | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2022-08-30 14:17:46 |
Date Created: | 2022-03-21 14:01:58 |