diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3f00a7c544bf9..7fd42771c56ca 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -546,6 +546,7 @@ /pkg/tagger/ @DataDog/container-platform /pkg/windowsdriver/ @DataDog/windows-kernel-integrations /comp/core/workloadmeta/collectors/internal/cloudfoundry @DataDog/platform-integrations +/comp/core/workloadmeta/collectors/internal/nvml @DataDog/ebpf-platform /pkg/sbom/ @DataDog/container-integrations @DataDog/agent-security /pkg/internaltelemetry @DataDog/windows-kernel-integrations @DataDog/fleet /pkg/networkpath/ @DataDog/network-device-monitoring @DataDog/Networks diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be283da943369..80f4b199117ef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1170,6 +1170,7 @@ workflow: - pkg/gpu/**/* - test/new-e2e/tests/gpu/**/* - pkg/collector/corechecks/gpu/**/* + - comp/core/workloadmeta/collectors/internal/nvml/**/* compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916 # windows_docker_2022 configures the job to use the Windows Server 2022 runners. diff --git a/comp/api/authtoken/go.mod b/comp/api/authtoken/go.mod index 692fd75a5a99b..6428c12054c16 100644 --- a/comp/api/authtoken/go.mod +++ b/comp/api/authtoken/go.mod @@ -66,15 +66,15 @@ require ( github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.60.0-devel // indirect github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/log/setup v0.58.0-devel // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/comp/core/config/go.mod b/comp/core/config/go.mod index 5f12e7600784e..2e3588c53ed8d 100644 --- a/comp/core/config/go.mod +++ b/comp/core/config/go.mod @@ -42,7 +42,7 @@ require ( github.com/DataDog/datadog-agent/pkg/util/defaultpaths v0.0.0-00010101000000-000000000000 github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 github.com/DataDog/viper v1.14.0 github.com/stretchr/testify v1.10.0 go.uber.org/fx v1.23.0 @@ -58,12 +58,12 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/comp/core/log/impl-trace/go.mod b/comp/core/log/impl-trace/go.mod index 9da7eaed4328c..9838e5804cf7f 100644 --- a/comp/core/log/impl-trace/go.mod +++ b/comp/core/log/impl-trace/go.mod @@ -45,7 +45,7 @@ require ( github.com/DataDog/datadog-agent/pkg/config/env v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/trace v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect; v2.6 github.com/stretchr/testify v1.10.0 go.uber.org/fx v1.23.0 // indirect @@ -68,14 +68,14 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/comp/core/log/impl/go.mod b/comp/core/log/impl/go.mod index 11736e49c9a8e..90a9c802bb9ca 100644 --- a/comp/core/log/impl/go.mod +++ b/comp/core/log/impl/go.mod @@ -39,7 +39,7 @@ require ( github.com/DataDog/datadog-agent/comp/core/log/def v0.0.0-00010101000000-000000000000 github.com/DataDog/datadog-agent/comp/def v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/util/log/setup v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.10.0 ) @@ -56,15 +56,15 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/comp/core/log/mock/go.mod b/comp/core/log/mock/go.mod index 806ac2a0cf010..e69fa4e54919f 100644 --- a/comp/core/log/mock/go.mod +++ b/comp/core/log/mock/go.mod @@ -31,7 +31,7 @@ replace ( require ( github.com/DataDog/datadog-agent/comp/core/log/def v0.0.0-00010101000000-000000000000 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/util/log/setup v0.0.0-00010101000000-000000000000 ) @@ -39,7 +39,7 @@ require ( github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.60.0-devel // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.60.0-devel // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect diff --git a/comp/core/status/statusimpl/go.mod b/comp/core/status/statusimpl/go.mod index 95a89f26d371c..3e479f4186af4 100644 --- a/comp/core/status/statusimpl/go.mod +++ b/comp/core/status/statusimpl/go.mod @@ -68,16 +68,16 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.60.0-devel // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/log/setup v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect diff --git a/comp/core/workloadmeta/collectors/catalog-core/options.go b/comp/core/workloadmeta/collectors/catalog-core/options.go index bba615c6bd790..5dbb5398da63e 100644 --- a/comp/core/workloadmeta/collectors/catalog-core/options.go +++ b/comp/core/workloadmeta/collectors/catalog-core/options.go @@ -21,6 +21,7 @@ import ( "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/kubeapiserver" "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/kubelet" "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/kubemetadata" + "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/nvml" "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/podman" "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/process" remoteprocesscollector "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/remote/processcollector" @@ -41,5 +42,6 @@ func getCollectorOptions() []fx.Option { podman.GetFxOptions(), remoteprocesscollector.GetFxOptions(), process.GetFxOptions(), + nvml.GetFxOptions(), } } diff --git a/comp/core/workloadmeta/collectors/catalog/options.go b/comp/core/workloadmeta/collectors/catalog/options.go index 05f6ca9ac5e12..1778576a3573e 100644 --- a/comp/core/workloadmeta/collectors/catalog/options.go +++ b/comp/core/workloadmeta/collectors/catalog/options.go @@ -21,6 +21,7 @@ import ( "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/kubeapiserver" "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/kubelet" "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/kubemetadata" + "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/nvml" "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/podman" "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/remote/processcollector" remoteworkloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/remote/workloadmeta" @@ -42,5 +43,6 @@ func getCollectorOptions() []fx.Option { remoteworkloadmeta.GetFxOptions(), remoteWorkloadmetaParams(), processcollector.GetFxOptions(), + nvml.GetFxOptions(), } } diff --git a/comp/core/workloadmeta/collectors/internal/nvml/nvml.go b/comp/core/workloadmeta/collectors/internal/nvml/nvml.go new file mode 100644 index 0000000000000..d612a3dd01fd1 --- /dev/null +++ b/comp/core/workloadmeta/collectors/internal/nvml/nvml.go @@ -0,0 +1,124 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2024-present Datadog, Inc. + +//go:build linux + +package nvml + +import ( + "context" + "fmt" + + "go.uber.org/fx" + + "github.com/NVIDIA/go-nvml/pkg/nvml" + + workloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/def" + "github.com/DataDog/datadog-agent/pkg/config/env" + "github.com/DataDog/datadog-agent/pkg/errors" +) + +const ( + collectorID = "nvml" + componentName = "workloadmeta-nvml" + nvidiaVendor = "nvidia" +) + +type collector struct { + id string + catalog workloadmeta.AgentType + store workloadmeta.Component + nvmlLib nvml.Interface +} + +// NewCollector returns a kubelet CollectorProvider that instantiates its collector +func NewCollector() (workloadmeta.CollectorProvider, error) { + return workloadmeta.CollectorProvider{ + Collector: &collector{ + id: collectorID, + catalog: workloadmeta.NodeAgent, + }, + }, nil +} + +// GetFxOptions returns the FX framework options for the collector +func GetFxOptions() fx.Option { + return fx.Provide(NewCollector) +} + +// Start initializes the NVML library and sets the store +func (c *collector) Start(_ context.Context, store workloadmeta.Component) error { + if !env.IsFeaturePresent(env.NVML) { + return errors.NewDisabled(componentName, "Agent does not have NVML library available") + } + + c.store = store + // TODO: Add configuration option for NVML library path + c.nvmlLib = nvml.New() + ret := c.nvmlLib.Init() + if ret != nvml.SUCCESS && ret != nvml.ERROR_ALREADY_INITIALIZED { + return fmt.Errorf("failed to initialize NVML library: %v", nvml.ErrorString(ret)) + } + + return nil +} + +// Pull collects the GPUs available on the node and notifies the store +func (c *collector) Pull(_ context.Context) error { + count, ret := c.nvmlLib.DeviceGetCount() + if ret != nvml.SUCCESS { + return fmt.Errorf("failed to get device count: %v", nvml.ErrorString(ret)) + } + + var events []workloadmeta.CollectorEvent + for i := 0; i < count; i++ { + dev, ret := c.nvmlLib.DeviceGetHandleByIndex(i) + if ret != nvml.SUCCESS { + return fmt.Errorf("failed to get device handle for index %d: %v", i, nvml.ErrorString(ret)) + } + + uuid, ret := dev.GetUUID() + if ret != nvml.SUCCESS { + return fmt.Errorf("failed to get device UUID for index %d: %v", i, nvml.ErrorString(ret)) + } + + name, ret := dev.GetName() + if ret != nvml.SUCCESS { + return fmt.Errorf("failed to get device name for index %d: %v", i, nvml.ErrorString(ret)) + } + + gpu := &workloadmeta.GPU{ + EntityID: workloadmeta.EntityID{ + Kind: workloadmeta.KindGPU, + ID: uuid, + }, + EntityMeta: workloadmeta.EntityMeta{ + Name: name, + }, + Vendor: nvidiaVendor, + Device: name, + Index: i, + } + + event := workloadmeta.CollectorEvent{ + Source: workloadmeta.SourceRuntime, + Type: workloadmeta.EventTypeSet, + Entity: gpu, + } + events = append(events, event) + } + + c.store.Notify(events) + + return nil +} + +func (c *collector) GetID() string { + return c.id +} + +func (c *collector) GetTargetCatalog() workloadmeta.AgentType { + return c.catalog +} diff --git a/comp/core/workloadmeta/collectors/internal/nvml/nvml_nop.go b/comp/core/workloadmeta/collectors/internal/nvml/nvml_nop.go new file mode 100644 index 0000000000000..7d6beacc270f9 --- /dev/null +++ b/comp/core/workloadmeta/collectors/internal/nvml/nvml_nop.go @@ -0,0 +1,15 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2024-present Datadog, Inc. + +//go:build !linux + +package nvml + +import "go.uber.org/fx" + +// GetFxOptions returns the FX framework options for the collector +func GetFxOptions() fx.Option { + return nil +} diff --git a/comp/core/workloadmeta/collectors/internal/nvml/nvml_test.go b/comp/core/workloadmeta/collectors/internal/nvml/nvml_test.go new file mode 100644 index 0000000000000..0793fc9665687 --- /dev/null +++ b/comp/core/workloadmeta/collectors/internal/nvml/nvml_test.go @@ -0,0 +1,48 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2024-present Datadog, Inc. + +//go:build linux + +package nvml + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + workloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/def" + "github.com/DataDog/datadog-agent/pkg/gpu/testutil" +) + +func TestPull(t *testing.T) { + wmetaMock := testutil.GetWorkloadMetaMock(t) + nvmlMock := testutil.GetBasicNvmlMock() + + c := &collector{ + id: collectorID, + catalog: workloadmeta.NodeAgent, + store: wmetaMock, + nvmlLib: nvmlMock, + } + + c.Pull(context.Background()) + + gpus := wmetaMock.ListGPUs() + require.Equal(t, len(testutil.GPUUUIDs), len(gpus)) + + foundIDs := make(map[string]bool) + for _, gpu := range gpus { + foundIDs[gpu.ID] = true + + require.Equal(t, nvidiaVendor, gpu.Vendor) + require.Equal(t, testutil.DefaultGPUName, gpu.Name) + require.Equal(t, testutil.DefaultGPUName, gpu.Device) + } + + for _, uuid := range testutil.GPUUUIDs { + require.True(t, foundIDs[uuid], "GPU with UUID %s not found", uuid) + } +} diff --git a/comp/core/workloadmeta/collectors/internal/nvml/stub.go b/comp/core/workloadmeta/collectors/internal/nvml/stub.go new file mode 100644 index 0000000000000..bb7f692241c97 --- /dev/null +++ b/comp/core/workloadmeta/collectors/internal/nvml/stub.go @@ -0,0 +1,7 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2024-present Datadog, Inc. + +// Package nvml implements the NVML collector for workloadmeta +package nvml diff --git a/comp/core/workloadmeta/def/types.go b/comp/core/workloadmeta/def/types.go index ad7dbbeda21e3..ab249af8d8a2e 100644 --- a/comp/core/workloadmeta/def/types.go +++ b/comp/core/workloadmeta/def/types.go @@ -1365,6 +1365,12 @@ type GPU struct { // specific. Device string ActivePIDs []int + + // Index is the index of the GPU in the host system. This is useful as sometimes + // GPUs will be identified by their index instead of their UUID. Note that the index + // is not guaranteed to be stable across reboots, nor is necessarily the same inside + // of containers. + Index int } var _ Entity = &GPU{} @@ -1408,6 +1414,7 @@ func (g GPU) String(verbose bool) string { _, _ = fmt.Fprintln(&sb, "Vendor:", g.Vendor) _, _ = fmt.Fprintln(&sb, "Device:", g.Device) _, _ = fmt.Fprintln(&sb, "Active PIDs:", g.ActivePIDs) + _, _ = fmt.Fprintln(&sb, "Index:", g.Index) return sb.String() } diff --git a/comp/core/workloadmeta/impl/dump.go b/comp/core/workloadmeta/impl/dump.go index 3ffadfdaf6f7f..fd2b626c20d24 100644 --- a/comp/core/workloadmeta/impl/dump.go +++ b/comp/core/workloadmeta/impl/dump.go @@ -35,6 +35,8 @@ func (w *workloadmeta) Dump(verbose bool) wmdef.WorkloadDumpResponse { info = e.String(verbose) case *wmdef.KubernetesMetadata: info = e.String(verbose) + case *wmdef.GPU: + info = e.String(verbose) default: return "", fmt.Errorf("unsupported type %T", e) } diff --git a/comp/forwarder/defaultforwarder/go.mod b/comp/forwarder/defaultforwarder/go.mod index b8dfe1557887e..29cc11ab23fbd 100644 --- a/comp/forwarder/defaultforwarder/go.mod +++ b/comp/forwarder/defaultforwarder/go.mod @@ -67,11 +67,11 @@ require ( github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/common v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 github.com/DataDog/datadog-agent/pkg/util/fxutil v0.57.1 github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 github.com/DataDog/datadog-agent/pkg/version v0.59.1 github.com/golang/protobuf v1.5.4 github.com/hashicorp/go-multierror v1.1.1 @@ -93,12 +93,12 @@ require ( github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.60.0-devel // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/log/setup v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/comp/forwarder/orchestrator/orchestratorinterface/go.mod b/comp/forwarder/orchestrator/orchestratorinterface/go.mod index 71948459efc15..d0d18a5c27afb 100644 --- a/comp/forwarder/orchestrator/orchestratorinterface/go.mod +++ b/comp/forwarder/orchestrator/orchestratorinterface/go.mod @@ -89,17 +89,17 @@ require ( github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/common v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.57.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/comp/logs/agent/config/go.mod b/comp/logs/agent/config/go.mod index aae1341b12d07..f0fb1e7c66c3d 100644 --- a/comp/logs/agent/config/go.mod +++ b/comp/logs/agent/config/go.mod @@ -43,8 +43,8 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 github.com/DataDog/viper v1.14.0 github.com/stretchr/testify v1.10.0 go.uber.org/fx v1.23.0 @@ -61,13 +61,13 @@ require ( github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect diff --git a/comp/otelcol/converter/impl/go.mod b/comp/otelcol/converter/impl/go.mod index f3312ddbbb4a0..a382f9181151f 100644 --- a/comp/otelcol/converter/impl/go.mod +++ b/comp/otelcol/converter/impl/go.mod @@ -66,16 +66,16 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.2 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/comp/otelcol/ddflareextension/impl/go.mod b/comp/otelcol/ddflareextension/impl/go.mod index 5ce10dd69255e..b8a394d3917c9 100644 --- a/comp/otelcol/ddflareextension/impl/go.mod +++ b/comp/otelcol/ddflareextension/impl/go.mod @@ -257,22 +257,22 @@ require ( github.com/DataDog/datadog-agent/pkg/util/cgroups v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/common v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/json v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/log/setup v0.58.0-devel // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/sort v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/startstop v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-api-client-go/v2 v2.33.0 // indirect github.com/DataDog/datadog-go/v5 v5.6.0 // indirect github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240816154533-f7f9beb53a42 // indirect diff --git a/comp/otelcol/logsagentpipeline/go.mod b/comp/otelcol/logsagentpipeline/go.mod index 38f8c438b1b4a..dcc4997dd3e18 100644 --- a/comp/otelcol/logsagentpipeline/go.mod +++ b/comp/otelcol/logsagentpipeline/go.mod @@ -92,19 +92,19 @@ require ( github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240816154533-f7f9beb53a42 // indirect github.com/DataDog/viper v1.14.0 // indirect diff --git a/comp/otelcol/logsagentpipeline/logsagentpipelineimpl/go.mod b/comp/otelcol/logsagentpipeline/logsagentpipelineimpl/go.mod index 41166e534eb15..25abbe1fc45ea 100644 --- a/comp/otelcol/logsagentpipeline/logsagentpipelineimpl/go.mod +++ b/comp/otelcol/logsagentpipeline/logsagentpipelineimpl/go.mod @@ -109,17 +109,17 @@ require ( github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/log/setup v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240816154533-f7f9beb53a42 // indirect github.com/DataDog/viper v1.14.0 // indirect diff --git a/comp/otelcol/otlp/components/exporter/datadogexporter/go.mod b/comp/otelcol/otlp/components/exporter/datadogexporter/go.mod index 4b812e26191a2..8bd175dadf827 100644 --- a/comp/otelcol/otlp/components/exporter/datadogexporter/go.mod +++ b/comp/otelcol/otlp/components/exporter/datadogexporter/go.mod @@ -189,21 +189,21 @@ require ( github.com/DataDog/datadog-agent/pkg/util/cgroups v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/common v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/json v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/sort v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/datadog-api-client-go/v2 v2.33.0 // indirect github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240816154533-f7f9beb53a42 // indirect diff --git a/comp/otelcol/otlp/components/exporter/logsagentexporter/go.mod b/comp/otelcol/otlp/components/exporter/logsagentexporter/go.mod index c67221a1ae7d1..f6c0091d1edbf 100644 --- a/comp/otelcol/otlp/components/exporter/logsagentexporter/go.mod +++ b/comp/otelcol/otlp/components/exporter/logsagentexporter/go.mod @@ -47,7 +47,7 @@ require ( github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/message v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/sources v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.22.0 github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.22.0 github.com/stormcat24/protodep v0.1.8 @@ -86,15 +86,15 @@ require ( github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/proto v0.55.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/datadog-api-client-go/v2 v2.33.0 // indirect github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.22.0 // indirect diff --git a/comp/otelcol/otlp/components/exporter/serializerexporter/go.mod b/comp/otelcol/otlp/components/exporter/serializerexporter/go.mod index 7187d40303c67..7512830af0e48 100644 --- a/comp/otelcol/otlp/components/exporter/serializerexporter/go.mod +++ b/comp/otelcol/otlp/components/exporter/serializerexporter/go.mod @@ -69,7 +69,7 @@ require ( github.com/DataDog/datadog-agent/pkg/proto v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/serializer v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/tagset v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.22.0 github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.22.0 github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.22.0 @@ -123,18 +123,18 @@ require ( github.com/DataDog/datadog-agent/pkg/util/buf v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/common v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.57.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/json v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/sort v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/mmh3 v0.0.0-20210722141835-012dc69a9e49 // indirect github.com/DataDog/sketches-go v1.4.6 // indirect diff --git a/comp/otelcol/otlp/testutil/go.mod b/comp/otelcol/otlp/testutil/go.mod index 2adbdacc9efd7..34531e0e5d204 100644 --- a/comp/otelcol/otlp/testutil/go.mod +++ b/comp/otelcol/otlp/testutil/go.mod @@ -53,15 +53,15 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/comp/serializer/compression/go.mod b/comp/serializer/compression/go.mod index bc763234b050d..a0b8f60dc39f9 100644 --- a/comp/serializer/compression/go.mod +++ b/comp/serializer/compression/go.mod @@ -36,7 +36,7 @@ replace ( require ( github.com/DataDog/datadog-agent/comp/core/config v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/zstd v1.5.6 ) @@ -54,14 +54,14 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/go.mod b/go.mod index 39e4930b3eb51..c27f741ede484 100644 --- a/go.mod +++ b/go.mod @@ -154,9 +154,9 @@ require ( github.com/DataDog/datadog-agent/pkg/security/secl v0.56.0 github.com/DataDog/datadog-agent/pkg/trace v0.59.0 github.com/DataDog/datadog-agent/pkg/util/cgroups v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 github.com/DataDog/datadog-go/v5 v5.6.0 // TODO: pin to an operator released version once there is a release that includes the api module github.com/DataDog/datadog-operator/api v0.0.0-20250114151552-463ab54482b4 @@ -691,7 +691,7 @@ require ( github.com/DataDog/datadog-agent/pkg/util/common v0.59.0 github.com/DataDog/datadog-agent/pkg/util/containers/image v0.56.2 github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 github.com/DataDog/datadog-agent/pkg/util/flavor v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 github.com/DataDog/datadog-agent/pkg/util/grpc v0.59.0 @@ -702,10 +702,10 @@ require ( github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 github.com/DataDog/datadog-agent/pkg/util/sort v0.59.0 github.com/DataDog/datadog-agent/pkg/util/startstop v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 github.com/DataDog/datadog-agent/pkg/util/testutil v0.59.0 github.com/DataDog/datadog-agent/pkg/util/uuid v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 github.com/DataDog/datadog-agent/pkg/version v0.59.1 github.com/DataDog/go-libddwaf/v3 v3.5.1 github.com/DataDog/go-sqllexer v0.0.20 diff --git a/pkg/api/go.mod b/pkg/api/go.mod index f5c74d8a9d18b..c220d1c0c30b5 100644 --- a/pkg/api/go.mod +++ b/pkg/api/go.mod @@ -42,9 +42,9 @@ require ( github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0 github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 github.com/stretchr/testify v1.10.0 ) @@ -63,10 +63,10 @@ require ( github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/config/env/environment_container_features.go b/pkg/config/env/environment_container_features.go index ffced09b49c61..ebb854289e938 100644 --- a/pkg/config/env/environment_container_features.go +++ b/pkg/config/env/environment_container_features.go @@ -33,4 +33,6 @@ const ( Podman Feature = "podman" // PodResources socket present PodResources Feature = "podresources" + // NVML library present for GPU detection + NVML Feature = "nvml" ) diff --git a/pkg/config/env/environment_containers.go b/pkg/config/env/environment_containers.go index 7dbb0cf9ce58f..4ec4b44f6ee13 100644 --- a/pkg/config/env/environment_containers.go +++ b/pkg/config/env/environment_containers.go @@ -16,6 +16,7 @@ import ( "github.com/DataDog/datadog-agent/pkg/config/model" "github.com/DataDog/datadog-agent/pkg/util/log" + "github.com/DataDog/datadog-agent/pkg/util/system" "github.com/DataDog/datadog-agent/pkg/util/system/socket" ) @@ -29,6 +30,7 @@ const ( defaultPodmanContainersStoragePath = "/var/lib/containers/storage" unixSocketPrefix = "unix://" winNamedPipePrefix = "npipe://" + defaultNVMLLibraryName = "libnvidia-ml.so.1" socketTimeout = 500 * time.Millisecond ) @@ -47,6 +49,7 @@ func init() { registerFeature(CloudFoundry) registerFeature(Podman) registerFeature(PodResources) + registerFeature(NVML) } // IsAnyContainerFeaturePresent checks if any of known container features is present @@ -71,6 +74,7 @@ func detectContainerFeatures(features FeatureMap, cfg model.Reader) { detectCloudFoundry(features, cfg) detectPodman(features, cfg) detectPodResources(features, cfg) + detectNVML(features) } func detectKubernetes(features FeatureMap, cfg model.Reader) { @@ -243,6 +247,19 @@ func detectPodResources(features FeatureMap, cfg model.Reader) { } } +func detectNVML(features FeatureMap) { + // Use dlopen to search for the library to avoid importing the go-nvml package here, + // which is 1MB in size and would increase the agent binary size, when we don't really + // need it for anything else. + if err := system.CheckLibraryExists(defaultNVMLLibraryName); err != nil { + log.Debugf("Agent did not find NVML library: %v", err) + return + } + + features[NVML] = struct{}{} + log.Infof("Agent found NVML library") +} + func getHostMountPrefixes() []string { if IsContainerized() { return []string{"", defaultHostMountPrefix} diff --git a/pkg/config/env/go.mod b/pkg/config/env/go.mod index 14bdcd74d1a31..770d734f095a0 100644 --- a/pkg/config/env/go.mod +++ b/pkg/config/env/go.mod @@ -13,15 +13,17 @@ replace ( require ( github.com/DataDog/datadog-agent/pkg/config/model v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 github.com/DataDog/datadog-agent/pkg/util/system/socket v0.56.0-rc.3 github.com/stretchr/testify v1.10.0 ) require ( - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect @@ -32,6 +34,7 @@ require ( github.com/go-ole/go-ole v1.3.0 // indirect github.com/hashicorp/hcl v1.0.1-vault-5 // indirect github.com/hectane/go-acl v0.0.0-20230122075934-ca0b05cb1adb // indirect + github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect @@ -43,6 +46,8 @@ require ( github.com/spf13/cast v1.7.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/tklauser/go-sysconf v0.3.14 // indirect + github.com/tklauser/numcpus v0.8.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.uber.org/atomic v1.11.0 // indirect golang.org/x/sys v0.29.0 // indirect @@ -52,3 +57,9 @@ require ( ) replace github.com/DataDog/datadog-agent/pkg/version => ../../version + +replace github.com/DataDog/datadog-agent/pkg/util/pointer => ../../util/pointer + +replace github.com/DataDog/datadog-agent/pkg/util/system => ../../util/system + +replace github.com/DataDog/datadog-agent/pkg/util/testutil => ../../util/testutil diff --git a/pkg/config/env/go.sum b/pkg/config/env/go.sum index e35ea74083bfe..59909ceb82e8f 100644 --- a/pkg/config/env/go.sum +++ b/pkg/config/env/go.sum @@ -100,6 +100,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= +github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= @@ -177,6 +179,10 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= +github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= +github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= +github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= diff --git a/pkg/config/mock/go.mod b/pkg/config/mock/go.mod index 6ae52d1b4145b..d83e16fcbd9cc 100644 --- a/pkg/config/mock/go.mod +++ b/pkg/config/mock/go.mod @@ -43,15 +43,15 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/config/remote/go.mod b/pkg/config/remote/go.mod index 6ee7fa66674e9..89a2223f88de7 100644 --- a/pkg/config/remote/go.mod +++ b/pkg/config/remote/go.mod @@ -50,7 +50,7 @@ require ( github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/grpc v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/util/uuid v0.56.0-rc.3 github.com/Masterminds/semver v1.5.0 github.com/benbjohnson/clock v1.3.5 @@ -77,13 +77,13 @@ require ( github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 // indirect github.com/DataDog/datadog-agent/pkg/util/cache v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/datadog-go/v5 v5.6.0 // indirect github.com/DataDog/go-libddwaf/v3 v3.5.1 // indirect @@ -121,7 +121,7 @@ require ( ) require ( - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/go-tuf v1.1.0-0.5.2 github.com/DataDog/viper v1.14.0 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect diff --git a/pkg/config/setup/go.mod b/pkg/config/setup/go.mod index 75ebc10530191..53a1f6890ad40 100644 --- a/pkg/config/setup/go.mod +++ b/pkg/config/setup/go.mod @@ -44,11 +44,11 @@ require ( github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 github.com/stretchr/testify v1.10.0 go.uber.org/fx v1.23.0 gopkg.in/yaml.v2 v2.4.0 @@ -59,8 +59,8 @@ require ( github.com/DataDog/datadog-agent/comp/core/flare/builder v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/comp/core/flare/types v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/comp/def v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect diff --git a/pkg/config/utils/go.mod b/pkg/config/utils/go.mod index c004b3e0a267e..491cc9a2b4cf8 100644 --- a/pkg/config/utils/go.mod +++ b/pkg/config/utils/go.mod @@ -38,7 +38,7 @@ require ( github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 github.com/DataDog/datadog-agent/pkg/config/setup v0.59.0 github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/version v0.59.1 github.com/stretchr/testify v1.10.0 ) @@ -50,14 +50,14 @@ require ( github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect diff --git a/pkg/gpu/testutil/mocks.go b/pkg/gpu/testutil/mocks.go index 009385125600a..d90576972a5a8 100644 --- a/pkg/gpu/testutil/mocks.go +++ b/pkg/gpu/testutil/mocks.go @@ -45,6 +45,9 @@ var GPUCores = []int{DefaultGpuCores, 20, 30, 40, 50, 60, 70} // DefaultGpuUUID is the UUID for the default device returned by the mock var DefaultGpuUUID = GPUUUIDs[0] +// DefaultGPUName is the name for the default device returned by the mock +var DefaultGPUName = "Tesla T4" + // GetDeviceMock returns a mock of the nvml.Device with the given UUID. func GetDeviceMock(deviceIdx int) *nvmlmock.Device { return &nvmlmock.Device{ @@ -57,6 +60,9 @@ func GetDeviceMock(deviceIdx int) *nvmlmock.Device { GetUUIDFunc: func() (string, nvml.Return) { return GPUUUIDs[deviceIdx], nvml.SUCCESS }, + GetNameFunc: func() (string, nvml.Return) { + return DefaultGPUName, nvml.SUCCESS + }, } } diff --git a/pkg/logs/auditor/go.mod b/pkg/logs/auditor/go.mod index fe619764653de..0aca7786f87a0 100644 --- a/pkg/logs/auditor/go.mod +++ b/pkg/logs/auditor/go.mod @@ -47,7 +47,7 @@ require ( github.com/DataDog/datadog-agent/pkg/logs/message v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/sources v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/status/health v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/stretchr/testify v1.10.0 ) @@ -62,15 +62,15 @@ require ( github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/logs/client/go.mod b/pkg/logs/client/go.mod index 8ed35c60d65b9..fd1dd7ae65036 100644 --- a/pkg/logs/client/go.mod +++ b/pkg/logs/client/go.mod @@ -60,7 +60,7 @@ require ( github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/version v0.59.1 github.com/stretchr/testify v1.10.0 golang.org/x/net v0.34.0 @@ -79,16 +79,16 @@ require ( github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/benbjohnson/clock v1.3.5 // indirect diff --git a/pkg/logs/diagnostic/go.mod b/pkg/logs/diagnostic/go.mod index c7a129a64d213..595e737b5ed86 100644 --- a/pkg/logs/diagnostic/go.mod +++ b/pkg/logs/diagnostic/go.mod @@ -64,17 +64,17 @@ require ( github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/logs/message/go.mod b/pkg/logs/message/go.mod index b4cab778ea040..6d0f9b115ab7c 100644 --- a/pkg/logs/message/go.mod +++ b/pkg/logs/message/go.mod @@ -42,7 +42,7 @@ replace ( require ( github.com/DataDog/datadog-agent/comp/logs/agent/config v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/sources v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/stretchr/testify v1.10.0 ) @@ -58,15 +58,15 @@ require ( github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/logs/pipeline/go.mod b/pkg/logs/pipeline/go.mod index 8fa1e035e419c..5236b97787d2e 100644 --- a/pkg/logs/pipeline/go.mod +++ b/pkg/logs/pipeline/go.mod @@ -71,7 +71,7 @@ require ( github.com/DataDog/datadog-agent/pkg/logs/sender v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/status/health v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.0-rc.3 github.com/hashicorp/go-multierror v1.1.1 github.com/stretchr/testify v1.10.0 @@ -94,17 +94,17 @@ require ( github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240816154533-f7f9beb53a42 // indirect github.com/DataDog/viper v1.14.0 // indirect diff --git a/pkg/logs/processor/go.mod b/pkg/logs/processor/go.mod index 280fb195c3456..b8c958f886ee5 100644 --- a/pkg/logs/processor/go.mod +++ b/pkg/logs/processor/go.mod @@ -57,7 +57,7 @@ require ( github.com/DataDog/datadog-agent/pkg/logs/metrics v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/sds v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/sources v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/stretchr/testify v1.10.0 ) @@ -75,16 +75,16 @@ require ( github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240816154533-f7f9beb53a42 // indirect github.com/DataDog/viper v1.14.0 // indirect diff --git a/pkg/logs/sds/go.mod b/pkg/logs/sds/go.mod index e78e3c4ce466c..a838dd4057483 100644 --- a/pkg/logs/sds/go.mod +++ b/pkg/logs/sds/go.mod @@ -52,7 +52,7 @@ require ( github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 github.com/DataDog/datadog-agent/pkg/logs/message v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240816154533-f7f9beb53a42 github.com/stretchr/testify v1.10.0 ) @@ -72,16 +72,16 @@ require ( github.com/DataDog/datadog-agent/pkg/logs/sources v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/logs/sender/go.mod b/pkg/logs/sender/go.mod index 4959d17e7e162..21fcbedf0c375 100644 --- a/pkg/logs/sender/go.mod +++ b/pkg/logs/sender/go.mod @@ -59,7 +59,7 @@ require ( github.com/DataDog/datadog-agent/pkg/logs/sources v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/benbjohnson/clock v1.3.5 github.com/stretchr/testify v1.10.0 ) @@ -78,17 +78,17 @@ require ( github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/logs/sources/go.mod b/pkg/logs/sources/go.mod index f4dd05570d0ee..df42b75450dae 100644 --- a/pkg/logs/sources/go.mod +++ b/pkg/logs/sources/go.mod @@ -41,7 +41,7 @@ replace ( require ( github.com/DataDog/datadog-agent/comp/logs/agent/config v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 github.com/stretchr/testify v1.10.0 ) @@ -57,14 +57,14 @@ require ( github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/logs/util/testutils/go.mod b/pkg/logs/util/testutils/go.mod index 2bc57124e0f83..bf0c4c74e87a3 100644 --- a/pkg/logs/util/testutils/go.mod +++ b/pkg/logs/util/testutils/go.mod @@ -56,16 +56,16 @@ require ( github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/metrics/go.mod b/pkg/metrics/go.mod index 867d03928fc3e..deef82bf384fc 100644 --- a/pkg/metrics/go.mod +++ b/pkg/metrics/go.mod @@ -47,7 +47,7 @@ require ( github.com/DataDog/datadog-agent/pkg/tagset v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/buf v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.22.0 github.com/stretchr/testify v1.10.0 go.uber.org/atomic v1.11.0 @@ -64,16 +64,16 @@ require ( github.com/DataDog/datadog-agent/pkg/config/setup v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.57.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/sort v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/sketches-go v1.4.6 // indirect github.com/DataDog/viper v1.14.0 // indirect diff --git a/pkg/serializer/go.mod b/pkg/serializer/go.mod index 75b4d887ddb56..821f78a0669f9 100644 --- a/pkg/serializer/go.mod +++ b/pkg/serializer/go.mod @@ -78,7 +78,7 @@ require ( github.com/DataDog/datadog-agent/pkg/tagset v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/util/json v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/DataDog/datadog-agent/pkg/version v0.59.1 github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.22.0 github.com/gogo/protobuf v1.3.2 @@ -112,17 +112,17 @@ require ( github.com/DataDog/datadog-agent/pkg/util/buf v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/common v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.57.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/sort v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/mmh3 v0.0.0-20210722141835-012dc69a9e49 // indirect github.com/DataDog/sketches-go v1.4.6 // indirect github.com/DataDog/viper v1.14.0 // indirect diff --git a/pkg/util/flavor/go.mod b/pkg/util/flavor/go.mod index c582fea783d84..912e97bed534f 100644 --- a/pkg/util/flavor/go.mod +++ b/pkg/util/flavor/go.mod @@ -44,15 +44,15 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/util/grpc/go.mod b/pkg/util/grpc/go.mod index f98e62c64f498..98820a711e917 100644 --- a/pkg/util/grpc/go.mod +++ b/pkg/util/grpc/go.mod @@ -37,7 +37,7 @@ replace ( require ( github.com/DataDog/datadog-agent/pkg/api v0.56.0-rc.3 github.com/DataDog/datadog-agent/pkg/proto v0.56.0-rc.3 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/stretchr/testify v1.10.0 golang.org/x/net v0.34.0 @@ -55,14 +55,14 @@ require ( github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/util/http/go.mod b/pkg/util/http/go.mod index 31b552c225306..e66b05154fd58 100644 --- a/pkg/util/http/go.mod +++ b/pkg/util/http/go.mod @@ -33,7 +33,7 @@ replace ( require ( github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0 github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/stretchr/testify v1.10.0 golang.org/x/net v0.34.0 ) @@ -47,14 +47,14 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/util/log/setup/go.mod b/pkg/util/log/setup/go.mod index 6016b33d8a7d4..023577e5217f7 100644 --- a/pkg/util/log/setup/go.mod +++ b/pkg/util/log/setup/go.mod @@ -33,7 +33,7 @@ replace ( require ( github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0 github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 github.com/stretchr/testify v1.10.0 ) @@ -47,14 +47,14 @@ require ( github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/viper v1.14.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect diff --git a/pkg/util/system/dlopen_linux.go b/pkg/util/system/dlopen_linux.go new file mode 100644 index 0000000000000..bfc3e9e273a5e --- /dev/null +++ b/pkg/util/system/dlopen_linux.go @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +//go:build linux && cgo + +package system + +// #cgo LDFLAGS: -ldl +// #include +// #include +import "C" + +import ( + "fmt" + "unsafe" +) + +// CheckLibraryExists checks if a library is available on the system by trying it to +// open with dlopen. It returns an error if the library is not found. This is +// the most direct way to check for a library's presence on Linux, as there are +// multiple sources for paths for library searches, so it's better to use the +// same mechanism that the loader uses. +func CheckLibraryExists(libname string) error { + cname := C.CString(libname) + defer C.free(unsafe.Pointer(cname)) + + // Lazy: resolve undefined symbols as they are needed, avoid loading everything at once + handle := C.dlopen(cname, C.RTLD_LAZY) + if handle == nil { + e := C.dlerror() + var errstr string + if e != nil { + errstr = C.GoString(e) + } + + return fmt.Errorf("could not locate %s: %s", libname, errstr) + } + + defer C.dlclose(handle) + return nil +} diff --git a/pkg/util/system/dlopen_other.go b/pkg/util/system/dlopen_other.go new file mode 100644 index 0000000000000..51a4e1d97c116 --- /dev/null +++ b/pkg/util/system/dlopen_other.go @@ -0,0 +1,16 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +//go:build !linux || !cgo + +package system + +import "errors" + +// CheckLibraryExists checks if a library is available on the system by trying it to +// open with dlopen. It returns an error if the library is not found. +func CheckLibraryExists(_ string) error { + return errors.New("CheckLibrary is not supported on this platform") +} diff --git a/test/new-e2e/tests/gpu/gpu_test.go b/test/new-e2e/tests/gpu/gpu_test.go index 6ba889a89550b..3f43fcdfc93a6 100644 --- a/test/new-e2e/tests/gpu/gpu_test.go +++ b/test/new-e2e/tests/gpu/gpu_test.go @@ -158,3 +158,12 @@ func (v *gpuSuite) TestNvmlMetricsPresent() { } }, 5*time.Minute, 10*time.Second) } + +func (v *gpuSuite) TestWorkloadmetaHasGPUs() { + out, err := v.Env().RemoteHost.Execute("agent workload-list") + v.Require().NoError(err) + v.Contains(out, "=== Entity gpu sources(merged):[runtime] id: ") + if v.T().Failed() { + v.T().Log(out) + } +} diff --git a/test/otel/go.mod b/test/otel/go.mod index f5611d747ace9..a1247fe1e23bf 100644 --- a/test/otel/go.mod +++ b/test/otel/go.mod @@ -162,19 +162,19 @@ require ( github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/cgroups v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/option v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.60.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.0-rc.3 // indirect github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.3 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.60.1 // indirect github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect github.com/DataDog/datadog-api-client-go/v2 v2.33.0 // indirect github.com/DataDog/datadog-go/v5 v5.6.0 // indirect