Skip to content
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

Switch ros2 doctor to using psutil for network checks. #687

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

clalancette
Copy link
Contributor

ifcfg has a couple of different problems. The first is that
the code literally calls 'ifconfig' and parses the output. While
this generally works, it is pretty ugly. For those reasons,
Debian has specifically excluded it.

Instead, switch to psutil to get information about the network
interfaces on the system (at least, on POSIX). This gets us
all of the information we had before, but using ioctl's instead.

Note that we can't actually get any flags from psutil at the
moment. There is a PR open upstream to get this information,
but since it is not going to be available soon we implement
the equivalent thing in Python by using fcntl.ioctl.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

This will also require a change to CI to install psutil on Windows; PR for that will be upcoming. @nuclearsandwich @j-rivero FYI

ifcfg has a couple of different problems.  The first is that
the code literally calls 'ifconfig' and parses the output.  While
this generally works, it is pretty ugly.  For those reasons,
Debian has specifically excluded it.

Instead, switch to psutil to get information about the network
interfaces on the system (at least, on POSIX).  This gets us
all of the information we had before, but using ioctl's instead.

Note that we can't actually get any flags from psutil at the
moment.  There is a PR open upstream to get this information,
but since it is not going to be available soon we implement
the equivalent thing in Python by using fcntl.ioctl.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

CI for this is in ros2/ci#609 (comment) .

@clalancette clalancette merged commit cc5d6b1 into master Jan 24, 2022
@delete-merged-branch delete-merged-branch bot deleted the clalancette/remove-ifcfg branch January 24, 2022 22:10
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-2-tsc-meeting-january-20th-2022/23986/1

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.

None yet

3 participants