{"record":{"id":"e0232dc100bf10d2","repo":"kubernetes/kops","slug":"could-not-create-startup-script-for-instance-group","errorCode":null,"errorMessage":"could not create startup script for instance group %s: %v","messagePattern":"could not create startup script for instance group (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/openstackmodel/servergroup.go","lineNumber":129,"sourceCode":"\t\treturn err\n\t}\n\tigMeta[openstack.TagKopsNetwork] = netName\n\tigMeta[openstack.TagKopsInstanceGroup] = ig.Name\n\tigMeta[openstack.TagKopsRole] = string(ig.Spec.Role)\n\tigMeta[openstack.INSTANCE_GROUP_GENERATION] = fmt.Sprintf(\"%d\", ig.GetGeneration())\n\tigMeta[openstack.CLUSTER_GENERATION] = fmt.Sprintf(\"%d\", b.Cluster.GetGeneration())\n\n\tif e, ok := ig.ObjectMeta.Annotations[openstack.OS_ANNOTATION+openstack.BOOT_FROM_VOLUME]; ok {\n\t\tigMeta[openstack.BOOT_FROM_VOLUME] = e\n\t}\n\n\tif v, ok := ig.ObjectMeta.Annotations[openstack.OS_ANNOTATION+openstack.BOOT_VOLUME_SIZE]; ok {\n\t\tigMeta[openstack.BOOT_VOLUME_SIZE] = v\n\t}\n\n\tstartupScript, err := b.BootstrapScriptBuilder.ResourceNodeUp(c, ig)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not create startup script for instance group %s: %v\", ig.Name, err)\n\t}\n\n\tvar securityGroups []*openstacktasks.SecurityGroup\n\tsecurityGroupName := b.SecurityGroupName(ig.Spec.Role)\n\tsecurityGroups = append(securityGroups, b.LinkToSecurityGroup(securityGroupName))\n\n\tif b.Cluster.Spec.CloudProvider.Openstack.Loadbalancer == nil && ig.Spec.Role.HasControlPlane() {\n\t\tsecurityGroups = append(securityGroups, b.LinkToSecurityGroup(b.APIResourceName()))\n\t}\n\n\tr := strings.NewReplacer(\"_\", \"-\", \".\", \"-\")\n\tgroupName := r.Replace(strings.ToLower(ig.Name))\n\t// In the future, OpenStack will use Machine API to manage groups,\n\t// for now create d.InstanceGroups.Spec.MinSize amount of servers\n\tfor i := int32(0); i < *ig.Spec.MinSize; i++ {\n\t\t// FIXME: Must ensure 63 or less characters\n\t\t// replace all dots and _ with -, this is needed to get external cloudprovider working\n\t\tiName := strings.ReplaceAll(strings.ToLower(fmt.Sprintf(\"%s-%d.%s\", ig.Name, i+1, b.ClusterName())), \"_\", \"-\")","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/openstackmodel/servergroup.go#L111-L147","documentation":"Wrapped failure generating the nodeup bootstrap script (startup script) for an OpenStack instance group. The script builder (configuration/rendering of nodeup) errored; this message only identifies which instance group failed — the root cause is in the %v detail.","triggerScenarios":"Thrown at pkg/model/openstackmodel/servergroup.go:129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the underlying script-generation failure","Verify the cluster spec's kubelet/nodeup config fields render correctly","Fix the reported field and re-run `kops update cluster`"],"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"}