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

Azure Discovery incorrectly discovering de-allocated VM NICs #4340

Open
laughtonsm opened this Issue Jul 3, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@laughtonsm
Copy link

laughtonsm commented Jul 3, 2018

Hi

Looks like the Azure Discovery code is using the IP address to determine whether a VM is de-allocated or not. Dynamic Private IP addresses are not released back to the pool when a VM is deallocated. The comment in the code reads

// Unfortunately Azure does not return information on whether a VM is deallocated.
// This information is available via another API call however the Go SDK does not
// yet support this. On deallocated machines, this value happens to be nil so it
// is a cheap and easy way to determine if a machine is allocated or not.

This is no longer the case. It would make more sense now to use the MacAddress property of the NIC, as this will is NULL when the VM is allocated.

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Jul 3, 2018

Thanks for the report.
Do you think you can open a PR for a fix?

@laughtonsm

This comment has been minimized.

Copy link
Author

laughtonsm commented Jul 3, 2018

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Jul 3, 2018

that might be tricky than as we would probably need a unit tests, DCO signing, changes to the comment etc.

@laughtonsm

This comment has been minimized.

Copy link
Author

laughtonsm commented Jul 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.