kubernetes/kops · error
Failed to create new Network object: %v
Error message
Failed to create new Network object: %v
What it means
Once exactly one network is found, Network.Find converts it into a task via NewNetworkTaskFromCloud; any error from that constructor is wrapped with this message. The constructor mostly copies fields, so failures here are rare and typically come from unexpected nil/missing data on the returned network object.
Source
Thrown at upup/pkg/fi/cloudup/openstacktasks/network.go:81
cloud := context.T.Cloud.(openstack.OpenstackCloud)
opt := networks.ListOpts{
ID: fi.ValueOf(n.ID),
Name: fi.ValueOf(n.Name),
}
ns, err := cloud.ListNetworks(opt)
if err != nil {
return nil, err
}
if ns == nil {
return nil, nil
} else if len(ns) != 1 {
return nil, fmt.Errorf("found multiple networks with name: %s", fi.ValueOf(n.Name))
}
v := ns[0]
actual, err := NewNetworkTaskFromCloud(cloud, n.Lifecycle, &v, n.Tag)
if err != nil {
return nil, fmt.Errorf("Failed to create new Network object: %v", err)
}
n.ID = actual.ID
return actual, nil
}
func (c *Network) Run(context *fi.CloudupContext) error {
return fi.CloudupDefaultDeltaRunMethod(c, context)
}
func (_ *Network) CheckChanges(a, e, changes *Network) error {
if a == nil {
if e.Name == nil {
return fi.RequiredField("Name")
}
} else {
if changes.ID != nil {
return fi.CannotChangeField("ID")
}View on GitHub (pinned to 4c8573c808)
Solutions
- Inspect the wrapped inner error to see which field/construction step failed.
- Verify the Neutron API version and that required extensions are enabled: openstack extension list.
- Re-run with klog verbosity (kops ... -v=4) to see the raw network listing; if the API returns partial objects, upgrade the OpenStack/neutron deployment.
- If caused by a kOps/gophercloud version issue, upgrade kops to a release matching your OpenStack version.
Example fix
// before: neutron returns network without expected fields (extension missing) Failed to create new Network object: ... // after: enable required extension / upgrade, then retry $ openstack extension list | grep availability-zone $ kops update cluster --name mycluster --yes
Defensive patterns
Strategy: retry
Validate before calling
net := neutronNetworkGet(networkID)
if net == nil || net.Name == "" || net.ID == "" {
return fmt.Errorf("neutron returned an incomplete network object; check API version/extensions")
} Try / catch
if err := kopsUpdate(); err != nil {
if strings.Contains(err.Error(), "Failed to create new Network object") {
// usually an API/version issue: refresh discovery and retry once
refreshNeutronExtensions()
return retryOnce()
}
return err
} Prevention
- Keep kops and its gophercloud dependency current with your OpenStack release.
- Verify required Neutron extensions (e.g. availability zone hints) are enabled.
- Run with -v=4 to capture raw API responses for diagnosing partial objects.
When it happens
Trigger: NewNetworkTaskFromCloud returns an error while building the Network task from the single listed network — practically only when the network object lacks expected data or a future code path in the constructor fails.
Common situations: Corrupted/empty Neutron responses (API extension returning partial objects); API version mismatch where fields expected by the task are absent; bugs after upgrading gophercloud/openstack plugins.
Related errors
- error describing Network: %v
- network %q not found
- error retrieving network with id %s: %v
- error listing networks: %v
- error extracting networks from pages: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/e9aee530437c16c4.
Report an issue: GitHub.