Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
nagworld9 committed Nov 25, 2024
1 parent 0149c5a commit a2c77d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion azurelinuxagent/ga/cgroupcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def is_active(self):
' Internal error: {1}'.format(self.path, ustr(e)))
return False

def get_tracked_metrics(self, **_):
def get_tracked_metrics(self):
"""
Retrieves the current value of the metrics tracked for this controller/cgroup and returns them as an array.
"""
Expand Down
14 changes: 3 additions & 11 deletions tests/lib/mock_cgroup_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,12 @@
'''Slice=system.slice
'''),

MockCommand(r"^systemctl show walinuxagent\.service --property CPUAccounting$",
'''CPUAccounting=no
MockCommand(r"^systemctl show extension\.service --property ControlGroup$",
'''ControlGroup=/system.slice/extension.service
'''),

MockCommand(r"^systemctl show walinuxagent\.service --property CPUQuotaPerSecUSec$",
MockCommand(r"^systemctl show (.+) --property CPUQuotaPerSecUSec$",
'''CPUQuotaPerSecUSec=infinity
'''),

MockCommand(r"^systemctl show walinuxagent\.service --property MemoryAccounting$",
'''MemoryAccounting=no
'''),

MockCommand(r"^systemctl show extension\.service --property ControlGroup$",
'''ControlGroup=/system.slice/extension.service
'''),

MockCommand(r"^systemctl show (.+) --property CPUAccounting$",
Expand Down

0 comments on commit a2c77d5

Please sign in to comment.