From 2e98cafcc148824246e0a451d438e3689657f34f Mon Sep 17 00:00:00 2001 From: Nageswara Nandigam Date: Thu, 19 Dec 2024 13:49:47 -0800 Subject: [PATCH] enable logcollector in v2 machines --- azurelinuxagent/common/conf.py | 2 +- tests_e2e/tests/log_collector/log_collector.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azurelinuxagent/common/conf.py b/azurelinuxagent/common/conf.py index cf38286a6..2898e1d9a 100644 --- a/azurelinuxagent/common/conf.py +++ b/azurelinuxagent/common/conf.py @@ -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__): diff --git a/tests_e2e/tests/log_collector/log_collector.py b/tests_e2e/tests/log_collector/log_collector.py index b94310da0..0fe268bd0 100755 --- a/tests_e2e/tests/log_collector/log_collector.py +++ b/tests_e2e/tests/log_collector/log_collector.py @@ -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')