From 1fd3b33dcdb1888caa963a28da63e2e05e5556c6 Mon Sep 17 00:00:00 2001 From: Sylvain Rabot Date: Mon, 19 Nov 2018 13:23:12 +0100 Subject: [PATCH] Prevent Azure SD panic (fix #4779) (#4867) Signed-off-by: Sylvain Rabot --- discovery/azure/azure.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discovery/azure/azure.go b/discovery/azure/azure.go index 75cdd4fc3..17370cde9 100644 --- a/discovery/azure/azure.go +++ b/discovery/azure/azure.go @@ -315,6 +315,10 @@ func (d *Discovery) refresh() (tg *targetgroup.Group, err error) { return } + if networkInterface.Properties == nil { + continue + } + // 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