{"record":{"id":"3df34173ff21850b","repo":"kubernetes/kops","slug":"error-setting-cloud-init-in-user-data-for-instan","errorCode":null,"errorMessage":"error setting 'cloud-init' in user-data for instance %s of group %q: %w","messagePattern":"error setting 'cloud-init' in user-data for instance (.+?) of group %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scalewaytasks/instance.go","lineNumber":264,"sourceCode":"\t\t\treturn fmt.Errorf(\"error creating instance of group %q: %w\", fi.ValueOf(expected.Name), err)\n\t\t}\n\t\t_, err = instanceService.WaitForServer(&instance.WaitForServerRequest{\n\t\t\tServerID: srv.Server.ID,\n\t\t\tZone:     zone,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error waiting for instance %s of group %q: %w\", srv.Server.ID, fi.ValueOf(expected.Name), err)\n\t\t}\n\n\t\t// We load the cloud-init script in the instance user data\n\t\terr = instanceService.SetServerUserData(&instance.SetServerUserDataRequest{\n\t\t\tServerID: srv.Server.ID,\n\t\t\tZone:     srv.Server.Zone,\n\t\t\tKey:      \"cloud-init\",\n\t\t\tContent:  bytes.NewBuffer(userData),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error setting 'cloud-init' in user-data for instance %s of group %q: %w\", srv.Server.ID, fi.ValueOf(expected.Name), err)\n\t\t}\n\n\t\t// We start the instance\n\t\t_, err = instanceService.ServerAction(&instance.ServerActionRequest{\n\t\t\tZone:     zone,\n\t\t\tServerID: srv.Server.ID,\n\t\t\tAction:   instance.ServerActionPoweron,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error powering on instance %s of group %q: %w\", srv.Server.ID, fi.ValueOf(expected.Name), err)\n\t\t}\n\n\t\t// We wait for the instance to be ready\n\t\t_, err = instanceService.WaitForServer(&instance.WaitForServerRequest{\n\t\t\tServerID: srv.Server.ID,\n\t\t\tZone:     zone,\n\t\t})\n\t\tif err != nil {","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/instance.go#L246-L282","documentation":"In RenderScw, SetServerUserData('cloud-init') failed on a freshly created and readied server. The instance exists but has no bootstrap user-data, so it will never boot into the cluster; the server ID and group name identify the half-configured machine.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scalewaytasks/instance.go:264 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the API failure","Inspect the server in the console and delete it if orphaned","Re-run the apply to reconcile the instance group"],"exampleFix":null,"handlingStrategy":"try-catch","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"}