cilium/cilium · error

route %s not found

Error message

route %s not found

What it means

waitForReconciliation (used by UpsertRouteWait) queries the statedb DesiredRouteIndex for the requested route key. If no desired route object exists in the table, it immediately returns 'route %s not found' instead of waiting for reconciliation.

Source

Thrown at pkg/datapath/linux/route/reconciler/manager.go:201

	if err := m.selectRoutes(txn, route.GetOwnerlessKey()); err != nil {
		return err
	}

	txn.Commit()
	return nil
}

const reconciliationTimeout = 1 * time.Second

func (m *DesiredRouteManager) waitForReconciliation(routeKey DesiredRouteKey) error {
	t := time.NewTimer(reconciliationTimeout)
	defer t.Stop()

	var err error
	for {
		obj, _, watch, found := m.tbl.GetWatch(m.db.ReadTxn(), DesiredRouteIndex.Query(routeKey))
		if !found {
			return fmt.Errorf("route %s not found", routeKey)
		}

		if obj.status.Kind == reconciler.StatusKindDone {
			// already reconciled
			return nil
		}

		select {
		case <-t.C:
			if err != nil {
				return fmt.Errorf("timeout waiting for parameter %s reconciliation: %w", routeKey, err)
			}
			return fmt.Errorf("timeout waiting for parameter %s reconciliation", routeKey)
		case <-watch:
			if obj.status.Kind == reconciler.StatusKindDone {
				return nil
			}
			if obj.status.Kind == reconciler.StatusKindError {

View on GitHub (pinned to ac7b90affa)

Solutions

  1. Upsert the DesiredRoute before calling UpsertRouteWait
  2. Verify the route key matches the DesiredRouteIndex key format
  3. Check whether another component deleted the route concurrently
  4. Inspect the statedb table to confirm the route exists
Defensive patterns

Strategy: validation

Validate before calling

// ensure the desired route exists before waiting
txn := db.WriteTxn(obj)
_, _, err := tbl.Insert(txn, obj)
txn.Commit()
if err != nil { return err }
return mgr.UpsertRouteWait(ctx, routeKey, timeout)

Type guard

if _, _, found := tbl.GetWatch(db.ReadTxn(), DesiredRouteIndex.Query(routeKey)); !found { return fmt.Errorf("no desired route for %s", routeKey) }

Try / catch

if err := mgr.UpsertRouteWait(ctx, route, timeout); err != nil {
    if strings.HasPrefix(err.Error(), "route ") && strings.HasSuffix(err.Error(), " not found") { /* upsert first */ }
    return err
}

Prevention

When it happens

Trigger: Calling UpsertRouteWait with a route key that was never inserted (or already deleted) into the route reconciler's statedb table.

Common situations: Caller builds a route key that doesn't match the stored DesiredRoute (index mismatch); a concurrent Delete removed the route before the wait; route upsert skipped due to earlier validation failure.

Related errors


AI-assisted analysis of cilium/cilium@ac7b90affa (2026-08-31). Data as JSON: /api/errors/92b2104da2c45f00. Report an issue: GitHub.