Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datadog_checks_base/datadog_checks/base/checks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ def run(self):

enter_pdb(self.check, line=self.init_config['set_breakpoint'], args=(instance,))
elif self.should_profile_memory():
# self.init_config.get('profile_memory') could be `/tmp/datadog-agent-memory-profiler*`
# The 'profile_memory' key in self.init_config could be `/tmp/datadog-agent-memory-profiler*`
# that is generated by Datadog Agent.
# If we use `--m-dir` for `agent check` command, a hidden flag, it should be same as a given value.
namespaces = [self.init_config.get('profile_memory')]
Expand Down
9 changes: 3 additions & 6 deletions datadog_checks_base/tests/base/checks/test_agent_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -1312,14 +1312,11 @@ def test_env_var_logic_preset():
@pytest.mark.parametrize(
"should_profile_value, expected_calls",
[
(True, 1),
(False, 0),
pytest.param(True, 1, id="enabled"),
pytest.param(False, 0, id="disabled"),
],
)
def test_profile_memory(should_profile_value, expected_calls):
"""
Test that profile_memory is called when should_profile_memory is True
"""
def test_profile_memory_when_enabled(should_profile_value, expected_calls):
check = AgentCheck('test', {}, [{}])
check.should_profile_memory = mock.MagicMock(return_value=should_profile_value)
check.profile_memory = mock.MagicMock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def config(ctx, check, sync, verbose):
files_failed[spec_file_path] = True

check_display_queue.append(
lambda spec_file_path=spec_file_path, check=check: (echo_failure if is_core_check else echo_failure)(
lambda spec_file_path=spec_file_path, check=check: echo_failure(
f"Did not find spec file {spec_file_path} for check {check}"
)
)
Expand Down
19 changes: 17 additions & 2 deletions gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,15 @@ spec:
features:
gpu:
enabled: true
# for operator versions 1.14.x and 1.15.x add this section
# For operator versions below 1.18, add this section
override:
nodeAgent:
volumes:
# Add this volume for operator version below 1.18, unless other system-probe features
# such as npm, cws, usm or oom_kill are enabled.
- name: debugfs
hostPath:
path: /sys/kernel/debug
containers:
agent:
env:
Expand All @@ -204,6 +210,13 @@ spec:
# add this env var, if using operator versions 1.14.x or 1.15.x
- name: DD_COLLECT_GPU_TAGS
value: "true"
system-probe:
volumeMounts:
# Add this volume for operator version below 1.18, unless other system-probe features
# such as Cloud Network Monitoring, Cloud Workload Security or Universal Service Monitoring
# are enabled.
- name: debugfs
mountPath: /sys/kernel/debug
```

For **mixed environments**, use the [DatadogAgentProfiles (DAP) feature](https://github.com/DataDog/datadog-operator/blob/main/docs/datadog_agent_profiles.md) of the operator, which allows different configurations to be deployed for different nodes. Note that this feature is disabled by default, so it needs to be enabled. For more information, see [Enabling DatadogAgentProfiles](https://github.com/DataDog/datadog-operator/blob/main/docs/datadog_agent_profiles.md#enabling-datadogagentprofiles).
Expand All @@ -223,7 +236,9 @@ In summary, the changes that need to be applied to the DatadogAgent manifest are
```yaml
spec:
features:
oomKill: # Only enable this feature if there is nothing else that requires the system-probe container in all Agent pods
oomKill:
# Only enable this feature if there is nothing else that requires the system-probe container in all Agent pods
# Examples of system-probe features are npm, cws, usm
enabled: true

override:
Expand Down
Loading
Loading