-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Error retrieving network myOrgVdcNetwork from network list' errors during plan or apply #919
Comments
Thanks for reporting this issue. We will look into it |
I've just updated to terraform 1.3.3 and version 3.7 of the vcd plugin with the same results but a slightly more detailed error message: │ Error: error retrieving network MyOrgVdcNetwork from network list
│
│ with vcd_network_direct.MyOrgVdcNetwork,
│ on MyNetworkConfig.tf line 32, in resource "vcd_network_direct" "MyOrgVdcNetwork":
│ 32: resource "vcd_network_direct" "MyOrgVdcNetwork" {
│ |
I believe I have found the issue which is similar to my initial guess. If I've understood the code correctly the function
This pulls back all the orgVdcNetwork objects from the specified Vdc, but it does not implement paging. We have confirmed this with Fiddler: This means that the default page size of 25 is used. As the VDC that we currently have problems with has 42 networks many of them are being missed and that is causing the errors. My conclusion is that the I've added an issue in that repository: |
This issue should be now solved with the inclusion of PR 518 in go-vcloud-director |
Overview
We are running into an issue where terraform fails to check state successfully when running an
apply
orplan
. There are a large number of OrgVDC networks (vcd_network_direct) in the environment (180 currently) and when the refresh runs on a state that manages only 29 of these networks it fails to complete and reports that it cannot retrieve three of the networks from the network list.Having done some basic internal testing it would seem that this may be related to the paging of records in some way, as the max page size for query rest calls seems to be 128. We first had this issue with a single OrgVDC network and to work around it and create more networks we removed the definition of the problem
vcd_network_direct
from the .tf file and the state file.Terraform plan
then worked fine. Then three network configs were added and aterraform apply
was run. It started fine but during the create the errors shown below started appearing. All three networks were successfully created in vCD but now there were three errors on other networks during the state refresh.Affected Resource(s)
vcd_network_direct
Terraform config
Define and create a large number of external networks and orgVdc networks - greater than 128
We have multiple config files like this:
Steps to Reproduce
Run
terraform plan
Expected Behavior
Terraform should refresh the state and report no changes required
Actual Behavior
State refresh fails with one or more errors as follows:
Error: error retrieving network myOrgVdcNetwork from network list
Important Factoids
The affected OrgVDC networks remain the same unless the overall number of networks in VDC changes. We can reduce the config and state to a single problematic OrgVDC network and the problem remains.
The text was updated successfully, but these errors were encountered: