GlusterFS node status shows as peer rejected
GlusterFS node status might show as "Peer Rejected".
Note: If multiple nodes are in a "Peer Rejected" state, you might not be able to recover the GlusterFS nodes. You might need to set up the GlusterFS cluster again.
Resolving the problem
-
Ensure that
kubectlCLI is set up. See Accessing your cluster from the Kubernetes CLI (kubectl). -
Verify the status of GlusterFS pods.
kubectl -n kube-system get pods -o wide | grep glusterThe output resembles the following code:
glusterfs-l95bp 1/1 Running 3 6d 192.168.0.184 worker-2 glusterfs-n85vr 1/1 Running 0 4d 192.168.0.56 worker-1 glusterfs-p66jq 1/1 Running 3 6d 192.168.0.96 worker-3 -
Check the peer status from any GlusterFS pod.
kubectl -n kube-system exec <pod name> -- gluster peer statusFollowing is an example command and output:
kubectl -n kube-system exec glusterfs-l95bp -- gluster peer status Number of Peers: 2 Hostname: 192.168.0.96 Uuid: 3e518a43-b59f-45e7-a62c-5b213e0fece8 State: Peer in Cluster (Connected) Other names: 192.168.0.96 Hostname: worker-1 Uuid: c2a81937-e94f-4a22-86e7-bc9c8929c2d3 State: Peer Rejected (Connected)If you see a "Peer Rejected" status, it implies that the volume configuration on that peer is out of sync with the rest of the cluster.
To synchronize with the GlusterFS cluster, complete these steps on the GlusterFS node that is in "Peer Rejected" state:
-
Access the shell inside the GlusterFS pod:
kubectl -n kube-system exec -it <pod name> bash -
Change to the
/var/lib/glusterddirectory.cd /var/lib/glusterdThe folder might contain the following files and folders:
. .. bitd geo-replication glusterd.info glusterfind glustershd groups hooks nfs options peers quotad scrub snaps ss_brick vols -
Delete everything except
glusterd.info, which is the universally unique identifier (UUID) file. -
Restart the Gluster daemon.
service glusterd restart -
Probe a peer that is not in a "Peer Rejected" state.
gluster peer probe <node name> -
Check the peer status.
gluster peer status
Note: You might need to repeat the steps until you no longer see the "Peer Rejected" status.