-
Notifications
You must be signed in to change notification settings - Fork 164
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
Skip marking Com port as a zedrouterport #4482
Conversation
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.
This fixes the immediate issue and leaves us time to figure out why we don't set ifname for WLAN and WWAN interfaces.
But logically it makes sense to check for types.IoNet* - things that are not of those types should never have isPort set.
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.
Let's go ahead and merge this now given testing and time constraints.
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.
LGTM from my side
@andrewd-zededa , I would add a comment to the code regarding the IsPort() issue (that still needs to be fixed).... worth to put it in the commit message as well (and get rid of the lint error).... Are other I/O adapter types (specially HDMI) susceptible to the same issue? |
Note that the device with the original failure has this in /run/zedagent/PhysicalIOAdapterList/*.json: The fact that this has an empty ifname and is a management port (FWIW app-shared would cause the same issue) means that the original IsPort will declare that all ports with an empty ifname will match. |
Skip over HDMI, COM. IsPort only checks Ifname which can incorrectly flag non-net devices as a port. Signed-off-by: Andrew Durbin <[email protected]>
1326f5d
to
6ac0402
Compare
@rene @eriknordmark moved to using ib.Type.IsNet() to broaden this check to all non-net devices. |
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.
LGTM
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4482 +/- ##
==========================================
- Coverage 20.93% 20.90% -0.03%
==========================================
Files 13 13
Lines 2895 2894 -1
==========================================
- Hits 606 605 -1
Misses 2163 2163
Partials 126 126 ☔ View full report in Codecov by Sentry. |
An alternate fix to PR #4460