Skip to content

Commit ffd6d54

Browse files
committed
devconfig: fix firstconfig debian upgrade
Ansible apt module documentation [1] states the following for upgrade parameter: If yes or safe, performs an aptitude safe-upgrade. If full, performs an aptitude full-upgrade. If dist, performs an apt-get dist-upgrade. [1] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_ module.html However, a non-related upgrade parameter issue, outputs the following: TASK [devconfig : Debian-specific setup] included: /data4-xfs/gh/actions-runner/_work/kdevops/kdevops/playbooks/roles/devco nfig/tasks/install-deps/debian/main.yml for 3f52d93-xfs-reflink-4k TASK [devconfig : Upgrade Packages] fatal: [3f52d93-xfs-reflink-4k]: FAILED! => { "changed": false, "rc": 100 } MSG: '/usr/bin/apt-get dist-upgrade ' failed: E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1087 (apt) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? Replace full upgrade value with yes/safe to perform apt upgrade/apt-get upgrade. While fixing this, during firstconfig, also increase the lock_timeout from default 60s to 120s and retry 5 times the task or until success. Fixes: 3f52d93 Revert "bringup: devconfig: fix python3-apt debian issue" Signed-off-by: Daniel Gomez <[email protected]>
1 parent a3a300e commit ffd6d54

File tree

1 file changed

+6
-1
lines changed
  • playbooks/roles/devconfig/tasks/install-deps/debian

1 file changed

+6
-1
lines changed

playbooks/roles/devconfig/tasks/install-deps/debian/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
become: yes
44
become_method: sudo
55
ansible.builtin.apt:
6-
upgrade: full
6+
upgrade: "yes"
7+
lock_timeout: 120
8+
register: apt_upgrade
9+
until: apt_upgrade is success
10+
retries: 5
11+
delay: 60
712
tags: firstconfig
813

914
- name: Remove unattended-upgrades package

0 commit comments

Comments
 (0)