From c1cbed2db007ca3a7eb2385893b79622c2f4640c Mon Sep 17 00:00:00 2001 From: Desmond Pompa Alarcon Rawls Date: Tue, 9 Jan 2018 09:45:39 -0800 Subject: [PATCH] Remove unused internal_gw from TF outputs - leaving it there causes panics when upgrading a vsphere env from v5.10.x to v5.11.x Signed-off-by: Rowan Jacobs --- bosh/manager.go | 2 ++ bosh/manager_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bosh/manager.go b/bosh/manager.go index f89bf9e0b..734457af9 100644 --- a/bosh/manager.go +++ b/bosh/manager.go @@ -374,6 +374,7 @@ func (m *Manager) GetJumpboxDeploymentVars(state storage.State, terraformOutputs allOutputs[k] = v } delete(allOutputs, "external_ip") + delete(allOutputs, "internal_gw") allOutputs["internal_cidr"] = internalCIDR vars := sharedDeploymentVarsYAML{ @@ -453,6 +454,7 @@ func (m *Manager) GetDirectorDeploymentVars(state storage.State, terraformOutput allOutputs[k] = v } delete(allOutputs, "external_ip") + delete(allOutputs, "internal_gw") allOutputs["internal_cidr"] = internalCIDR vars := sharedDeploymentVarsYAML{ diff --git a/bosh/manager_test.go b/bosh/manager_test.go index a3a2ad35f..127798c18 100644 --- a/bosh/manager_test.go +++ b/bosh/manager_test.go @@ -656,6 +656,7 @@ director_name: bosh-`)) vars := boshManager.GetJumpboxDeploymentVars(incomingState, terraform.Outputs{Map: map[string]interface{}{ "internal_cidr": "10.80.30.0/24", "external_ip": "10.80.30.6", + "internal_gw": "garbage", "network_name": "plum", "vcenter_cluster": "fruits", "vcenter_disks": "plum", @@ -843,6 +844,7 @@ zone: some-zone It("returns a correct yaml string of bosh deployment variables", func() { vars := boshManager.GetDirectorDeploymentVars(incomingState, terraform.Outputs{Map: map[string]interface{}{ "some-key": "some-value", + "internal_gw": "garbage", "internal_cidr": "10.0.1.0/24", "bosh_director_tag_name": "some-director-tag", "bosh_director_external_ip": "some-external-ip",