{"record":{"id":"1a30996cb87ee60d","repo":"kubernetes/kops","slug":"network-q-not-found","errorCode":null,"errorMessage":"network %q not found","messagePattern":"network %q not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/new_cluster.go","lineNumber":948,"sourceCode":"\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])\n\t\t}\n\t\tres[subnet.Zone] = subnetID\n\t}","sourceCodeStart":930,"sourceCodeEnd":966,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/new_cluster.go#L930-L966","documentation":"When Neutron answers successfully but no network matches cluster.Spec.Networking.NetworkID, FindVPCInfo returns nil and kOps returns \"network %q not found\". This cleanly separates \"the network ID is wrong\" from \"the API call failed\" so the user knows to fix the network identifier.","triggerScenarios":"`kops create cluster --cloud openstack --os-network net-typo ...` with a mistyped/foreign/deleted network UUID, or a network in a different project/region than the authenticated one.","commonSituations":"Copying a network ID from another project's dashboard; network deleted after being written into scripts; using a router or subnet UUID by mistake instead of the network UUID; wrong OS_PROJECT_NAME selecting an empty project.","solutions":["Confirm the ID: `openstack network list` in the target project and copy the exact UUID for --os-network.","Ensure OS_PROJECT_NAME/OS_PROJECT_ID and OS_REGION_NAME match the project/region owning the network.","If the network was deleted, create/choose another and update the flag."],"exampleFix":"// before\n--os-network 0f1e2d3c-wrong-id\n// after\n--os-network $(openstack network show mynetwork -f value -c id)","handlingStrategy":"validation","validationCode":"out, err := exec.Command(\"openstack\", \"network\", \"show\", networkID, \"-f\", \"value\", \"-c\", \"id\").Output()\nif err != nil || strings.TrimSpace(string(out)) != networkID {\n    return fmt.Errorf(\"network %s not visible in current project/region\", networkID)\n}","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"network \\\"\") && strings.Contains(err.Error(), \"not found\") {\n    // run `openstack network list`, pick the correct UUID, update --os-network and retry\n}","preventionTips":["Resolve the network UUID at runtime with `openstack network show <name> -f value -c id`.","Ensure OS_PROJECT_NAME/OS_REGION_NAME match the network's owning project/region.","Use the network UUID (not subnet/router UUID) for --os-network."],"tags":["openstack","neutron","network","not-found","cluster-creation"],"backgroundTag":"resource-not-found","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"}