mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-23 03:48:35 +00:00
fix: ignore ip addresses from lo interface and increase container state timeout
This commit is contained in:
parent
3ccdb7a114
commit
6fee532f92
@ -180,10 +180,16 @@ func (c *VirtualEnvironmentClient) WaitForNetworkInterfacesFromVMAgent(nodeName
|
|||||||
missingIP := false
|
missingIP := false
|
||||||
|
|
||||||
if waitForIP {
|
if waitForIP {
|
||||||
for _, nic := range *data.Result {
|
if len(*data.Result) == 0 {
|
||||||
if nic.IPAddresses != nil && len(*nic.IPAddresses) == 0 {
|
missingIP = true
|
||||||
missingIP = true
|
} else if len(*data.Result) == 1 && (*data.Result)[0].Name == "lo" {
|
||||||
break
|
missingIP = true
|
||||||
|
} else {
|
||||||
|
for _, nic := range *data.Result {
|
||||||
|
if nic.IPAddresses != nil && len(*nic.IPAddresses) == 0 {
|
||||||
|
missingIP = true
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1622,11 +1622,8 @@ func resourceVirtualEnvironmentContainerUpdate(d *schema.ResourceData, m interfa
|
|||||||
resource := resourceVirtualEnvironmentContainer()
|
resource := resourceVirtualEnvironmentContainer()
|
||||||
|
|
||||||
// Prepare the new primitive values.
|
// Prepare the new primitive values.
|
||||||
if d.HasChange(mkResourceVirtualEnvironmentContainerDescription) {
|
description := d.Get(mkResourceVirtualEnvironmentContainerDescription).(string)
|
||||||
description := d.Get(mkResourceVirtualEnvironmentContainerDescription).(string)
|
updateBody.Description = &description
|
||||||
|
|
||||||
updateBody.Description = &description
|
|
||||||
}
|
|
||||||
|
|
||||||
template := proxmox.CustomBool(d.Get(mkResourceVirtualEnvironmentContainerTemplate).(bool))
|
template := proxmox.CustomBool(d.Get(mkResourceVirtualEnvironmentContainerTemplate).(bool))
|
||||||
|
|
||||||
@ -1853,7 +1850,7 @@ func resourceVirtualEnvironmentContainerUpdate(d *schema.ResourceData, m interfa
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = veClient.WaitForContainerState(nodeName, vmID, "running", 120, 5)
|
err = veClient.WaitForContainerState(nodeName, vmID, "running", 300, 5)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -1871,7 +1868,7 @@ func resourceVirtualEnvironmentContainerUpdate(d *schema.ResourceData, m interfa
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = veClient.WaitForContainerState(nodeName, vmID, "stopped", 30, 5)
|
err = veClient.WaitForContainerState(nodeName, vmID, "stopped", 300, 5)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user