Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop more background process that might be holding any apt locks #2317

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andrewhop
Copy link
Contributor

Description of changes:

From the debian docs:

  • Used for downloads: /lib/systemd/system/apt-daily.timer
  • Used for upgrades: /lib/systemd/system/apt-daily-upgrade.timer
  • The purpose of unattended-upgrades is to keep the computer current with the latest security (and other) updates automatically

These instance are short lived (under an hour) and don't need any updates. But these background process cause issues when our test script attempts to install the AWS CLI:

+ apt-get -y remove needrestart
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1301 (python3)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Call-outs:

If this is not sufficient the next step is writing some code that polls the lock and waits for it's turn, I'm hoping these are the last process that might be holding the lock.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@andrewhop andrewhop requested a review from a team as a code owner April 7, 2025 22:29
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.74%. Comparing base (4924695) to head (683a832).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2317      +/-   ##
==========================================
+ Coverage   78.73%   78.74%   +0.01%     
==========================================
  Files         616      616              
  Lines      107589   107649      +60     
  Branches    15285    15302      +17     
==========================================
+ Hits        84712    84771      +59     
- Misses      22223    22224       +1     
  Partials      654      654              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants