From 9b3866ff77f39397027517b874df380e0e43af63 Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Sun, 15 May 2016 12:57:27 -0500 Subject: Disable things which may lock /var/lib/dpkg/lock The ubuntu1604 verify job has been failing due to locking of /var/lib/dpkg/lock: https://lists.fd.io/pipermail/vpp-dev/2016-May/000992.html This appears to only happen with the first job run against a particular Jenkins slave, and upon using: https://gerrit.fd.io/r/#/c/1121/ to probe it, two candidates emerge: apt.systemd.daily and unattended-upgrades So this patch removes unattended-upgrades and stops/disables apt.systemd.daily via systemd Change-Id: Ic2bc9e4ec54ef1f2d0ab35813c4623a67a43f00a Signed-off-by: Ed Warnicke --- vagrant/lib/bootstrap-functions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'vagrant/lib') diff --git a/vagrant/lib/bootstrap-functions.sh b/vagrant/lib/bootstrap-functions.sh index 652160e06..499589fd8 100644 --- a/vagrant/lib/bootstrap-functions.sh +++ b/vagrant/lib/bootstrap-functions.sh @@ -153,6 +153,17 @@ deb_reup_certs() { update-ca-certificates -f } +deb_remove_pkgs() { + echo '---> Removing unattended-upgrades packge to avoid it locking /var/lib/dpkg/lock' + apt-get remove unattended-upgrades +} + +deb_disable_apt_systemd_daily() { + echo '---> Stopping and disabling apt.systemd.daily to avoid it locking /var/lib/dpkg/lock' + systemctl stop apt.systemd.daily + systemctl disable apt.systemd.daily +} + rh_clean_pkgs() { echo '---> Cleaning caches' yum clean all -q -- cgit 1.2.3-korg