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

Add support for python 2.6 to the log collection code #2452

Merged
merged 6 commits into from
Dec 29, 2021

Conversation

kevinclark19a
Copy link
Contributor

Description

Relaxes the requirements for the log collection background task to allow for python2.6 to run it. Right now, there aren't any distros that are on python2.6 and also have cgroups enabled (another requirement of that code running), but if/when cgroups are enabled for those distros, the log collection background task will also be enabled for those distros.

Also makes the log collection code python2.6 compatible, which right now allows waagent -collect-logs to be ran on distros with python2.6.


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #2452 (0908556) into develop (28b429e) will increase coverage by 0.00%.
The diff coverage is 83.33%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2452   +/-   ##
========================================
  Coverage    71.88%   71.88%           
========================================
  Files          101      101           
  Lines        14964    14968    +4     
  Branches      2369     2370    +1     
========================================
+ Hits         10757    10760    +3     
  Misses        3728     3728           
- Partials       479      480    +1     
Impacted Files Coverage Δ
azurelinuxagent/common/logcollector.py 88.54% <80.00%> (-0.25%) ⬇️
azurelinuxagent/ga/collect_logs.py 82.26% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28b429e...0908556. Read the comment docs.

Copy link
Member

@narrieta narrieta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if zipfile.Zipfile raises then the finally clause will raise a null (None) reference exception

@kevinclark19a kevinclark19a merged commit a764071 into Azure:develop Dec 29, 2021
@kevinclark19a kevinclark19a deleted the log_collector__support_2_6 branch December 29, 2021 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants