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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
66 changes: 34 additions & 32 deletions src/control/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,54 @@ module github.com/daos-stack/daos/src/control
// - rpm packaging version checks: utils/rpms/daos.spec
// - debian packaging version checks: debian/control
// Scons uses this file to extract the minimum version.
go 1.21
toolchain go1.23.0
go 1.24.0

require (
github.com/Jille/raft-grpc-transport v1.2.0
github.com/desertbit/grumble v1.1.3
github.com/dustin/go-humanize v1.0.0
github.com/google/go-cmp v0.6.0
github.com/Jille/raft-grpc-transport v1.6.1
github.com/desertbit/columnize v2.1.0+incompatible
github.com/desertbit/go-shlex v0.1.1
github.com/desertbit/grumble v1.2.0
github.com/dustin/go-humanize v1.0.1
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-hclog v1.2.2
github.com/hashicorp/raft v1.3.9
github.com/hashicorp/raft-boltdb/v2 v2.0.0-20210409134258-03c10cc3d4ea
github.com/jessevdk/go-flags v1.5.0
github.com/hashicorp/go-hclog v1.6.3
github.com/hashicorp/raft v1.7.3
github.com/hashicorp/raft-boltdb/v2 v2.3.1
github.com/jessevdk/go-flags v1.6.1
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.2
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.32.1
go.etcd.io/bbolt v1.3.5
golang.org/x/net v0.38.0
golang.org/x/sys v0.31.0
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
google.golang.org/grpc v1.66.2
google.golang.org/protobuf v1.34.1
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/client_model v0.6.2
github.com/prometheus/common v0.67.5
go.etcd.io/bbolt v1.4.3
golang.org/x/net v0.49.0
golang.org/x/sys v0.40.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20260112192933-99fd39fd28a9
google.golang.org/grpc v1.78.0
google.golang.org/protobuf v1.36.11
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/armon/go-metrics v0.4.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/boltdb/bolt v1.3.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/desertbit/closer/v3 v3.1.2 // indirect
github.com/desertbit/columnize v2.1.0+incompatible // indirect
github.com/desertbit/go-shlex v0.1.1 // indirect
github.com/desertbit/closer/v3 v3.7.5 // indirect
github.com/desertbit/readline v1.5.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-metrics v0.5.4 // indirect
github.com/hashicorp/go-msgpack v1.1.5 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-msgpack/v2 v2.1.5 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
golang.org/x/text v0.23.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/text v0.33.0 // indirect
)
540 changes: 207 additions & 333 deletions src/control/go.sum

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/control/lib/control/telemetry.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// (C) Copyright 2021-2024 Intel Corporation.
// (C) Copyright 2026 Hewlett Packard Enterprise Development LP
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand All @@ -17,6 +18,7 @@ import (
"github.com/pkg/errors"
pclient "github.com/prometheus/client_model/go"
"github.com/prometheus/common/expfmt"
"github.com/prometheus/common/model"
)

// pbMetricMap is the map returned by the prometheus scraper.
Expand Down Expand Up @@ -48,7 +50,7 @@ func scrapeMetrics(ctx context.Context, req httpGetter) (pbMetricMap, error) {
return nil, err
}

parser := expfmt.TextParser{}
parser := expfmt.NewTextParser(model.LegacyValidation)
reader := strings.NewReader(string(body))
result, err := parser.TextToMetricFamilies(reader)
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion src/control/lib/control/telemetry_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// (C) Copyright 2021-2024 Intel Corporation.
// (C) Copyright 2026 Hewlett Packard Enterprise Development LP
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand All @@ -21,6 +22,7 @@ import (
pclient "github.com/prometheus/client_model/go"
"github.com/prometheus/common/expfmt"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/testing/protocmp"

"github.com/daos-stack/daos/src/control/common/test"
"github.com/daos-stack/daos/src/control/lib/daos"
Expand Down Expand Up @@ -199,7 +201,7 @@ func TestControl_scrapeMetrics(t *testing.T) {
result, err := scrapeMetrics(test.Context(t), req)

test.CmpErr(t, tc.expErr, err)
if diff := cmp.Diff(tc.expResult, result); diff != "" {
if diff := cmp.Diff(tc.expResult, result, protocmp.Transform()); diff != "" {
t.Fatalf("unexpected response (-want, +got):\n%s\n", diff)
}
})
Expand Down
12 changes: 10 additions & 2 deletions src/control/lib/spdk/nvme_stubs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// (C) Copyright 2022 Intel Corporation.
// (C) Copyright 2025 Hewlett Packard Enterprise Development LP
// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand All @@ -10,6 +10,10 @@
package spdk

import (
"os"

"github.com/pkg/errors"

"github.com/daos-stack/daos/src/control/logging"
"github.com/daos-stack/daos/src/control/server/storage"
)
Expand All @@ -31,5 +35,9 @@ func (n *NvmeImpl) Update(log logging.Logger, ctrlrPciAddr string, path string,

// Clean removes SPDK lockfiles.
func (n *NvmeImpl) Clean(log logging.Logger, pciAddrChecker LockfileAddrCheckFn) ([]string, error) {
return []string{}, nil
if n == nil {
return nil, errors.New("nil NvmeImpl")
}

return cleanLockfiles(log, n.LocksDir, pciAddrChecker, os.Remove)
}
3 changes: 3 additions & 0 deletions src/control/system/raft/hclogger.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// (C) Copyright 2020-2022 Intel Corporation.
// (C) Copyright 2026 Hewlett Packard Enterprise Development LP
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand Down Expand Up @@ -125,6 +126,8 @@ func (hcl *hcLogger) ResetNamed(name string) hclog.Logger {

func (hcl *hcLogger) SetLevel(level hclog.Level) {}

func (hcl *hcLogger) GetLevel() hclog.Level { return hclog.Debug }

func (hcl *hcLogger) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger {
return log.New(hcl.StandardWriter(opts), "", 0)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading