{"record":{"id":"eab876badc2dd240","repo":"kubernetes/kops","slug":"error-loading-cloud-v","errorCode":null,"errorMessage":"error loading cloud: %v","messagePattern":"error loading cloud: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/new_cluster.go","lineNumber":699,"sourceCode":"\t\t\t\tklog.Infof(\"using google cloud project: %s\", project)\n\t\t\t}\n\t\t\tcluster.Spec.CloudProvider.GCE.Project = project\n\t\t}\n\t\tif opt.GCEServiceAccount != \"\" {\n\t\t\t// TODO remove this logging?\n\t\t\tklog.Infof(\"VMs will be configured to use specified Service Account: %v\", opt.GCEServiceAccount)\n\t\t\tcluster.Spec.CloudProvider.GCE.ServiceAccount = opt.GCEServiceAccount\n\t\t}\n\n\tcase api.CloudProviderOpenstack:\n\t\tif cluster.Spec.CloudConfig == nil {\n\t\t\tcluster.Spec.CloudConfig = &api.CloudConfiguration{}\n\t\t}\n\n\t\tif cluster.Spec.Networking.NetworkID == \"\" && len(opt.SubnetIDs) > 0 {\n\t\t\tosCloud, err := openstack.NewOpenstackCloud(cluster, \"new-cluster-setupvpc\")\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error loading cloud: %v\", err)\n\t\t\t}\n\n\t\t\tres, err := osCloud.FindNetworkBySubnetID(opt.SubnetIDs[0])\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error finding network: %v\", err)\n\t\t\t}\n\t\t\tcluster.Spec.Networking.NetworkID = res.ID\n\t\t}\n\n\t\tif opt.OpenstackDNSServers != \"\" {\n\t\t\tcluster.Spec.CloudProvider.Openstack.Router.DNSServers = new(opt.OpenstackDNSServers)\n\t\t}\n\t\tif opt.OpenstackExternalSubnet != \"\" {\n\t\t\tcluster.Spec.CloudProvider.Openstack.Router.ExternalSubnet = new(opt.OpenstackExternalSubnet)\n\t\t}\n\tcase api.CloudProviderAzure:\n\t\t// TODO(kenji): Find a right place for this.\n","sourceCodeStart":681,"sourceCodeEnd":717,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/new_cluster.go#L681-L717","documentation":"setupVPC (Openstack branch) wraps the NewOpenstackCloud construction error when a network ID must be inferred from subnet IDs. It fires when Openstack credentials/environment are missing or the cloud client cannot be initialized, aborting cluster creation.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/new_cluster.go:699 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify OpenStack credentials (clouds.yaml / environment variables)","Check the OS_ prefix environment and auth URL configuration","Pass the network ID explicitly to skip cloud client setup"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}