{"record":{"id":"37a108919f59895e","repo":"kubernetes/kops","slug":"found-vmss-without-properties","errorCode":null,"errorMessage":"found VMSS without properties","messagePattern":"found VMSS without properties","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azuretasks/vmscaleset.go","lineNumber":109,"sourceCode":"\treturn s.Name\n}\n\n// Find discovers the VMScaleSet in the cloud provider.\nfunc (s *VMScaleSet) Find(c *fi.CloudupContext) (*VMScaleSet, error) {\n\tcloud := c.T.Cloud.(azure.AzureCloud)\n\tfound, err := cloud.VMScaleSet().Get(context.TODO(), *s.ResourceGroup.Name, *s.Name)\n\tif err != nil && !strings.Contains(err.Error(), \"NotFound\") {\n\t\treturn nil, err\n\t}\n\tif found == nil {\n\t\treturn nil, nil\n\t}\n\n\tif found.ID == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without ID\")\n\t}\n\tif found.Properties == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without properties\")\n\t}\n\tif fi.ValueOf(found.Properties.ProvisioningState) == \"Failed\" {\n\t\tklog.Warningf(\"found VMSS %q in failed provisioning state\", *s.Name)\n\t\treturn nil, nil\n\t}\n\tif found.Properties.VirtualMachineProfile == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without VM profile\")\n\t}\n\tif found.Properties.VirtualMachineProfile.NetworkProfile == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without network profile\")\n\t}\n\tif found.Properties.VirtualMachineProfile.OSProfile == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without OS profile\")\n\t}\n\n\tprofile := found.Properties.VirtualMachineProfile\n\n\tnwConfigs := profile.NetworkProfile.NetworkInterfaceConfigurations","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azuretasks/vmscaleset.go#L91-L127","documentation":"Find requires the VMSS model to carry a non-nil Properties block; without it kops cannot read provisioning state or the VM profile. This invariant check fires when Azure returns a scale set whose Properties pointer is nil, meaning the response is structurally incomplete for reconciliation.","triggerScenarios":"A Get/List VirtualMachineScaleSets response deserialized with Properties == nil — typically a stub response, an empty/half-provisioned resource, or an API shape mismatch.","commonSituations":"VMSS deleted concurrently with reconciliation; mock/test fixtures omitting Properties; SDK upgrade where fields moved out of Properties.","solutions":["Verify the VMSS exists fully in Azure (az vmss show) and re-run kops apply to recreate it.","Fix test fixtures so the mocked VirtualMachineScaleSet sets Properties.","Align the azure-sdk-for-go version with kops expectations so Properties is populated."],"exampleFix":"// before\nfound := &compute.VirtualMachineScaleSet{ID: &id}\n// after\nfound := &compute.VirtualMachineScaleSet{ID: &id, Properties: &compute.VirtualMachineScaleSetProperties{}}","handlingStrategy":"validation","validationCode":"if vmss == nil || vmss.Properties == nil {\n    return fmt.Errorf(\"VMSS %s has no properties; delete and re-apply\", name)\n}","typeGuard":"func hasProperties(v *compute.VirtualMachineScaleSet) bool { return v != nil && v.Properties != nil }","tryCatchPattern":"task, err := s.Find(context, cloud)\nif err != nil {\n    if strings.Contains(err.Error(), \"without properties\") {\n        return markForRecreate(err)\n    }\n    return err\n}","preventionTips":["Avoid concurrent edits to the same VMSS by other IaC tools.","Include Properties in all mocked SDK responses.","Keep the azure-sdk-for-go version aligned with kops."],"tags":["azure","vmss","missing-properties"],"backgroundTag":"azure-resource-missing-id","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"}