Skip to content

feat(blockdevice): added sysblockdevicesize method and test#650

Closed
fs185143 wants to merge 6 commits intoprometheus:masterfrom
fs185143:blockdevice-size
Closed

feat(blockdevice): added sysblockdevicesize method and test#650
fs185143 wants to merge 6 commits intoprometheus:masterfrom
fs185143:blockdevice-size

Conversation

@fs185143
Copy link
Contributor

@fs185143 fs185143 commented Jul 3, 2024

In part to support prometheus/node_exporter#3068, I have added a new method that retrieves the value of /sys/block/<device>/size

@fs185143
Copy link
Contributor Author

fs185143 commented Jul 3, 2024

need to add blockdevice/testdata/fixtures/sys/block/sda/size as 3750748848

edit: i believe i did this in 8dc60f1

if err != nil {
return 0, err
}
return 512 * size, nil
Copy link
Member

Choose a reason for hiding this comment

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

Let's make this a const SectorSize

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fs185143 fs185143 requested a review from discordianfish July 15, 2024 10:19
@fs185143
Copy link
Contributor Author

just following up on this cc @discordianfish

@fs185143
Copy link
Contributor Author

just following up on this cc @discordianfish

or cc @SuperQ

@fs185143
Copy link
Contributor Author

hey could I get a review on this please? any idea who might be best to take a look @dswarbrick

@dswarbrick
Copy link
Contributor

@fs185143 You'll have better luck attracting the attention of maintainers if all CI tests are green, plus all commits need to be signed off to comply with the DCO.

@fs185143
Copy link
Contributor Author

closing in favour of #658 (fixed issues like DCO)

@fs185143 fs185143 closed this Aug 14, 2024
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.

3 participants