{"record":{"id":"8a1fcee821f3110d","repo":"kubernetes/kops","slug":"unable-to-decode-addresses-w","errorCode":null,"errorMessage":"unable to decode addresses: %w","messagePattern":"unable to decode addresses: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/verifier.go","lineNumber":140,"sourceCode":"}\n\nfunc (o openstackVerifier) VerifyToken(ctx context.Context, rawRequest *http.Request, token string, body []byte) (*bootstrap.VerifyResult, error) {\n\tif !strings.HasPrefix(token, openstackmetadata.OpenstackAuthenticationTokenPrefix) {\n\t\treturn nil, bootstrap.ErrNotThisVerifier\n\t}\n\tserverID := strings.TrimPrefix(token, openstackmetadata.OpenstackAuthenticationTokenPrefix)\n\n\tinstance, err := servers.Get(ctx, o.novaClient, serverID).Extract()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get info for server %q: %w\", token, err)\n\t}\n\n\tvar addrs []string\n\n\tvar addresses map[string][]Address\n\terr = mapstructure.Decode(instance.Addresses, &addresses)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to decode addresses: %w\", err)\n\t}\n\n\tfor _, addrList := range addresses {\n\t\tfor _, props := range addrList {\n\t\t\taddrs = append(addrs, props.Addr)\n\t\t}\n\t}\n\t// ensure that request is coming from same machine\n\trequestAddr, _, err := net.SplitHostPort(rawRequest.RemoteAddr)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid remote address %q: %v\", rawRequest.RemoteAddr, err)\n\t}\n\tif !stringInSlice(requestAddr, addrs) {\n\t\treturn nil, fmt.Errorf(\"authentication request address %q does not match server addresses %v\", requestAddr, addrs)\n\t}\n\n\t// We will call back onto this address, now that we have verified it is an instance IP\n\tchallengeEndpoint := net.JoinHostPort(requestAddr, strconv.Itoa(wellknownports.NodeupChallenge))","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/verifier.go#L122-L158","documentation":"The server's 'addresses' field from Nova could not be decoded into the expected map[string][]Address structure via mapstructure. The instance address payload had an unexpected shape, so no addresses could be extracted for verification.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstack/verifier.go:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the server's addresses field via openstack server show","Check for OpenStack distributions returning non-standard address formats","Report the payload shape if it differs from the expected structure"],"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"}