Skip to content

Commit

Permalink
enable logcollector in v2 machines (#3279)
Browse files Browse the repository at this point in the history
  • Loading branch information
nagworld9 authored Dec 26, 2024
1 parent d1b647c commit f047b31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit f047b31

Please sign in to comment.