{"record":{"id":"4a171c756b36966e","repo":"kubernetes/kops","slug":"found-server-s-s-with-unexpected-state-q","errorCode":null,"errorMessage":"found server %s (%s) with unexpected state: %q","messagePattern":"found server (.+?) \\((.+?)\\) with unexpected state: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/scaleway/identify.go","lineNumber":100,"sourceCode":"\n\t// If caching is enabled try pulling nodeidentity.Info from cache before doing a Scaleway API call.\n\tif i.cacheEnabled {\n\t\tobj, exists, err := i.cache.GetByKey(serverID)\n\t\tif err != nil {\n\t\t\tklog.Warningf(\"Nodeidentity info cache lookup failure: %v\", err)\n\t\t}\n\t\tif exists {\n\t\t\treturn obj.(*nodeidentity.Info), nil\n\t\t}\n\t}\n\n\tserver, err := i.getServer(ctx, serverID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif server.State != instance.ServerStateRunning && server.State != instance.ServerStateStarting {\n\t\treturn nil, fmt.Errorf(\"found server %s (%s) with unexpected state: %q\", server.Name, server.ID, server.State)\n\t}\n\n\tlabels := map[string]string{}\n\trole := scaleway.InstanceRoleFromTags(server.Tags)\n\tswitch kops.InstanceGroupRole(role) {\n\tcase kops.InstanceGroupRoleControlPlane:\n\t\tlabels[nodelabels.RoleLabelControlPlane20] = \"\"\n\tcase kops.InstanceGroupRoleNode:\n\t\tlabels[nodelabels.RoleLabelNode16] = \"\"\n\tcase kops.InstanceGroupRoleAPIServer:\n\t\tlabels[nodelabels.RoleLabelAPIServer16] = \"\"\n\tdefault:\n\t\tklog.Warningf(\"Unknown node role %q for server %s(%s)\", role, server.Name, server.ID)\n\t}\n\n\tinfo := &nodeidentity.Info{\n\t\tInstanceID: serverID,\n\t\tLabels:     labels,","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/scaleway/identify.go#L82-L118","documentation":"IdentifyNode resolves a Scaleway instance into kOps node identity labels. After fetching the server, it requires the instance to be in Running or Starting state; otherwise node identity cannot be reliably determined. This error means the node being identified is in a transitional or abnormal lifecycle state.","triggerScenarios":"A Scaleway server whose State is not Running/Starting (e.g. stopped, stopping, error, archived) calls IdentifyNode during node registration.","commonSituations":"Node rebooting or shutting down during cluster bring-up; a stopped/terminated instance whose cloud provider metadata still routes to the identifier; Scaleway API eventual consistency returning a server still provisioning; instances killed by spot/preemptible reclaim.","solutions":["Wait for the instance to reach Running state and let kubelet retry node registration","Check the server state in the Scaleway console/API (scaleway instance get) and start it if stopped","Investigate why the instance is not running: billing, quota, failed boot, or manual shutdown","If the instance should never register, remove it from the cluster / delete the machine"],"exampleFix":"// before: server is stopped\nserver.State = \"archived\"\n// after: ensure the server is running before node registration\nscw instance server-action action=start server-id=<id>\n# or wait: until server.State == \"running\"","handlingStrategy":"retry","validationCode":"// Go: pre-check server state via Scaleway API\napi := instance.NewAPI(client)\nsrv, err := api.GetServer(&instance.GetServerRequest{ServerID: id, Zone: zone}, scw.WithContext(ctx))\nif err == nil && srv != nil && srv.Server.State != instance.ServerStateRunning && srv.Server.State != instance.ServerStateStarting {\n    return fmt.Errorf(\"defer registration: server %s in state %s\", id, srv.Server.State)\n}","typeGuard":"func serverIsRunnable(s *instance.Server) bool {\n    return s != nil && (s.State == instance.ServerStateRunning || s.State == instance.ServerStateStarting)\n}","tryCatchPattern":null,"preventionTips":["Poll server state until Running before triggering node registration","Treat this error as retryable with backoff in node identification loops","Avoid powering off nodes mid rolling-update","Monitor Scaleway instance lifecycle events"],"tags":["scaleway","node-identity","instance-state"],"backgroundTag":"instance-in-unexpected-state","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"}