Skip to content

[Linux] convert /dev/root device to real path (fixes #1999)#2000

Merged
giampaolo merged 16 commits into
masterfrom
root-fs-device
Oct 14, 2021
Merged

[Linux] convert /dev/root device to real path (fixes #1999)#2000
giampaolo merged 16 commits into
masterfrom
root-fs-device

Conversation

@giampaolo

Copy link
Copy Markdown
Owner

Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
Signed-off-by: Giampaolo Rodola <[email protected]>
@giampaolo giampaolo changed the title [Linux] convert /dev/rootfs device (fixes #1999) [Linux] convert /dev/root device (fixes #1999) Oct 14, 2021
@giampaolo giampaolo changed the title [Linux] convert /dev/root device (fixes #1999) [Linux] convert /dev/root device to real path (fixes #1999) Oct 14, 2021
@giampaolo
giampaolo merged commit 4d03c91 into master Oct 14, 2021
@giampaolo
giampaolo deleted the root-fs-device branch October 14, 2021 19:34
@albertvaka

albertvaka commented Oct 14, 2021

Copy link
Copy Markdown

I can confirm this fixes the original issue for me 😄

Is there a date for a future release that includes this change?

albertvaka added a commit to DataDog/datadog-agent that referenced this pull request Oct 19, 2021
Backport of upstream PR: giampaolo/psutil#2000

On some Linux setups (eg: default Ubuntu 20.04 AWS instances), psutils
would return /dev/root instead of the actual block device (eg: /dev/xvda).

When using the `tag_by_label` option, the disk check tries to match the
output of psutil with the output of `lsblk` or `blkid` to find disk labels.
However, these return the actual path instead of /dev/root, resulting in
missing tags.
albertvaka added a commit to DataDog/datadog-agent that referenced this pull request Oct 19, 2021
Backport of upstream PR: giampaolo/psutil#2000

On some Linux setups (eg: default Ubuntu 20.04 AWS instances), psutils
would return /dev/root instead of the actual block device (eg: /dev/xvda).

When using the tag_by_label option, the disk check tries to match the
output of psutil with the output of lsblk or blkid to find disk labels.
However, these return the actual path instead of /dev/root, resulting in
missing tags.
zandrewitte pushed a commit to StackVista/stackstate-agent that referenced this pull request Nov 17, 2022
Backport of upstream PR: giampaolo/psutil#2000

On some Linux setups (eg: default Ubuntu 20.04 AWS instances), psutils
would return /dev/root instead of the actual block device (eg: /dev/xvda).

When using the tag_by_label option, the disk check tries to match the
output of psutil with the output of lsblk or blkid to find disk labels.
However, these return the actual path instead of /dev/root, resulting in
missing tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux] psutil.disk_partitions() returns /dev/root on Ubuntu 20.04 on AWS

2 participants