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
- Upsert the DesiredRoute before calling UpsertRouteWait
- Verify the route key matches the DesiredRouteIndex key format
- Check whether another component deleted the route concurrently
- 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
- Always upsert the DesiredRoute before calling UpsertRouteWait
- Use the exact index key format of DesiredRouteIndex
- Guard against concurrent deletes of the same route
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
- device no longer exists
- timeout waiting for parameter %s reconciliation: %w
- timeout waiting for parameter %s reconciliation
- failed to write update event to WAL: %w
- bad key, expected "table:prefix:priority", got %s: %w
AI-assisted analysis of cilium/cilium@ac7b90affa (2026-08-31).
Data as JSON: /api/errors/92b2104da2c45f00.
Report an issue: GitHub.