Host Convergence Failure Due to Inability to Acquire DPKG Frontend Lock

Problem

When a command or an application is updating the system, it locks the dpkg file (Debian package manager) to ensure that two processes don’t change the content at the same time thereby resulting into an unwarranted situation. When such a condition occurs, the service script in this case for pf9-kube fails to execute followed by a host convergence failure.

All Certs generated successfullyE: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? stderr=681 - pf9_app.py WARNING - Failed to set service pf9-kube to state True810 - session.py INFO - Converge failed

Environment

  • Platform9 Managed OpenStack - All Versions

  • Hostagent

Cause

We can see that an apt-get purge docker-ce process runs limiting the pf9-kube to acquire a lock on the docker installation procedure as a part of the pf9-kube script service execution.

pf9@worker01$ ps aux | grep -i aptroot 9270 0.0 2.0 125412 81368 pts/0 T 12:20 0:00 apt-get -y purge docker-cepf9 24231 0.0 0.0 14220 936 pts/2 S+ 12:54 0:00 grep --color=auto -i apt

Resolution

  1. Force kill the process with SIGKILL signal.

$ sudo kill -9 [process_id]
  1. On removal of the process, the pf9-kube service completes its execution and the host converges successfully.

007 - session.py INFO - --- Converging ---884 - amqp.py WARNING - Connection closed due to Not specified, retrying in 10 seconds885 - pf9_app.py INFO - Setting the desired service state885 - pf9_app.py INFO - Setting service state pf9-kube.3.11.0-7457. Command: sudo /etc/init.d/pf9-kube start768 - session.py INFO - Converge succeeded

Additional Information

Lock Error Fixarrow-up-right

Last updated