summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/cpick-11121fe4-systemd-make-cloud-final.service-run-before-apt-daily33
-rw-r--r--debian/patches/series1
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/cpick-11121fe4-systemd-make-cloud-final.service-run-before-apt-daily b/debian/patches/cpick-11121fe4-systemd-make-cloud-final.service-run-before-apt-daily
new file mode 100644
index 00000000..643a3e2a
--- /dev/null
+++ b/debian/patches/cpick-11121fe4-systemd-make-cloud-final.service-run-before-apt-daily
@@ -0,0 +1,33 @@
+From 11121fe4d5af0554140d88685029fa248fa0c7c9 Mon Sep 17 00:00:00 2001
+From: Scott Moser <smoser@brickies.net>
+Date: Mon, 12 Jun 2017 14:10:58 -0400
+Subject: [PATCH] systemd: make cloud-final.service run before apt daily
+ services.
+
+This changes all cloud-init systemd units to run 'Before' the apt processes
+that run daily and may cause a lock on the apt database.
+
+apt-daily-upgrade.service contains 'After=apt-daily.service'.
+Thus following order is enforced, so we can just be 'Before' the first.
+ apt-daily.service
+ apt-daily-upgrade.service
+
+Note that this means only that apt-daily* will not run until
+cloud-init has entirely finished. Any other processes running apt-get
+operations are still affected by the global lock.
+
+LP: #1693361
+---
+ systemd/cloud-final.service | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/systemd/cloud-final.service
++++ b/systemd/cloud-final.service
+@@ -2,6 +2,7 @@
+ Description=Execute cloud user/final scripts
+ After=network-online.target cloud-config.service rc-local.service multi-user.target
+ Wants=network-online.target cloud-config.service
++Before=apt-daily.service
+
+ [Service]
+ Type=oneshot
diff --git a/debian/patches/series b/debian/patches/series
index d4bc55be..941ab758 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ ds-identify-behavior-xenial.patch
cpick-003c6678-net-remove-systemd-link-file-writing-from-eni-renderer
cpick-1cd4323b-azure-remove-accidental-duplicate-line-in-merge
cpick-ebc9ecbc-Azure-Add-network-config-Refactor-net-layer-to-handle
+cpick-11121fe4-systemd-make-cloud-final.service-run-before-apt-daily