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

Environment::nodeId Should Throw SystemException When Node ID is 0 #4328

Closed
aleks-f opened this issue Dec 7, 2023 Discussed in #4326 · 3 comments
Closed

Environment::nodeId Should Throw SystemException When Node ID is 0 #4328

aleks-f opened this issue Dec 7, 2023 Discussed in #4326 · 3 comments
Assignees

Comments

@aleks-f
Copy link
Member

aleks-f commented Dec 7, 2023

Discussed in #4326

Originally posted by andrewauclair December 7, 2023
We've had a few issues with this recently. If the Environment_UNIX.cpp EnvironmentImpl::nodeIdImpl fails to find a node ID it simply leaves the node ID as all 0's. A similar thing appears to happen on Windows. We then assume that this is a valid ID and use it. Some parts of our system end up getting 0's and other parts get a valid node ID and fail to communicate.

I think that this would work better if a SystemException was thrown when nodeIdImpl fails to set a value.

@aleks-f aleks-f added the bug label Dec 7, 2023
@aleks-f aleks-f added this to the Release 1.13.0 milestone Dec 7, 2023
@aleks-f
Copy link
Member Author

aleks-f commented Dec 7, 2023

I think that this would work better if a SystemException was thrown when nodeIdImpl fails to set a value.

The documentation says if it can't find an ethernet adapter, but it should throw if it can not produce nodeId for any reason.

@andrewauclair please create a PR, and @matejk and myself will review

@andrewauclair
Copy link
Contributor

Sounds good. One of my coworkers just happened to run into the Windows issue I mentioned. It looks like our Dell laptops only have wifi adapters and no ethernet adapters. The win32 nodeIdImpl only looks for ethernet adapters. Not sure what a good solution would be for this. Going to give it some thought.

@obiltschnig
Copy link
Member

obiltschnig commented Dec 7, 2023

EnvironmentImpl::nodeIdImpl() should be changed to also look for WiFi adapters if no Ethernet adapter was found.
And throw only if neither an Ethernet nor a WiFi adapter could be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants