-
Notifications
You must be signed in to change notification settings - Fork 371
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
remove version suffix from extension slice #2782
Conversation
@@ -455,6 +455,11 @@ def __create_all_files(files_to_create): | |||
|
|||
def is_extension_resource_limits_setup_completed(self, extension_name, cpu_quota=None): | |||
unit_file_install_path = systemd.get_unit_file_install_path() | |||
old_extension_slice_path = os.path.join(unit_file_install_path, SystemdCgroupsApi.get_extension_slice_name(extension_name, old_slice=True)) | |||
# clean up the old slice from the desk |
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.
typo: "desk"
def get_extension_slice_name(extension_name, old_slice=False): | ||
# old slice includes <HandlerName>.<ExtensionName>-<HandlerVersion> | ||
# new slice without version <HandlerName>.<ExtensionName> | ||
if not old_slice: |
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.
maybe add a comment that we renamed the slice and why for future reference?
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.
addressed
Codecov Report
@@ Coverage Diff @@
## develop #2782 +/- ##
===========================================
- Coverage 71.99% 71.98% -0.01%
===========================================
Files 104 104
Lines 15844 15851 +7
Branches 2268 2271 +3
===========================================
+ Hits 11407 11411 +4
- Misses 3914 3915 +1
- Partials 523 525 +2
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Description
Today we are creating extension_slice with version on it. Example
└─azure-vmextensions.slice
└─azure-vmextensions-Microsoft.Azure.Monitor.AzureMonitorLinuxAgent_1.25.1.slice
└─enable_c1f3b25b-93d5-4594-9a2d-ce5deee5536f.scope
└─3319627 /usr/bin/python3 /var/lib/waagent/Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.25.1/agent.py -metrics
This makes it difficult for user to override the limits because they need to place drop-in files on every upgrade if extension slice is different for each version.
In this pr, I have updated logic and creating slice without version and will be same slice even extension updated to new version. We only modify it if the extension publishers change the limits. That way users don't need to create drop files again if they already done it for having custom settings.
Issue #
PR information
Quality of Code and Contribution Guidelines