Disable things which may lock /var/lib/dpkg/lock 28/1128/4
authorEd Warnicke <eaw@cisco.com>
Sun, 15 May 2016 17:57:27 +0000 (12:57 -0500)
committerEd Warnicke <eaw@cisco.com>
Mon, 16 May 2016 19:30:20 +0000 (14:30 -0500)
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 <eaw@cisco.com>
vagrant/basebuild/bootstrap.sh
vagrant/lib/bootstrap-functions.sh

index b3f5426..a0bcfb9 100644 (file)
@@ -25,6 +25,8 @@ then
     deb_sync_minor
     deb_correct_shell
     deb_install_pkgs
+    deb_remove_pkgs
+    deb_disable_apt_systemd_daily
     deb_flush
     deb_reup_certs
 
index 652160e..499589f 100644 (file)
@@ -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