Skip to content

Commit

Permalink
Fix timeout issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danitso-dp committed Mar 15, 2020
1 parent 097e3bf commit 913580b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ BUG FIXES:
* resource/virtual_environment_vm: Fix `network_device` deletion issue
* resource/virtual_environment_vm: Fix slow refresh when VM is stopped and agent is enabled
* resource/virtual_environment_vm: Fix crash caused by assuming IP addresses are always reported by the QEMU agent
* resource/virtual_environment_vm: Fix timeout issue while waiting for IP addresses to be reported by the QEMU agent

OTHER:

Expand Down
2 changes: 1 addition & 1 deletion proxmox/virtual_environment_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (c *VirtualEnvironmentClient) WaitForNetworkInterfacesFromVMAgent(nodeName

if waitForIP {
for _, nic := range *data.Result {
if nic.IPAddresses == nil {
if nic.IPAddresses != nil && len(*nic.IPAddresses) == 0 {
missingIP = true
break
}
Expand Down
2 changes: 1 addition & 1 deletion proxmox/virtual_environment_vm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ type VirtualEnvironmentVMGetQEMUNetworkInterfacesResponseData struct {
type VirtualEnvironmentVMGetQEMUNetworkInterfacesResponseResult struct {
MACAddress string `json:"hardware-address"`
Name string `json:"name"`
Statistics VirtualEnvironmentVMGetQEMUNetworkInterfacesResponseResultStatistics `json:"statistics"`
Statistics *VirtualEnvironmentVMGetQEMUNetworkInterfacesResponseResultStatistics `json:"statistics,omitempty"`
IPAddresses *[]VirtualEnvironmentVMGetQEMUNetworkInterfacesResponseResultIPAddress `json:"ip-addresses,omitempty"`
}

Expand Down

0 comments on commit 913580b

Please sign in to comment.