{"record":{"id":"8d8f26d3aafed06c","repo":"kubernetes/kops","slug":"missing-s-and-s-in-section-of-s","errorCode":null,"errorMessage":"missing %s and %s in section of %s","messagePattern":"missing (.+?) and (.+?) in section of (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/pkg/vfs/swiftfs.go","lineNumber":200,"sourceCode":"func (oc OpenstackConfig) getCredentialFromFile() (gophercloud.AuthOptions, error) {\n\topt := gophercloud.AuthOptions{}\n\tname := \"Default\"\n\titems := []string{\"identity\", \"user\", \"user_id\", \"password\", \"domain_id\", \"domain_name\", \"tenant_id\", \"tenant_name\"}\n\tvalues, err := oc.getSection(name, items)\n\tif err != nil {\n\t\treturn opt, err\n\t}\n\n\tfor _, c1 := range []string{\"identity\", \"password\"} {\n\t\tif values[c1] == \"\" {\n\t\t\treturn opt, fmt.Errorf(\"missing %s in section of %s\", c1, name)\n\t\t}\n\t}\n\n\tcheckItems := [][]string{{\"user\", \"user_id\"}, {\"domain_name\", \"domain_id\"}, {\"tenant_name\", \"tenant_id\"}}\n\tfor _, c2 := range checkItems {\n\t\tif values[c2[0]] == \"\" && values[c2[1]] == \"\" {\n\t\t\treturn opt, fmt.Errorf(\"missing %s and %s in section of %s\", c2[0], c2[1], name)\n\t\t}\n\t}\n\n\topt.IdentityEndpoint = values[\"identity\"]\n\topt.UserID = values[\"user_id\"]\n\topt.Username = values[\"user\"]\n\topt.Password = values[\"password\"]\n\topt.TenantID = values[\"tenant_id\"]\n\topt.TenantName = values[\"tenant_name\"]\n\topt.DomainID = values[\"domain_id\"]\n\topt.DomainName = values[\"domain_name\"]\n\topt.AllowReauth = true\n\n\treturn opt, nil\n}\n\nfunc (oc OpenstackConfig) GetServiceConfig(name string) (gophercloud.EndpointOpts, error) {\n\topt := gophercloud.EndpointOpts{}","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/util/pkg/vfs/swiftfs.go#L182-L218","documentation":"Configuration guard in OpenstackConfig.getCredentialFromFile: while parsing the clouds.yaml/standard OpenStack config file, the [Default] section is missing one of the mandatory authentication fields (identity auth URL or password). The named value from the parsed section is empty, so gophercloud AuthOptions cannot be built. (The message's double-%s renders the missing key name and section name.)","triggerScenarios":"Thrown at util/pkg/vfs/swiftfs.go:200 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the missing key (identity or password) to the Default section of the OpenStack config file (e.g. ~/.config/openstack/clouds.yaml or /etc/openstack/clouds.yaml)","Verify the config file is valid YAML and the section name matches what the tool expects"],"exampleFix":null,"handlingStrategy":"validation","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"}