Skip to content

CI: wait for the dpkg lock instead of removing it in setup-runner #791

Description

@hughcars

setup-runner's "Disable unattended upgrades" step rm -fs /var/lib/dpkg/lock*, which is racy (dpkg warns it's "always wrong") — unattended-upgrades can re-grab the lock before our apt-get install runs, failing the job (Could not get lock /var/lib/dpkg/lock-frontend ... held by pid …).

Fix: drop the lock-file removal and instead make apt wait for the lock:

echo 'DPkg::Lock::Timeout "300";' | sudo tee /etc/apt/apt.conf.d/99lock-timeout

(Keep disabling the apt-daily timers/services.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciRelated to continuous integration (CI) and/or GitHub Actions

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions