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

eni watcher: retry in first reconciliation loop #2581

Merged
merged 1 commit into from
Aug 20, 2020
Merged

Conversation

fenxiong
Copy link
Contributor

Summary

Let eni watcher retry acknowledging ENI in its first reconciliation.

Under certain scenario, the ENI is attached before agent starts and connects to ACS, and as a result, when the watcher detects the ENI in the first reconciliation loop we did not acknowledge it. This causes us to wait for the next loop, causing 25s+ delay in acknowledging the ENI. Adding retry fixes the delay.

Implementation details

Update reconcileOnce method to take an argument on whether to retry or not, and retry in the first reconciliation.

Testing

Added unit test. Manual test has been performed to make sure the delay of confirming ENI attachment is addressed by the change.

New tests cover the changes: yes

Description for the changelog

N/A

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

// This can happen in two scenarios: (1) the ENI is indeed not managed by ECS (i.e. attached manually
// by customer); (2) this is an ENI attached by ECS but we have not yet received its information from
// ACS.
log.Debugf("Not sending state change because the ENI is not managed by ECS: %v", sendErr)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: is "ENI is not managed by ECS" message valid if it's the second case? i think it might create customer confusion.

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 updated it to "Not sending state change because we don't know about the ENI". not sure if that sounds better?

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

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.

None yet

4 participants