Service pf9-kube fails to start because of a corrupted sudoers file

Problem

The host is stuck in converging state, as service pf9-kube fails to start with the following errors seen in kube.log

[2019-09-24 06:21:43] Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.27/containers/json?filters=%7B%22name%22%3A%7B%22etcd%22%3Atrue%7D%7D: dial unix /var/run/docker.sock: connect: permission denied

Checking the sudo status for the pf9 group will give an error similar to

$ sudo groups pf9>>> /etc/sudoers: syntax error near line 2 <<<sudo: parse error in /etc/sudoers near line 2sudo: no valid sudoers sources found, quittingsudo: unable to initialize policy plugin

Environment

  • Platform9 Managed Kubernetes - All Versions

Cause

  • Syntax error or a typo in the sudoers file results in service pf9-kube not starting.

Resolution

  1. Login to the Node with the Root credentials.

  2. Use visudo to edit the sudoers file to resolve the error which is highlighted in the sudo groups pf9 output as shown above in the problem section.

Additional Information

  • If your Node was created without a default root account, refer to our articlearrow-up-right on how to login to rescue shell.

Last updated