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

Fix init node transport interface bug #2670

Merged
merged 1 commit into from
Aug 30, 2021
Merged

Fix init node transport interface bug #2670

merged 1 commit into from
Aug 30, 2021

Conversation

Jexf
Copy link
Member

@Jexf Jexf commented Aug 28, 2021

1.Fix adding node routes crash bug, which caused by uninitialized DualStackIPs param.

2.Fix ipv4 address and ipv6 address confused bug and return the first ipv4 and ipv6 ips for transport interface.

Fixes #2665

Signed-off-by: Wu zhengdong [email protected]

Jexf pushed a commit to Jexf/antrea that referenced this pull request Aug 28, 2021
1.Fix adding node routes crash bug, which caused by uninitialized DualStackIPs
param.

2.Fix ipv4 address and ipv6 address confused bug and return the first ipv4 and
ipv6 ips for transport interface.

Signed-off-by: Wu zhengdong <[email protected]>
Jexf pushed a commit to Jexf/antrea that referenced this pull request Aug 28, 2021
1.Fix adding node routes crash bug, which caused by uninitialized DualStackIPs
param.

2.Fix ipv4 address and ipv6 address confused bug and return the first ipv4 and
ipv6 ips for transport interface.

Signed-off-by: Wu zhengdong <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2021

Codecov Report

Merging #2670 (320f85c) into main (04619b6) will increase coverage by 4.99%.
The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2670      +/-   ##
==========================================
+ Coverage   60.66%   65.66%   +4.99%     
==========================================
  Files         285      285              
  Lines       22997    26351    +3354     
==========================================
+ Hits        13951    17303    +3352     
+ Misses       7545     7433     -112     
- Partials     1501     1615     +114     
Flag Coverage Δ
e2e-tests 57.09% <25.00%> (?)
kind-e2e-tests 48.41% <25.00%> (+0.05%) ⬆️
unit-tests 41.05% <25.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/util/net.go 47.05% <0.00%> (+10.69%) ⬆️
...gent/controller/noderoute/node_route_controller.go 62.21% <100.00%> (+6.87%) ⬆️
pkg/controller/egress/ipallocator/allocator.go 65.00% <0.00%> (-15.42%) ⬇️
pkg/controller/networkpolicy/endpoint_querier.go 77.64% <0.00%> (-13.79%) ⬇️
pkg/legacyapis/core/v1alpha2/register.go 69.23% <0.00%> (-10.77%) ⬇️
pkg/apis/stats/register.go 71.42% <0.00%> (-10.39%) ⬇️
pkg/legacyapis/stats/register.go 71.42% <0.00%> (-10.39%) ⬇️
pkg/ovs/openflow/ofctrl_meter.go 33.84% <0.00%> (-10.16%) ⬇️
pkg/legacyapis/security/v1alpha1/register.go 73.33% <0.00%> (-10.00%) ⬇️
.../registry/networkpolicy/clustergroupmember/rest.go 78.26% <0.00%> (-9.98%) ⬇️
... and 271 more

1.Fix adding node routes crash bug, which caused by uninitialized DualStackIPs
param.

2.Fix ipv4 address and ipv6 address confused bug and return the first ipv4 and
ipv6 ips for transport interface.

Signed-off-by: Wu zhengdong <[email protected]>
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

@Jexf thanks for catching the issues before it's released!

Apparently the corresponding change #2436 is lack of unit tests to cover the two functions.

I will first merge this to fix the bug. @Jexf It would be great if you could have another PR to help fix the unit tests for the two functions so the error won't happen again. Please let me know if you feel ok to do it, or I would request @lzhecheng to follow up.

@tnqn
Copy link
Member

tnqn commented Aug 30, 2021

/test-all

@tnqn tnqn requested a review from lzhecheng August 30, 2021 05:23
@Jexf
Copy link
Member Author

Jexf commented Aug 30, 2021

@Jexf thanks for catching the issues before it's released!

Apparently the corresponding change #2436 is lack of unit tests to cover the two functions.

I will first merge this to fix the bug. @Jexf It would be great if you could have another PR to help fix the unit tests for the two functions so the error won't happen again. Please let me know if you feel ok to do it, or I would request @lzhecheng to follow up.

Thank you for reminding me, I will add unit tests for the two functions in another PR.

@lzhecheng
Copy link
Contributor

/test-windows-e2e /test-windows-networkpolicy

@tnqn tnqn merged commit e13111e into antrea-io:main Aug 30, 2021
antoninbas pushed a commit to antoninbas/antrea that referenced this pull request Aug 30, 2021
1.Fix adding node routes crash bug, which caused by uninitialized DualStackIPs
param.

2.Fix ipv4 address and ipv6 address confused bug and return the first ipv4 and
ipv6 ips for transport interface.

Signed-off-by: Wu zhengdong <[email protected]>
antoninbas added a commit that referenced this pull request Aug 31, 2021
1.Fix adding node routes crash bug, which caused by uninitialized DualStackIPs
param.

2.Fix ipv4 address and ipv6 address confused bug and return the first ipv4 and
ipv6 ips for transport interface.

Signed-off-by: Wu zhengdong <[email protected]>

Co-authored-by: Wu zhengdong <[email protected]>
@Jexf Jexf deleted the bugfix branch December 8, 2021 02:26
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.

Add node routes crash bug when configure TransportInterface
4 participants