kubernetes/kops · error
missing %s and %s in section of %s
Error message
missing %s and %s in section of %s
What it means
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.)
Source
Thrown at util/pkg/vfs/swiftfs.go:200
func (oc OpenstackConfig) getCredentialFromFile() (gophercloud.AuthOptions, error) {
opt := gophercloud.AuthOptions{}
name := "Default"
items := []string{"identity", "user", "user_id", "password", "domain_id", "domain_name", "tenant_id", "tenant_name"}
values, err := oc.getSection(name, items)
if err != nil {
return opt, err
}
for _, c1 := range []string{"identity", "password"} {
if values[c1] == "" {
return opt, fmt.Errorf("missing %s in section of %s", c1, name)
}
}
checkItems := [][]string{{"user", "user_id"}, {"domain_name", "domain_id"}, {"tenant_name", "tenant_id"}}
for _, c2 := range checkItems {
if values[c2[0]] == "" && values[c2[1]] == "" {
return opt, fmt.Errorf("missing %s and %s in section of %s", c2[0], c2[1], name)
}
}
opt.IdentityEndpoint = values["identity"]
opt.UserID = values["user_id"]
opt.Username = values["user"]
opt.Password = values["password"]
opt.TenantID = values["tenant_id"]
opt.TenantName = values["tenant_name"]
opt.DomainID = values["domain_id"]
opt.DomainName = values["domain_name"]
opt.AllowReauth = true
return opt, nil
}
func (oc OpenstackConfig) GetServiceConfig(name string) (gophercloud.EndpointOpts, error) {
opt := gophercloud.EndpointOpts{}View on GitHub (pinned to 4c8573c808)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at util/pkg/vfs/swiftfs.go:200 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/8d8f26d3aafed06c.
Report an issue: GitHub.