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

WaitUntilNetworkInterfaceAvailableWithContext does not block with InvalidNetworkInterfaceID.NotFound error #4282

Closed
3 tasks done
mzampetakis opened this issue Feb 17, 2022 · 4 comments
Labels
bug This issue is a bug. p3 This is a minor priority issue

Comments

@mzampetakis
Copy link

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Invoking WaitUntilNetworkInterfaceAvailableWithContext with a non existing Network ID
returns immediately with an error. The same happens in cases that Network is not available (e.g. right after the CreateNetworkInterface invocation). I would expect that WaitUntilNetworkInterfaceAvailableWithContext blocks for a period of time (10 attempts * 20" by default) until it fails with a ResourceNotReady error.
Currently the error returned is InvalidNetworkInterfaceID.NotFound.

Version of AWS SDK for Go?
1.42.9

Version of Go (go version)?
go version go1.17.3 darwin/amd64

To Reproduce (observed behavior)

someID := "eni-1234567890"
err = e.svc.WaitUntilNetworkInterfaceAvailableWithContext(aws.BackgroundContext(),
  &ec2.DescribeNetworkInterfacesInput{
	NetworkInterfaceIds: []*string{
		&someID,
	},
})
if err != nil {
  log.Error("Network interface ", someID, " did not become available after creation. Err: ", err)
  return nil, err
}

Expected behavior
In the code presented above, I would expect having the WaitUntilNetworkInterfaceAvailableWithContext to block the execution for the whole period of the polling time (10 attempts * 20") as the Network is not found (as it has not even created). But instead of this, it immediately returns an error with type InvalidNetworkInterfaceID.NotFound.

Additional context
The same issue affects the WaitUntilNetworkInterfaceAvailable which directly invokes the WaitUntilNetworkInterfaceAvailableWithContext.
The possible solution to this is to remove the acceptor

{
  "expected": "InvalidNetworkInterfaceID.NotFound",
  "matcher": "error",
  "state": "failure"
}

from the WaitUntilNetworkInterfaceAvailableWithContext acceptors.
I have prepared a branch with the required change
but it requires changes to the models/apis/ec2/2016-11-15/waiters-2.json which, based on the guidelines requires to open an issue first instead of a PR.

@mzampetakis mzampetakis added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 17, 2022
@vudh1 vudh1 self-assigned this Mar 9, 2022
@vudh1
Copy link
Contributor

vudh1 commented Apr 29, 2022

Hi, is this still persisting with the latest version of SDK?

@vudh1 vudh1 added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 29, 2022
@mzampetakis
Copy link
Author

Hi @vudh1 , the issue is still persisting with the latest version of the SDK.
Currently it is at https://github.com/aws/aws-sdk-go/blob/main/service/ec2/waiters.go#L990
Release v1.44.4 (2022-04-29).

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label May 1, 2022
@vudh1 vudh1 removed their assignment Aug 25, 2022
@RanVaknin RanVaknin added the p3 This is a minor priority issue label Mar 27, 2023
@RanVaknin
Copy link
Contributor

Hi @mzampetakis ,

This is quite an old issue. I apologize for not getting to this sooner. If this is still an issue with the Go SDK v2, please open a new issue there and I will take a look.

Thanks again,
Ran~

@RanVaknin RanVaknin closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
Copy link

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

3 participants