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 · 7 comments · May be fixed by #13581
Open

Azure Discovery incorrectly discovering de-allocated VM NICs #4340

laughtonsm opened this issue Jul 3, 2018 · 7 comments · May be fixed by #13581

Comments

@laughtonsm
Copy link

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
Copy link
Contributor

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

@laughtonsm
Copy link
Author

laughtonsm commented Jul 3, 2018 via email

@krasi-georgiev
Copy link
Contributor

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

@laughtonsm
Copy link
Author

laughtonsm commented Jul 4, 2018 via email

@dmitsh
Copy link

dmitsh commented May 15, 2019

I'm looking into this.

@brian-brazil
Copy link
Contributor

Looking at this for our bugscrub, business logic like this belongs in relabelling. #5569 aims to add the metadata that'd allow for this.

@krajorama
Copy link
Member

Hello from the bug scrub. Keeping this open as active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment