Skip to content

fix(al2023): disable update-motd timer - #2857

Merged
mselim00 merged 3 commits into
awslabs:mainfrom
lawraa:al2023-mask-update-motd
Oct 15, 2026
Merged

mselim00 merged 3 commits into
awslabs:mainfrom
lawraa:al2023-mask-update-motd

Conversation

@lawraa

@lawraa lawraa commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available: Fixes #2856

Description of changes:

On AL2023 nodes, update-motd.service runs at boot and every ~12h via update-motd.timer. It executes /etc/update-motd.d/70-available-updates, which runs timeout 30s dnf updateinfo under CPUQuota=25%. Because cleanup.sh removes /var/cache/dnf at build time, dnf has to rebuild its cache from scratch and is routinely killed by the timeout; when the kill lands mid-write it leaks a ~30 MB *.solvx.XXXXXX temp file in /var/cache/dnf. On long-lived nodes this accumulates to several GB and triggers kubelet DiskPressure (root cause in dnf tracked in amazonlinux/amazon-linux-2023#1142).

This fix masks update-motd.timer and update-motd.service in the AL2023 template.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

  • Applied the change on a running node(c5.xlarge, AMI amazon-eks-node-al2023-x86_64-nvidia-1.35-v20260917) with systemctl mask update-motd.timer update-motd.service: both units report masked, the timer has no next trigger.

See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

@lawraa
lawraa requested a review from a team as a code owner October 14, 2026 21:08

@mselim00 mselim00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

independent of fixing the timeout/cleanup logic in the update-motd part, I agree a periodic update-motd invocation isn't necessary for these AMIs since they're largely intended to be treated as immutable. we do use it to advertise the NVIDIA EULA on NVIDIA AMIs though, so it's not something we want to totally mask

the service is enabled by default, so it would run at each boot independent of any timer, but the additional baked in-timer means it runs periodically regardless of boot cycles. disabling the timer means it'd only run once at boot, so the wasted space from a timeout is bounded, and timeouts aren't actually as likely as the issue would imply

lawraa and others added 2 commits October 15, 2026 10:32
…for the NVIDIA EULA notice

Co-authored-by: Mazen Selim <100049111+mselim00@users.noreply.github.com>
@mselim00 mselim00 changed the title fix(al2023): mask update-motd to stop dnf temp file leak fix(al2023): disable update-motd timer Oct 15, 2026

@mselim00 mselim00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks

@mselim00
mselim00 merged commit 0dca7a2 into awslabs:main Oct 15, 2026
2 checks passed
@lawraa
lawraa deleted the al2023-mask-update-motd branch November 11, 2026 18:45
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.

bug(al2023): update-motd leaks ~30 MB dnf temp files every run, filling root volume on long-lived nodes

2 participants