{"record":{"id":"a8c32f97fcc90013","repo":"kubernetes/kops","slug":"error-describing-network-v","errorCode":null,"errorMessage":"error describing Network: %v","messagePattern":"error describing Network: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/new_cluster.go","lineNumber":945,"sourceCode":"\t\tif res[subnet.Zone] != \"\" {\n\t\t\treturn res, fmt.Errorf(\"subnet %s and %s have the same zone\", subnetID, res[subnet.Zone])\n\t\t}\n\t\tres[subnet.Zone] = subnetID\n\t}\n\treturn res, nil\n}\n\nfunc getOpenstackZoneToSubnetProviderID(cluster *api.Cluster, zones []string, subnetIDs []string) (map[string]string, error) {\n\tres := make(map[string]string)\n\tosCloud, err := openstack.NewOpenstackCloud(cluster, \"new-cluster-zone-to-subnet\")\n\tif err != nil {\n\t\treturn res, fmt.Errorf(\"error loading cloud: %v\", err)\n\t}\n\tosCloud.UseZones(zones)\n\n\tnetworkInfo, err := osCloud.FindVPCInfo(cluster.Spec.Networking.NetworkID)\n\tif err != nil {\n\t\treturn res, fmt.Errorf(\"error describing Network: %v\", err)\n\t}\n\tif networkInfo == nil {\n\t\treturn res, fmt.Errorf(\"network %q not found\", cluster.Spec.Networking.NetworkID)\n\t}\n\n\tsubnetByID := make(map[string]*fi.SubnetInfo)\n\tfor _, subnetInfo := range networkInfo.Subnets {\n\t\tsubnetByID[subnetInfo.ID] = subnetInfo\n\t}\n\n\tfor _, subnetID := range subnetIDs {\n\t\tsubnet, ok := subnetByID[subnetID]\n\t\tif !ok {\n\t\t\treturn res, fmt.Errorf(\"subnet %s not found in network %s\", subnetID, cluster.Spec.Networking.NetworkID)\n\t\t}\n\n\t\tif res[subnet.Zone] != \"\" {\n\t\t\treturn res, fmt.Errorf(\"subnet %s and %s have the same zone\", subnetID, res[subnet.Zone])","sourceCodeStart":927,"sourceCodeEnd":963,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/new_cluster.go#L927-L963","documentation":"After authenticating, the OpenStack client's FindVPCInfo(cluster.Spec.Networking.NetworkID) queries Neutron for the network and its subnets. If the Neutron API call fails (authorization, timeout, quota, service outage), the SDK error is wrapped as \"error describing Network: %v\" and returned, aborting cluster creation.","triggerScenarios":"`kops create cluster --cloud openstack --os-network <network-id> ...` where listing network/subnets via Neutron errors: policy denying get_network/get_subnet for the project, Neutron endpoint unreachable, token expiry mid-run, or malformed network ID causing API errors.","commonSituations":"Projects with restricted Neutron RBAC policies; shared-provider networks invisible to the caller; Neutron service degraded in the cloud region; short-lived tokens expiring during long-running commands.","solutions":["Test with the CLI: `openstack network show <network-id>` — fix policy/RBAC if it 403s.","Re-authenticate if the token expired and rerun kOps.","Verify the network ID exists and is visible to your project; use the correct --os-network value.","Retry during Neutron outages; check the cloud provider's status page."],"exampleFix":"// before (project lacks RBAC on shared network)\nkops create cluster --cloud openstack --os-network shared-net-uuid ...\n// after\n# as cloud admin, add RBAC allowing the project to access the network, then rerun\nopenstack network rbac create --type network --target-project <project-id> --action access_as_shared shared-net-uuid","handlingStrategy":"retry","validationCode":"if err := exec.Command(\"openstack\", \"network\", \"show\", networkID).Run(); err != nil {\n    return fmt.Errorf(\"cannot query network %s: %w\", networkID, err)\n}","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"error describing Network\") {\n    if isTransient(err) { backoffAndRetry() } else { // fix Neutron RBAC or re-auth and retry once re-authenticated }\n}","preventionTips":["Confirm Neutron RBAC allows your project to read the target network.","Re-authenticate before long operations to avoid token expiry.","Prefer stable admin/project credentials over short-lived tokens in CI."],"tags":["openstack","neutron","network","api","cluster-creation"],"backgroundTag":"cloud-api-call-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}