From 1c309fcf460f4d32e12b9aa88f75923638798469 Mon Sep 17 00:00:00 2001 From: leigh capili Date: Mon, 13 Apr 2020 11:43:44 -0600 Subject: [PATCH] Filter loopback IPs from VM metadata to prevent SSH related test flakes (also, this just makes sense) discussed with @darkowlzz we see no use-case for reporting that VMs have loopback IPs at an API level --- pkg/operations/start.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/operations/start.go b/pkg/operations/start.go index 6a42bba98..21f2d666b 100644 --- a/pkg/operations/start.go +++ b/pkg/operations/start.go @@ -132,9 +132,11 @@ func StartVM(vm *api.VM, debug bool) error { startTime := apiruntime.Timestamp() vm.Status.StartTime = &startTime - // Append the runtime IP address of the VM to its state + // Append non-loopback runtime IP addresses of the VM to its state for _, addr := range result.Addresses { - vm.Status.IPAddresses = append(vm.Status.IPAddresses, addr.IP) + if !addr.IP.IsLoopback() { + vm.Status.IPAddresses = append(vm.Status.IPAddresses, addr.IP) + } } // Set the VM's status to running