-
Notifications
You must be signed in to change notification settings - Fork 372
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
Defined API for initialization of cgroups #1530
Conversation
Codecov Report
@@ Coverage Diff @@
## cgroups #1530 +/- ##
===========================================
+ Coverage 60.9% 61.07% +0.17%
===========================================
Files 77 78 +1
Lines 10893 10919 +26
Branches 1560 1554 -6
===========================================
+ Hits 6634 6669 +35
+ Misses 3944 3935 -9
Partials 315 315
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## cgroups #1530 +/- ##
===========================================
+ Coverage 60.9% 61.07% +0.17%
===========================================
Files 77 78 +1
Lines 10893 10919 +26
Branches 1560 1554 -6
===========================================
+ Hits 6634 6669 +35
+ Misses 3944 3935 -9
Partials 315 315
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a couple of comments and suggestions.
azurelinuxagent/common/cgroupapi.py
Outdated
else: | ||
raise | ||
|
||
def _foreach_controller(self, operation, message): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method can be static.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, fixed
Determine if systemd is managing system services. If this process (presumed to be the agent) is in a CPU cgroup | ||
that looks like one created by systemd, we can assume systemd is in use. | ||
|
||
NOTE: This function has the side effect of mounting the cgroups file system if it is not already mounted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When does this happen? I don't see where the mounting happens here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment was for a previous iteration of the code... i'll remove it
message=status, | ||
log_event=False) | ||
|
||
def _invoke_cgroup_operation(self, operation, error_message): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be static.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed
@pgombar thanks for your comments. I updated the code, could you take a look at the last commit? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
PR information
Quality of Code and Contribution Guidelines
This change is