{"record":{"id":"a2c10862b7a19208","repo":"kubernetes/kops","slug":"cluster-configured-to-use-octavia-but-router-was","errorCode":null,"errorMessage":"cluster configured to use octavia, but router was not configured","messagePattern":"cluster configured to use octavia, but router was not configured","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/cloud.go","lineNumber":490,"sourceCode":"\t\t\tspec.Loadbalancer.FloatingNetwork != nil {\n\t\t\t// This field is derived\n\t\t\tlbNet, err := c.ListNetworks(networks.ListOpts{\n\t\t\t\tName: fi.ValueOf(spec.Loadbalancer.FloatingNetwork),\n\t\t\t})\n\t\t\tif err != nil || len(lbNet) != 1 {\n\t\t\t\treturn fmt.Errorf(\"could not establish floating network id\")\n\t\t\t}\n\t\t\tspec.Loadbalancer.FloatingNetworkID = new(lbNet[0].ID)\n\t\t}\n\n\t\tif spec.Loadbalancer.UseOctavia != nil {\n\t\t\toctavia = fi.ValueOf(spec.Loadbalancer.UseOctavia)\n\t\t}\n\t\tif spec.Loadbalancer.FloatingSubnet != nil {\n\t\t\tc.floatingSubnet = spec.Loadbalancer.FloatingSubnet\n\t\t}\n\t} else if fi.ValueOf(spec.Loadbalancer.UseOctavia) {\n\t\treturn fmt.Errorf(\"cluster configured to use octavia, but router was not configured\")\n\t}\n\tc.useOctavia = octavia\n\n\tvar lbClient *gophercloud.ServiceClient\n\tif octavia {\n\t\tklog.V(2).Infof(\"Openstack using Octavia lbaasv2 api\")\n\t\tclient, err := openstack.NewLoadBalancerV2(provider, gophercloud.EndpointOpts{\n\t\t\tRegion: region,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error building lb client: %w\", err)\n\t\t}\n\t\tlbClient = client\n\t} else {\n\t\tklog.V(2).Infof(\"Openstack using deprecated lbaasv2 api\")\n\t\tclient, err := openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{\n\t\t\tRegion: region,\n\t\t})","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/cloud.go#L472-L508","documentation":"kOps requires a Neutron router (with floating network/subnet) to be configured whenever Octavia load balancing is enabled, because Octavia members need floating IPs for connectivity. This error is returned when UseOctavia is true but the Loadbalancer router configuration (FloatingNetwork) is absent.","triggerScenarios":"spec.Loadbalancer.UseOctavia = true while the outer condition (router config present, i.e. Loadbalancer.FloatingNetwork/FloatingNetworkID set) is false — i.e. octavia requested with no floating network configured.","commonSituations":"Cluster spec migrated to octavia without adding the floating network block; spec authored by hand or by an old tool version that omitted router settings; users assuming octavia works router-less.","solutions":["Add spec.Loadbalancer.FloatingNetwork (or FloatingNetworkID) to the cluster spec so the router/floating network is configured","Verify the named floating network exists (see 'openstack network list --external')","Alternatively disable octavia (UseOctavia=false) if no router is desired, accepting deprecated lbaasv2"],"exampleFix":"// before\nloadBalancer: { useOctavia: true }\n// after\nloadBalancer: { useOctavia: true, floatingNetwork: \"public-network-1\" }","handlingStrategy":"validation","validationCode":"// validate spec before apply\nif fi.ValueOf(spec.Loadbalancer.UseOctavia) && spec.Loadbalancer.FloatingNetwork == nil && spec.Loadbalancer.FloatingNetworkID == nil {\n    return errors.New(\"octavia requires Loadbalancer.FloatingNetwork(ID) to be set\")\n}","typeGuard":null,"tryCatchPattern":"// go\nif err != nil && strings.Contains(err.Error(), \"router was not configured\") {\n    return fmt.Errorf(\"add loadBalancer.floatingNetwork to the cluster spec\")\n}","preventionTips":["Always pair UseOctavia=true with a floating network","Use kops cluster template validation before apply","Document octavia requirements for cluster authors"],"tags":["openstack","octavia","configuration","router"],"backgroundTag":"missing-required-config-field","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}