Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable logcollector in cgroup supported v2 distros(ub22+) #3279

Merged
merged 3 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azurelinuxagent/common/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def get_enable_cgroup_v2_resource_limiting(conf=__conf__):
If True, the agent will enable resource monitoring and enforcement for the log collector on machines using cgroup v2.
NOTE: This option is experimental and may be removed in later versions of the Agent.
"""
return conf.get_switch("Debug.EnableCgroupV2ResourceLimiting", False)
return conf.get_switch("Debug.EnableCgroupV2ResourceLimiting", True)


def get_log_collector_initial_delay(conf=__conf__):
Expand Down
4 changes: 2 additions & 2 deletions tests_e2e/tests/log_collector/log_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def run(self):

# Rename the agent log file so that the test does not pick up any incomplete log collector runs that started
# before the config is updated
# Enable Cgroup v2 resource limiting and reduce log collector iniital delay via config
# Reduce log collector initial delay via config
log.info("Renaming agent log file and modifying log collector conf flags")
setup_script = ("agent-service stop && mv /var/log/waagent.log /var/log/waagent.$(date --iso-8601=seconds).log && "
"update-waagent-conf Logs.Collect=y Debug.EnableCgroupV2ResourceLimiting=y Debug.LogCollectorInitialDelay=60")
"update-waagent-conf Logs.Collect=y Debug.LogCollectorInitialDelay=60")
ssh_client.run_command(f"sh -c '{setup_script}'", use_sudo=True)
log.info('Renamed log file and updated log collector config flags')

Expand Down
Loading