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

Time to remove LISP, overlay, and underlay docs and names #3516

Merged
merged 6 commits into from
Oct 24, 2023

Conversation

eriknordmark
Copy link
Contributor

@eriknordmark eriknordmark commented Oct 23, 2023

A long time ago we had integrated LISP secure overlay network code, and as a result zedrouter had functions and variables named "underlay*" or "ul*".

I noticed we still have some text left in SECURITY.md so I did a pass over the code.

Note that there are several commits with different potential for merge conflicts with existing work; the "underlay" commit with "ul*" renames is the one most likely to cause such issues. Note that the Underlay struct is renamed to AppNetAdapter{Config,Status} but I'm open to other name suggestions.

The underlay term still remains for the geolocation code and API, but added comments explaining that this is the underlay/public IP address.

Let me know if this is a good time to do this cleanup or if it will cause conflicts with ongoing network work and should be deferred.

for i := range status.UnderlayNetworkList {
ul := &status.UnderlayNetworkList[i]
func (status AppNetworkStatus) GetULStatusForNI(netUUID uuid.UUID) []*AppNetAdapterStatus {
var uls []*AppNetAdapterStatus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also rename uls and ul variables (there are several occurrences of them across the code base)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps uls->adapters, ul -> adapter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used ana elsewhere but missed this. adapters makes sense here.
Do you think adapter is more clear elsewhere where I'm using ana?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that I would prefer adapter, but ana is fine too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I added those changes plus some other changes in three additional commits. If that looks OK I'll squash them into the commit with the underlay rename.

Also, I had a question about this use of underlay:
nireconciler/genericitems/radvd.go:# Low preference to allow underlay to have high preference default
nireconciler/genericitems/radvd.go:# TBD but preference is high. To which underlay does it refer?
Is this a comment which was copied from older code? If so then it refers to IPv6 LISP overlay. And I don't see code which sets a low preference. So maybe I should drop that comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was just copied and can be removed.

DisplayName string
Activate bool
GetStatsIPAddr net.IP
AppNetAdapterList []AppNetAdapterConfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using the plural AppNetAdapters and avoid List at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't feel like changing those as part of the PR. And there is a question whether one can be more confused hence risk creating bugs due to the less visible single character "s" vs "List", or whether the compiler will catch such confusing since the types will not match.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@milan-zededa
Copy link
Contributor

I think we can go ahead with this - I will rebase #3513 and fix merge conflicts once this is merged.

@milan-zededa
Copy link
Contributor

Note that some workflows are currently failing because of this issue: golang/go#63684

Copy link
Member

@uncleDecart uncleDecart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, +1 to change names

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 89 lines in your changes are missing coverage. Please review.

Comparison is base (67cb511) 20.51% compared to head (c042831) 20.52%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3516   +/-   ##
=======================================
  Coverage   20.51%   20.52%           
=======================================
  Files         209      208    -1     
  Lines       45391    45377   -14     
=======================================
- Hits         9314     9313    -1     
+ Misses      35397    35383   -14     
- Partials      680      681    +1     
Files Coverage Δ
pkg/pillar/dpcmanager/dpcmanager.go 71.96% <100.00%> (ø)
pkg/pillar/nireconciler/genericitems/radvd.go 0.00% <ø> (ø)
pkg/pillar/nireconciler/linux_acl.go 86.45% <100.00%> (ø)
pkg/pillar/nireconciler/linux_config.go 90.13% <100.00%> (ø)
pkg/pillar/nireconciler/linux_reconciler.go 77.03% <100.00%> (ø)
pkg/pillar/types/zedmanagertypes.go 0.00% <0.00%> (ø)
pkg/pillar/types/zedroutertypes.go 4.04% <46.15%> (-0.96%) ⬇️
pkg/pillar/cmd/zedagent/handleconfig.go 0.00% <0.00%> (ø)
pkg/pillar/cmd/zedagent/handlemetrics.go 0.00% <0.00%> (ø)
pkg/pillar/cmd/zedagent/parseconfig.go 23.86% <0.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: eriknordmark <erik@zededa.com>
Signed-off-by: eriknordmark <erik@zededa.com>
Signed-off-by: eriknordmark <erik@zededa.com>
We have removed LISP and the default overlay, but the underlay remains.
Replacing UnderlayNetwork* with AppNetAdapter*, and ul* with adapter*.
Fixed some yetus complaints.

Signed-off-by: eriknordmark <erik@zededa.com>
Signed-off-by: eriknordmark <erik@zededa.com>
Signed-off-by: eriknordmark <erik@zededa.com>
@eriknordmark eriknordmark merged commit 5616c5c into lf-edge:master Oct 24, 2023
21 of 29 checks passed
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.

4 participants