Skip to content

feat: support sysfs.Mdraids with Intel VROC#777

Open
dongjiang1989 wants to merge 3 commits into
prometheus:masterfrom
dongjiang1989:fix-771
Open

feat: support sysfs.Mdraids with Intel VROC#777
dongjiang1989 wants to merge 3 commits into
prometheus:masterfrom
dongjiang1989:fix-771

Conversation

@dongjiang1989

Copy link
Copy Markdown
Contributor

Closes: #771

@dongjiang1989 dongjiang1989 changed the title feat: support sys.Mdraid with Intel VROC feat: support sysfs.Mdraids with Intel VROC Jan 9, 2026
@dongjiang1989 dongjiang1989 force-pushed the fix-771 branch 4 times, most recently from f566329 to 3efbe8c Compare January 12, 2026 07:25
@dongjiang1989

Copy link
Copy Markdown
Contributor Author

cc @NeonSludge

@dongjiang1989

Copy link
Copy Markdown
Contributor Author

@SuperQ PTAL, thanks

@discordianfish discordianfish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

Comment thread sysfs/mdraid.go
dongjiang1989 added a commit to dongjiang1989/procfs that referenced this pull request Jun 22, 2026
- Change Mdraid.Disks from uint64 to *uint64 to distinguish unavailable
  (nil) from zero disks, addressing review feedback on PR prometheus#777.
- Handle empty level file explicitly (case "") to avoid parsing empty
  raid_disks (node_exporter#3528).
- Support reshape format "current (previous)" (e.g. "11 (10)") in
  raid_disks during grow/reshape operations.
- Distinguish file read errors (returned) from empty/unparseable content
  (Disks set to nil).

Closes: prometheus#771
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Signed-off-by: dongjiang <dongjiang1989@126.com>
- Change Mdraid.Disks from uint64 to *uint64 to distinguish unavailable
  (nil) from zero disks, addressing review feedback on PR prometheus#777.
- Handle empty level file explicitly (case "") to avoid parsing empty
  raid_disks (node_exporter#3528).
- Support reshape format "current (previous)" (e.g. "11 (10)") in
  raid_disks during grow/reshape operations.
- Distinguish file read errors (returned) from empty/unparseable content
  (Disks set to nil).

Closes: prometheus#771
Signed-off-by: dongjiang <dongjiang1989@126.com>
Resolve conflict in blockdevice/stats_test.go:
- Update device count from 14 to 16 (added md7 container, md8 reshape)
- Update sda device index from 9 to 11 in all tests
- Include new TestSysBlockDeviceRotational from upstream
@dongjiang1989

Copy link
Copy Markdown
Contributor Author

Updated
cc @toffiebotha @SuperQ Please re-check it

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.

sysfs.Mdraids() produces a parsing error on a host with Intel VROC

4 participants