-
Notifications
You must be signed in to change notification settings - Fork 367
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
[flexible-ipam] Add e2e for StatefulSet #3146
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3146 +/- ##
==========================================
- Coverage 59.45% 50.80% -8.66%
==========================================
Files 298 495 +197
Lines 25589 54062 +28473
==========================================
+ Hits 15215 27467 +12252
- Misses 8738 24283 +15545
- Partials 1636 2312 +676
Flags with carried forward coverage won't be shown. Click here to find out more.
|
4e98a77
to
ab7ab60
Compare
4fb6fdd
to
2bf8a9b
Compare
3eb39be
to
d5f92dc
Compare
expectedIPAddressJson, _ := json.Marshal(expectedIPAddressMap) | ||
tb.Logf("expectedIPAddressMap: %s", expectedIPAddressJson) | ||
|
||
err = wait.Poll(time.Second*5, defaultTimeout, func() (bool, error) { |
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.
Isn't the pool status updated immediately in CNI Add? why would there be a delay to see it includes the IPs?
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.
Yes, but we cannot guarantee the StatefulSet update/delete process is finished when we call this function. This script will only send a StatefulSet create/update/delete request, and we need to wait a small period for the whole process.
Signed-off-by: gran <gran@vmware.com>
@@ -887,7 +894,7 @@ func (data *TestData) restartCoreDNSPods(timeout time.Duration) error { | |||
if err := data.clientset.CoreV1().Pods(antreaNamespace).DeleteCollection(context.TODO(), deleteOptions, listOptions); err != nil { | |||
return fmt.Errorf("error when deleting all CoreDNS Pods: %v", err) | |||
} | |||
return data.waitForCoreDNSPods(timeout) | |||
return retryOnConnectionLostError(retry.DefaultRetry, func() error { return data.waitForCoreDNSPods(timeout) }) |
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.
Is this new? Please add a comment to explain why it would happen or move it to another PR if this is not related
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.
Sure. Added comments at the function retryOnConnectionLostError
.
This issue happens intermittently after antrea-agent restarted and AntreaIPAM enabled, because the Node uplink network is changed during antrea-agent starting/stopping.
Signed-off-by: gran <gran@vmware.com>
/test-all |
/test-flexible-ipam-e2e |
/test-integration |
/test-integration |
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
* [flexible-ipam] Add e2e for StatefulSet Signed-off-by: gran <gran@vmware.com> * [flexible-ipam] Fix e2e connection lost error Signed-off-by: gran <gran@vmware.com>
This PR requires #3141 merged first.