diff options
author | James Falcon <james.falcon@canonical.com> | 2021-12-14 21:26:20 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 20:26:20 -0700 |
commit | 2bcf4fa972fde686c2e3141c58e640640b44dd00 (patch) | |
tree | 912a3188ea8323ba8de160af5b5f629335446776 /cloudinit/distros/debian.py | |
parent | 3da3bdae5e5b41bb3a9f6b23c8573c8fbc23e629 (diff) | |
download | vyos-cloud-init-2bcf4fa972fde686c2e3141c58e640640b44dd00.tar.gz vyos-cloud-init-2bcf4fa972fde686c2e3141c58e640640b44dd00.zip |
Include dpkg frontend lock in APT_LOCK_FILES (#1153)
Diffstat (limited to 'cloudinit/distros/debian.py')
-rw-r--r-- | cloudinit/distros/debian.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py index f3901470..b2af0866 100644 --- a/cloudinit/distros/debian.py +++ b/cloudinit/distros/debian.py @@ -43,10 +43,17 @@ NETWORK_FILE_HEADER = """\ NETWORK_CONF_FN = "/etc/network/interfaces.d/50-cloud-init" LOCALE_CONF_FN = "/etc/default/locale" +# The frontend lock needs to be acquired first followed by the order that +# apt uses. /var/lib/apt/lists is locked independently of that install chain, +# and only locked during update, so you can acquire it either order. +# Also update does not acquire the dpkg frontend lock. +# More context: +# https://github.com/canonical/cloud-init/pull/1034#issuecomment-986971376 APT_LOCK_FILES = [ + '/var/lib/dpkg/lock-frontend', '/var/lib/dpkg/lock', - '/var/lib/apt/lists/lock', '/var/cache/apt/archives/lock', + '/var/lib/apt/lists/lock', ] |