kubernetes/kops · error
spotinst: failed to update elastigroup: %v
Error message
spotinst: failed to update elastigroup: %v
What it means
update() builds the desired Elastigroup object and then calls the Spotinst Update API; any failure is wrapped with this message. The group exists (otherwise find/create path was used), but Spotinst rejected or failed the update request.
Source
Thrown at upup/pkg/fi/cloudup/spotinsttasks/elastigroup.go:1372
klog.Warningf("Not all changes applied to Elastigroup %q: %v", *e.Name, changes)
}
if !changed {
klog.V(2).Infof("No changes detected in Elastigroup %q", *e.Name)
return nil
}
klog.V(2).Infof("Updating Elastigroup %q (config: %s)", *e.Name, stringutil.Stringify(group))
// Wrap the raw object as an Elastigroup.
eg, err := spotinst.NewElastigroup(cloud.ProviderID(), group)
if err != nil {
return err
}
// Update the Elastigroup.
if err := cloud.Spotinst().Elastigroup().Update(context.Background(), eg); err != nil {
return fmt.Errorf("spotinst: failed to update elastigroup: %v", err)
}
return nil
}
type terraformElastigroup struct {
Name *string `cty:"name"`
Description *string `cty:"description"`
Product *string `cty:"product"`
Region *string `cty:"region"`
SubnetIDs []*terraformWriter.Literal `cty:"subnet_ids"`
LoadBalancers []*terraformWriter.Literal `cty:"elastic_load_balancers"`
TargetGroups []*terraformWriter.Literal `cty:"target_group_arns"`
NetworkInterfaces []*terraformElastigroupNetworkInterface `cty:"network_interface"`
RootBlockDevice *terraformElastigroupBlockDevice `cty:"ebs_block_device"`
EphemeralBlockDevice []*terraformElastigroupBlockDevice `cty:"ephemeral_block_device"`
Integration *terraformElastigroupIntegration `cty:"integration_kubernetes"`
Tags []*terraformKV `cty:"tags"`View on GitHub (pinned to 4c8573c808)
Solutions
- Read the wrapped error detail for the exact Spotinst validation message and correct the offending field in the cluster spec.
- Re-run `kops update cluster` — concurrent-modification style errors often clear on a fresh read/update cycle.
- Check whether the group was edited externally (Spotinst console/Spot Ocean UI) and revert conflicting manual changes.
- Verify Spotinst API credentials are still valid and the account is connected.
Defensive patterns
Strategy: retry
Validate before calling
// re-read the group immediately before update to minimize concurrent-modification risk
latest, err := e.find(svc)
if err != nil {
return err
}
applyDesiredState(latest, e) // patch from latest read, not a stale copy Try / catch
if err := cloud.Spotinst().Elastigroup().Update(context.Background(), eg); err != nil {
if isTransient(err) { // 429/5xx from Spotinst
time.Sleep(backoff)
return e.update(cloud) // fresh read + update
}
return fmt.Errorf("spotinst: failed to update elastigroup: %v", err)
} Prevention
- Avoid concurrent edits from the Spotinst console while kOps runs
- Run a single `kops update cluster` at a time
- Retry transient API errors with backoff
- Diff the group in the Spotinst console when updates repeatedly fail
When it happens
Trigger: createOrUpdate takes the update path; find() returned the existing group, kOps mutates it to match the spec, then cloud.Spotinst().Elastigroup().Update(context.Background(), eg) returns an error.
Common situations: Concurrent modification — the group changed in the Spotinst console between find and update; spec changes Spotinst rejects (invalid combination of instance types, removing the only load balancer, resizing constraints); token expiry mid-run; transient Spotinst API 5xx.
Related errors
- spotinst: failed to find elastigroup %s: %v
- spotinst: failed to create elastigroup: %v
- error building ssh key: %v
- error building load balancers: %v
- error building public ip options: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/b14300a54be8991a.
Report an issue: GitHub.