Skip to content

fix: allow unattended-upgrade to handle conffile prompts - #391

Merged
sjatinkadimcherla merged 1 commit into
masterfrom
DOS-7378
Oct 7, 2026
Merged

sjatinkadimcherla merged 1 commit into
masterfrom
DOS-7378

Conversation

@sjatinkadimcherla

Copy link
Copy Markdown
Contributor

Finishes DOS-7379

Jira: LP-1289

Changes

  • 50unattended-upgrades: add Dpkg::Options { "--force-confdef"; "--force-confold"; }; so unmodified conffiles take the package default and modified ones are kept.
  • security-ubuntu.yml: stop retrying on conffile prompt so the task fails fast instead of hanging.

Impact
Affects all plays that use the security role. Locally modified conffiles are kept, not replaced, on upgrade.

Make sure that the following steps are done before merging:

  • Have a Site Reliability Engineer review the PR if you don't own all of the services impacted.
  • If you are adding any new default values that need to be overridden when this change goes live, update internal repos and add an entry to the top of the CHANGELOG.
  • Performed the appropriate testing.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Include stderr in the conffile detection condition so retries stop as intended.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates Ubuntu unattended upgrades to handle modified conffiles without interactive prompts.

Changes:

  • Adds dpkg options to preserve locally modified conffiles.
  • Adjusts retry handling for conffile prompts.
File Summary
playbooks/​roles/​security/​templates/​etc/​apt/​apt.conf.d/​50unattended-upgrades Configures dpkg conffile handling.
playbooks/​roles/​security/​tasks/​security-ubuntu.yml Updates retry behavior; the conffile diagnostic is on stderr, so the fail-fast check needs adjustment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread playbooks/roles/security/tasks/security-ubuntu.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

Resolved since last review (1)

@sjatinkadimcherla

Copy link
Copy Markdown
Contributor Author

atlantis apply

@sjatinkadimcherla
sjatinkadimcherla merged commit 0560ab1 into master Oct 7, 2026
5 checks passed
@sjatinkadimcherla
sjatinkadimcherla deleted the DOS-7378 branch October 7, 2026 08:52
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.

3 participants