kubernetes/kops · error
determining ComputerName for %s
Error message
determining ComputerName for %s
What it means
After vmId cross-verification succeeds, the verifier must map the VM to a Kubernetes node name via the VM's osProfile.computerName. If osProfile is nil or ComputerName is empty/nil, the node name cannot be derived and the token verification fails.
Source
Thrown at upup/pkg/fi/cloudup/azure/verifier.go:253
return result, nil
}
// extractNodeIdentity cross-verifies the attested vmId against the Azure API vmId for the claimed resource and
// extracts the node name and instance group from the API object. desc is a human-readable resource description
// used in errors and logs.
func extractNodeIdentity(data *attestedData, desc string, apiVMID *string, osProfile *compute.OSProfile, tags map[string]*string) (nodeName, igName string, err error) {
if apiVMID == nil {
return "", "", fmt.Errorf("determining VMID for %s", desc)
}
// Cross-verify: the vmId from the cryptographically signed attested document must match the vmId from the
// Azure API for the claimed resource ID.
klog.V(4).Infof("Azure verifier for %s cross-verifying vmId: attested=%q api=%q", desc, data.VMId, *apiVMID)
if data.VMId != *apiVMID {
return "", "", fmt.Errorf("attested vmId %q does not match %s (API vmId %q)", data.VMId, desc, *apiVMID)
}
if osProfile == nil || osProfile.ComputerName == nil || *osProfile.ComputerName == "" {
return "", "", fmt.Errorf("determining ComputerName for %s", desc)
}
nodeName = strings.ToLower(*osProfile.ComputerName)
igNameTag, ok := tags[InstanceGroupNameTag]
if !ok || igNameTag == nil {
return "", "", fmt.Errorf("determining IG name for %s", desc)
}
klog.V(4).Infof("Azure verifier for %s resolved identity: node=%q instanceGroup=%q", desc, nodeName, *igNameTag)
return nodeName, *igNameTag, nil
}
// privateIPEndpoints collects the private IP addresses and nodeup challenge endpoints from a
// network interface's IP configurations.
func privateIPEndpoints(ni network.Interface, desc string) (addrs, challengeEndpoints []string, err error) {
if ni.Properties == nil {
return nil, nil, fmt.Errorf("determining IP configurations for %s network interface", desc)
}View on GitHub (pinned to 4c8573c808)
Solutions
- Confirm the VM has a valid OS profile with computerName set in the portal/CLI: az vm show --query osProfile.computerName
- For scale-set nodes verify the model exposes computerName; otherwise use the VMSS path in the verifier
- Retry verification — transient API responses occasionally omit fields; check klog V(4) output
- Ensure the verifier's compute SDK version matches the subscription's API behavior (update kOps/Azure SDK modules)
Defensive patterns
Strategy: validation
Validate before calling
vm, err := vmsClient.Get(ctx, rg, name, nil)
if err != nil { return err }
if vm.Properties == nil || vm.Properties.OSProfile == nil || vm.Properties.OSProfile.ComputerName == nil {
return fmt.Errorf("VM %s has no osProfile.computerName; cannot map to node name", name)
} Type guard
func hasComputerName(vm *compute.VirtualMachine) bool {
return vm != nil && vm.Properties != nil && vm.Properties.OSProfile != nil &&
vm.Properties.OSProfile.ComputerName != nil && *vm.Properties.OSProfile.ComputerName != ""
} Try / catch
_, _, err := verifier.VerifyToken(ctx, token)
if err != nil && strings.Contains(err.Error(), "determining ComputerName") {
// transient/partial API response: back off and retry once before failing the node
} Prevention
- Don't strip osProfile via custom images or arm templates
- Retry verification with backoff on freshly booted nodes
- Keep the Azure SDK in kops on a supported API version
- Alert on VMs whose osProfile.computerName is empty
When it happens
Trigger: Calling Get on the VM (or VMSS VM) returns a VirtualMachine whose Properties.OSProfile is nil, or whose ComputerName pointer is nil/empty string, and extractNodeIdentity then errors.
Common situations: Azure API returned a partial/degraded response (e.g. instanceView-only call or truncated response); VMSS VMs may not populate osProfile the same way; a proxied or stubbed compute client in tests returns minimal objects; API version drift omits the field.
Related errors
- creating/updating VMSS: %w
- waiting for VMSS create/update: %w
- listing VMSSs: %w
- DNS not implemented on azureCloud
- FindVPCInfo not implemented on azureCloud, use FindVNetInfo
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/889294f5c6f47b1d.
Report an issue: GitHub.