Skip to content

Fix upgrade and azure#532

Merged
elsegev merged 4 commits into
devfrom
fix-upgrade
May 20, 2026
Merged

Fix upgrade and azure#532
elsegev merged 4 commits into
devfrom
fix-upgrade

Conversation

@elsegev
Copy link
Copy Markdown
Collaborator

@elsegev elsegev commented May 19, 2026

No description provided.

elsegev added 2 commits May 19, 2026 09:27
Add `apt_update_resilient` and `apt_install_resilient` helper functions
that retry apt operations with list repair between attempts to handle
transient archive.ubuntu.com failures (e.g. truncated InRelease files,
"Splitting up into data and signature failed" errors).

Changes:
- Configure APT with retry settings and timeouts via /etc/apt/apt.conf.d
- Wrap apt-get update/install calls with retry logic and self-repair
- Add retry loop for Azure CLI installation from aka.ms
- Apply across db-with-agent, dra-admin modules with fallback to plain
  apt commands when helpers are unavailable
Add `ignore_healthcheck_checks = ["sonargd-audit-directory"]` to the
sonar upgrade workflow to prevent preflight validations from aborting
on freshly-deployed POC environments, where the audit directory always
contains files and trips the threshold-based WARNING.

Also document the `ignore_healthcheck_checks` and
`ignore_healthcheck_warnings` options in the AWS sonar_upgrade example
so users know how to bypass non-actionable healthchecks.
Drop `--retry-all-errors` from the Azure CLI install command since it
requires curl >= 7.71.0, while Ubuntu 20.04 ships curl 7.68.0. The
unknown option caused curl to exit 2, and with the newly added
`set -o pipefail`, the failure was masked by the pipe to `sudo bash`.

Rely on the existing outer retry loop for resilience instead.
Detect the RHEL major version and install only the corresponding
packages-microsoft-prod RPM instead of attempting both RHEL 8 and 9
variants with `|| true`. The previous approach combined with dnf_retry
wasted up to ~5 minutes on the guaranteed-failing install, which could
exceed the downstream null_resource readiness timeout.
@elsegev elsegev merged commit 2ace6a9 into dev May 20, 2026
11 checks passed
@elsegev elsegev deleted the fix-upgrade branch May 20, 2026 16:48
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