{"record":{"id":"e625988eb2469ca4","repo":"kubernetes/kops","slug":"parsing-kops-channels-manifest-w","errorCode":null,"errorMessage":"parsing kops-channels manifest: %w","messagePattern":"parsing kops-channels manifest: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodeup/pkg/model/channels.go","lineNumber":105,"sourceCode":"func (b *ChannelsBuilder) readChannelsManifest(c *fi.NodeupModelBuilderContext) ([]byte, error) {\n\tctx := c.Context()\n\tp, err := vfs.Context.BuildVfsPath(b.NodeupConfig.ChannelsManifest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing path for kops-channels manifest %s: %w\", b.NodeupConfig.ChannelsManifest, err)\n\t}\n\tdata, err := p.ReadFile(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading kops-channels manifest %s: %w\", b.NodeupConfig.ChannelsManifest, err)\n\t}\n\n\t// SELinux is per-IG via containerdConfig, so the decoration can only be applied at nodeup.\n\t// Skip the parse/reserialize round-trip when there's nothing to add.\n\tif b.NodeupConfig.ContainerdConfig == nil || !b.NodeupConfig.ContainerdConfig.SeLinuxEnabled {\n\t\treturn data, nil\n\t}\n\tpod := &v1.Pod{}\n\tif err := yaml.Unmarshal(data, pod); err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing kops-channels manifest: %w\", err)\n\t}\n\tkubemanifest.AddHostPathSELinuxContext(pod, b.NodeupConfig)\n\tout, err := k8scodecs.ToVersionedYaml(pod)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"re-marshaling kops-channels manifest: %w\", err)\n\t}\n\treturn out, nil\n}\n","sourceCodeStart":87,"sourceCodeEnd":114,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/nodeup/pkg/model/channels.go#L87-L114","documentation":"When SELinux is enabled in the instance group's containerdConfig, nodeup must decorate the channels manifest, so it unmarshals the manifest bytes into a v1.Pod with sigs.k8s.io/yaml. If the stored manifest is not valid YAML or does not decode into a Pod object, the parse fails and is wrapped with this message.","triggerScenarios":"Build() on a master node with NodeupConfig.ContainerdConfig.SeLinuxEnabled=true and the channels manifest bytes are corrupt, empty, truncated, or not a Pod manifest (wrong kind or incompatible apiVersion fields).","commonSituations":"Partially uploaded/truncated manifest in the state store; an older or hand-modified kops-channels manifest that doesn't match the v1.Pod schema; binary corruption in the storage backend.","solutions":["Re-run 'kops update cluster --yes' to regenerate and upload a fresh, valid kops-channels manifest.","Inspect the manifest at the ChannelsManifest path and confirm it is a valid Pod YAML (kind: Pod) and not truncated.","Ensure nodeup and kopsctl versions match; version-skewed manifests can fail schema decode.","If not actually needing SELinux decoration, disable containerdConfig.seLinuxEnabled to skip the parse entirely."],"exampleFix":"// before: truncated manifest uploaded\n// after: regenerate\n// kops update cluster mycluster --yes && systemctl restart nodeup","handlingStrategy":"validation","validationCode":"var probe interface{}\nif err := yaml.Unmarshal(manifestBytes, &probe); err != nil {\n\treturn fmt.Errorf(\"channels manifest is not valid YAML before nodeup: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := nodeupRun(ctx); err != nil && strings.Contains(err.Error(), \"parsing kops-channels manifest\") {\n\t// regenerate the manifest in the state store, then retry\n\tif err := kopsUpdateCluster(ctx); err != nil { return err }\n\treturn nodeupRun(ctx)\n}","preventionTips":["Never hand-edit the uploaded kops-channels manifest in the state store.","Verify manifest upload completed after 'kops update cluster' (check object size/hash).","Keep nodeup and kopsctl versions in lockstep to avoid schema mismatches.","Only enable containerdConfig.seLinuxEnabled on images/nodes that need it."],"tags":["go","nodeup","yaml","channels","selinux"],"backgroundTag":"manifest-parse-failed","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"}