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

Fix PID tracking for cgroups #1489

Merged
merged 11 commits into from
Mar 26, 2019
Merged

Fix PID tracking for cgroups #1489

merged 11 commits into from
Mar 26, 2019

Conversation

pgombar
Copy link
Contributor

@pgombar pgombar commented Mar 22, 2019

Description

These changes fix the previously incorrect process id tracking for cgroups. Style improvements, tests, and comments added as well.


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.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines

@pgombar pgombar requested review from vrdmr and narrieta March 22, 2019 06:52
@codecov-io
Copy link

codecov-io commented Mar 22, 2019

Codecov Report

Merging #1489 into develop will decrease coverage by 0.03%.
The diff coverage is 10.71%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1489      +/-   ##
===========================================
- Coverage    60.86%   60.82%   -0.04%     
===========================================
  Files           75       75              
  Lines        10872    10878       +6     
  Branches      1558     1559       +1     
===========================================
  Hits          6617     6617              
- Misses        3941     3946       +5     
- Partials       314      315       +1
Impacted Files Coverage Δ
azurelinuxagent/ga/exthandlers.py 80.89% <0%> (ø) ⬆️
azurelinuxagent/ga/monitor.py 58.13% <0%> (-0.39%) ⬇️
azurelinuxagent/common/cgroups.py 29.82% <13.04%> (-0.31%) ⬇️

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 ca1d395...fbfb14e. 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.

a few minor comments

azurelinuxagent/common/cgroups.py Outdated Show resolved Hide resolved
azurelinuxagent/common/cgroups.py Outdated Show resolved Hide resolved
azurelinuxagent/common/cgroups.py Outdated Show resolved Hide resolved
Copy link
Member

@vrdmr vrdmr left a comment

Choose a reason for hiding this comment

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

LGTM.

nit; comments added.

azurelinuxagent/common/cgroups.py Outdated Show resolved Hide resolved
azurelinuxagent/common/cgroups.py Outdated Show resolved Hide resolved
@pgombar pgombar merged commit ff01b37 into Azure:develop Mar 26, 2019
@pgombar pgombar deleted the fix_cgroups branch March 26, 2019 16:46
pgombar added a commit that referenced this pull request May 2, 2019
* Use 1804-style deprovisioning for all versions >= 18.04 (#1483)

18.04 changed the method of managing resolv.conf vs. 16.04; the new method involves letting systemd-networkd manage that file. A previous fix corrected waagent behavior for 18.04 but did not do so for subsequent releases. Now that Ubuntu's direction is clear, this commit makes the correction in all versions of Ubuntu from 18.04 onwards. Other distros are unaffected by this bug and by this fix.

* Updating Travis settings

* Added description for Extension Error Codes (#1482)

* Added description for Extension Error Codes

* Correcting the test - to send the correct CRP Extension Error code

* Adding docstring to describe ExtensionErrorCodes

* Make launch_command resilient to cgroups failures (#1484)

* WireServer Certificates parser gracefully exits if format of package is not Pkcs7BlobWithPfxContents  (#1474)

* Certificates parser gracefully exits if format of package is not Pkcs7BlobWithPfxContents

* Add missing files

* change message to warning

* Removing the requirement of passing cipher-name. Default is more secure (#1481)

* Fix PID tracking for cgroups (#1489)

* add fixes for cgroup setup and PID tracking

* cleanup code comments

* disable cgroups test if not supported by environment

* remove wrapper cgroup tracking and other nits

* fix whitespace

* nit fixes; addressing CR comments

* Release 2.2.39 (#1494)

* Fix header

* Update agent version to 2.2.40
larohra pushed a commit to larohra/WALinuxAgent that referenced this pull request Aug 21, 2019
* Use 1804-style deprovisioning for all versions >= 18.04 (Azure#1483)

18.04 changed the method of managing resolv.conf vs. 16.04; the new method involves letting systemd-networkd manage that file. A previous fix corrected waagent behavior for 18.04 but did not do so for subsequent releases. Now that Ubuntu's direction is clear, this commit makes the correction in all versions of Ubuntu from 18.04 onwards. Other distros are unaffected by this bug and by this fix.

* Updating Travis settings

* Added description for Extension Error Codes (Azure#1482)

* Added description for Extension Error Codes

* Correcting the test - to send the correct CRP Extension Error code

* Adding docstring to describe ExtensionErrorCodes

* Make launch_command resilient to cgroups failures (Azure#1484)

* WireServer Certificates parser gracefully exits if format of package is not Pkcs7BlobWithPfxContents  (Azure#1474)

* Certificates parser gracefully exits if format of package is not Pkcs7BlobWithPfxContents

* Add missing files

* change message to warning

* Removing the requirement of passing cipher-name. Default is more secure (Azure#1481)

* Fix PID tracking for cgroups (Azure#1489)

* add fixes for cgroup setup and PID tracking

* cleanup code comments

* disable cgroups test if not supported by environment

* remove wrapper cgroup tracking and other nits

* fix whitespace

* nit fixes; addressing CR comments

* Release 2.2.39 (Azure#1494)

* Fix header

* Update agent version to 2.2.40
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.

4 participants