feat: add systemd memory and OOM protection for SSM agent and Redis worker#248
Merged
Merged
Conversation
…rkers **Added:** - Added `aws_ssm_agent_oom_protect` and `aws_ssm_agent_memory_max` variables to enable SSM agent OOM protection and cap its memory - aws_ssm_agent/defaults/main.yml - Created systemd override template for SSM agent to adjust OOM score and set memory limit - aws_ssm_agent/templates/ssm-oom-protect.conf.j2 - Added tasks to create systemd override directory and deploy OOM protection config for SSM agent when enabled - aws_ssm_agent/tasks/linux.yml - Documented new variables and tasks in aws_ssm_agent/README.md - Added `redis_ares_worker_memory_high`, `redis_ares_worker_memory_max`, and `redis_ares_worker_tasks_max` variables to control resource limits for Ares worker processes - redis/defaults/main.yml - Applied corresponding systemd resource limits in ares@.service template - redis/templates/ares@.service.j2 - Documented new Redis worker resource limit variables in redis/README.md - Added step to install setuptools<81 in noPac venv to provide pkg_resources for legacy impacket compatibility - privesc_tools/tasks/linux.yml - Documented setuptools installation step for noPac in privesc_tools/README.md
**Changed:** - Updated comments in ssm-oom-protect.conf.j2 to clarify the behavior of OOMScoreAdjust and MemoryMax, explaining their independent roles in protecting the SSM agent when Ares workers exhaust memory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key Changes:
Added:
ssm-oom-protect.conf.j2) and related Ansible tasks to deploy it, including variables for enabling protection and setting memory limitsredis_ares_worker_memory_high,redis_ares_worker_memory_max,redis_ares_worker_tasks_max) with defaults and documentationpkg_resourcesfor impacketChanged:
pkg_resourcesis available by explicitly installingsetuptools<81before installing requirements