Skip to content

Commit

Permalink
Add a timeout for acquiring dpkg lock. (sonic-net#16328)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
In our Impacted Area Based PR testing, we noticed some failure beacuse of the error Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 5166 (dpkg). In this PR, we add a timeout for acquiring dpkg lock to avoid this issue.

How did you do it?
In this PR, we add a timeout for acquiring dpkg lock to avoid this issue.

How did you verify/test it?
  • Loading branch information
yutongzhang-microsoft authored Jan 7, 2025
1 parent 9ddbcf8 commit c7359b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
- script: |
set -x
sudo apt-get update && sudo apt-get install -y jq
sudo apt-get -o DPkg::Lock::Timeout=600 update && sudo apt-get -o DPkg::Lock::Timeout=600 -y install jq
TEST_SCRIPTS=$(echo '$(TEST_SCRIPTS)' | jq -r -c '."${{ parameters.TOPOLOGY }}"')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
pip install PyYAML
pip install natsort
sudo apt-get install -y jq
sudo apt-get -o DPkg::Lock::Timeout=600 -y install jq
FINAL_FEATURES=""
IFS=' ' read -ra FEATURES_LIST <<< "$(DIFF_FOLDERS)"
Expand Down

0 comments on commit c7359b3

Please sign in to comment.