Skip to content

PMM-7 procfs migration to v0.15.1#220

Merged
ademidoff merged 8 commits into
mainfrom
PMM-7-procfs-migration-0.15.1
May 26, 2026
Merged

PMM-7 procfs migration to v0.15.1#220
ademidoff merged 8 commits into
mainfrom
PMM-7-procfs-migration-0.15.1

Conversation

@ademidoff

Copy link
Copy Markdown
Member

Dependabot was not able to bump procfs on its own because it required a couple of changes to the code. This PR both bumps up the version and fixes the migration issues.

@ademidoff ademidoff requested a review from a team as a code owner May 26, 2026 12:49
@ademidoff ademidoff requested review from 4nte and maxkondr and removed request for a team May 26, 2026 12:49
Comment thread collector/utils/utils.go

package utils

func SafeDereference[T any](s ...*T) []T {

@ademidoff ademidoff May 26, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is taken from upstream so we don't run into conflicts when rebasing.

c.pushCounter(ch, "loss_of_signal_total", host.Counters.LossOfSignalCount, host.Name)
c.pushCounter(ch, "nos_total", host.Counters.NosCount, host.Name)
c.pushCounter(ch, "fcp_packet_aborts_total", host.Counters.FCPPacketAborts, host.Name)
// Note: `procfs` guarantees these a safe dereference for these counters.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We restore a bad attempt to fix the issue in a prior commit, so it now matches the usptream.

level.Debug(c.logger).Log("msg", "Skipping duplicate device entry", "device", deviceIdentifier)
continue
for k := range stats.Transport {
deviceIdentifier := nfsDeviceIdentifier{m.Device, stats.Transport[k].Protocol, mountAddress}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the breaking change from upstream (in minor version!).

Comment thread Makefile.common
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.56.2
GOLANGCI_LINT_VERSION ?= v2.6.1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was missed in the migration to v2.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current version is 2.12.2

@ademidoff ademidoff merged commit 90126e7 into main May 26, 2026
5 checks passed
@ademidoff ademidoff deleted the PMM-7-procfs-migration-0.15.1 branch May 26, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants