kubernetes/kops · error

error waiting for Network creation to complete: %w

Error message

error waiting for Network creation to complete: %w

What it means

Wrapped error from cloud.WaitForOp after a successful Networks.Insert submit. The network-create operation failed asynchronously (or polling errored) — e.g. legacy CIDR conflicts with an existing peered network, so the network may not exist despite the accepted request.

Source

Thrown at upup/pkg/fi/cloudup/gcetasks/network.go:180

		case "custom":
			network.AutoCreateSubnetworks = false
			// The boolean default value of "false" is omitted when the struct
			// is serialized, which results in the network being created with
			// the auto-create subnetworks default of "true". Explicitly send
			// the default value.
			network.ForceSendFields = []string{"AutoCreateSubnetworks"}

		default:
			return fmt.Errorf("unhandled mode %q", e.Mode)
		}

		op, err := t.Cloud.Compute().Networks().Insert(t.Cloud.Project(), network)
		if err != nil {
			return fmt.Errorf("error creating Network: %v", err)
		}
		if err := t.Cloud.WaitForOp(op); err != nil {
			return fmt.Errorf("error waiting for Network creation to complete: %w", err)
		}
	} else {
		if a.Mode == "legacy" {
			return fmt.Errorf("GCE networks in legacy mode are not supported.  Please convert to auto mode or specify a different network.")
		}
		empty := &Network{}
		if !reflect.DeepEqual(empty, changes) {
			return fmt.Errorf("cannot apply changes to Network: %v", changes)
		}
	}

	return nil
}

type terraformNetwork struct {
	Name                  *string `cty:"name"`
	IPv4Range             *string `cty:"ipv4_range"`
	Project               *string `cty:"project"`

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Read the operation error detail in the %w chain
  2. Verify whether the network was created (gcloud compute networks describe)
  3. Fix the underlying cause (CIDR overlap, quotas) and re-run the apply
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/gcetasks/network.go:180 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/7ff33b4188d28272. Report an issue: GitHub.