-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix info --resources for wwan devices #12281
Conversation
b081da7
to
ccbc667
Compare
378b628
to
5032211
Compare
5032211
to
4fcb14c
Compare
@skatsaounis did you want a review of this? If so please can you mark it as ready for review. Thanks :) |
4fcb14c
to
51c371a
Compare
@tomponline PR is ready for review. Please take a look :) |
Before change: $ lxc info --resources
Error: Failed to retrieve network information: Failed to add device information for "/sys/class/net/wwan0/device": Failed to read "/sys/class/net/wwan0/device/device": read /sys/class/net/wwan0/device/device: is a directory After the change: $ lxc info --resources
...
NICs:
...
Card 1:
NUMA node: 0
Vendor: Intel Corporation (8086)
PCI address: 0000:08:00.0
Driver: iosm (6.2.0-33-generic)
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you update the PR description with what has changed in this PR so I can understand and review. Thanks
Signed-off-by: Stamatis Katsaounis <stamatis.katsaounis@canonical.com>
51c371a
to
10f6cd4
Compare
Comments and descriptions have been added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR recursively expands the device directory path of
sys/class/net
devices by appending/device
until the it finds adevice
regular file as a child.This is needed for devices like wwan which include sub-devices and they differ from typical
sys/class/net
devices. For such kind of devices, the net info is present at the top./device
directory but rest information needed to fillCard
struct is located at./device/device
.Please take a look below for more info:
Fixes #12153