Skip to content

fix(vhd): retry NPD package holds on dpkg lock contention - #10202

Closed
Artur Khantimirov (r2k1) wants to merge 1 commit into
devfrom
r2k1-vhd-dpkg-lock-failure
Closed

Artur Khantimirov (r2k1) wants to merge 1 commit into
devfrom
r2k1-vhd-dpkg-lock-failure

Conversation

@r2k1

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: a9d29cbb225a411ee06fb107f47bab602867c770

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Uses the existing holdWALinuxAgent retry pattern; transient and exhausted-lock tests pass.
↓ Full install-helper suite needs Linux; VHD rerun not performed.
Diagnosis confidence 9.5/10 ↑ Build log shows the one-shot NPD hold failing on the dpkg frontend lock after a successful install.
↓ The competing process is not identified.
Evidence fit 9.5/10 ↑ The failed command directly precedes exit 9 and Packer cleanup in build 193348731.
↓ Retry recovery in that VHD job remains unverified.

What this PR does / why we need it:

Retry Ubuntu NPD package holds with the existing holdWALinuxAgent pattern (120 attempts, 5-second delay, 25-second per-attempt timeout). Recreate the selection input on each attempt. Keep errors visible and fail when retries are exhausted. Azure Linux behavior is unchanged.

Daily VHD build 193348731 failed in build2004cvmgen2containerd. Log 1707, lines 13257–13283, shows NPD installed successfully, then holdNPDPackage failed on the dpkg frontend lock and exited 9. The lock holder is unknown; the log already shows apt-daily services masked and timers disabled.

Validation:

  • shellspec --shell bash --format d --example 'NPD Ubuntu package hold lock contention' spec/vhdbuilder/packer/install_npd_spec.sh: both tests failed before the fix; both pass after it.
  • shellcheck -e SC2034 vhdbuilder/packer/install-npd.sh spec/vhdbuilder/packer/install_npd_spec.sh: passed; SC2034 is excluded by repository validation.
  • shellcheck --shell=sh -i SC3010,SC3014 vhdbuilder/packer/install-npd.sh spec/vhdbuilder/packer/install_npd_spec.sh: passed.
  • git diff --check: passed.
  • shellspec --shell bash --format d spec/vhdbuilder/packer/install_npd_spec.sh: failed on macOS with the same five baseline failures and one warning from protected /opt writes. Docker is unavailable. Linux validation and a VHD rerun are still needed.

Which issue(s) this PR fixes:

Triage ledger: linux-vhd-6a80cd8915. No GitHub issue.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   21 suites   1m 17s ⏱️
817 tests 817 ✅ 0 💤 0 ❌
844 runs  844 ✅ 0 💤 0 ❌

Results for commit a9d29cb.

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 27% ❌
parts_windows Package 1 74% ➖
staging_cse_windows Package 1 72% ➖
debug 0% ❌
provisioningscripts 2% ❌
Summary 40% (2077 / 7284) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 30% ❌
Summary 30% (5127 / 16918) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
github.com/Azure/agentbaker/aks-live-patching/pkg/status 100% ✔
github.com/Azure/agentbaker/apiserver 52% ❌
github.com/Azure/agentbaker/cmd 0% ❌
github.com/Azure/agentbaker/cmd/starter 0% ❌
github.com/Azure/agentbaker/fuzz/api 0% ❌
github.com/Azure/agentbaker/hotfix/render-nodecustomdata 35% ❌
github.com/Azure/agentbaker/pkg/agent 79% ➖
github.com/Azure/agentbaker/pkg/agent/datamodel 78% ➖
github.com/Azure/agentbaker/pkg/agent/toggles 0% ❌
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 87% ✔
github.com/Azure/agentbaker/aks-node-controller 73% ➖
github.com/Azure/agentbaker/aks-node-controller/common 100% ✔
github.com/Azure/agentbaker/aks-node-controller/helpers 68% ➖
github.com/Azure/agentbaker/aks-node-controller/parser 88% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/gpu 100% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/nodeconfigutils 91% ✔
github.com/Azure/agentbaker/aks-node-controller/utils 0% ❌
Summary 84% (6297 / 8227) ✔

@r2k1

Copy link
Copy Markdown
Contributor Author

Closing. A retry on the NPD hold fixes only 1 of 4 failed Packer attempts in build 193348731. A background apt-get races several apt calls after the reboot. A replacement PR will stop that process instead.

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.

1 participant