Skip to content

Commit

Permalink
Merge branch 'release-2.7.0.0' into version-update-2.7.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinclark19a authored Feb 15, 2022
2 parents 370f307 + 9305e7f commit 550a2b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions azurelinuxagent/common/logcollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

CGROUPS_UNIT = "collect-logs.scope"

FORCE_KILLED_ERRCODE = -9
INVALID_CGROUPS_ERRCODE = 2

_MUST_COLLECT_FILES = [
Expand Down
6 changes: 6 additions & 0 deletions azurelinuxagent/ga/collect_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ def exec_command(output_file):
if e.returncode == logcollector.INVALID_CGROUPS_ERRCODE: # pylint: disable=no-member
logger.info("Disabling periodic log collection until service restart due to process error.")
self.stop()

# When the OOM killer is invoked on the log collector process, this error code is
# returned. Stop the periodic operation because it seems to be persistent.
elif e.returncode == logcollector.FORCE_KILLED_ERRCODE: # pylint: disable=no-member
logger.info("Disabling periodic log collection until service restart due to OOM error.")
self.stop()
else:
logger.info(err_msg)

Expand Down

0 comments on commit 550a2b4

Please sign in to comment.