Skip to content
LinkState
Go back

Controller Outage Approval Modes

Introduction to Autonomy in System Failure

Definition of Autonomy in System Context

Autonomy, in the context of network and infrastructure operations, refers to the capability of a system to perceive its state, make decisions, and execute actions without continuous human intervention, while adhering to predefined policy boundaries. An autonomous component typically combines sensing (telemetry, health checks), reasoning (policy evaluation, risk assessment), and actuation (configuration changes, service restarts) within a closed-loop control architecture.

Importance of Autonomy During Partial Failures

When a subset of controllers or inventory data becomes unavailable, the operational surface shrinks but critical services often must continue. Autonomy can:

Understanding Partial Controller or Inventory Failure

Types of Partial Failures

Failure ModeTypical SymptomsUnderlying Cause
Controller node crashOne or more instances of a SDN controller (e.g., OpenDaylight, ONOS) stop responding; southbound protocols (NETCONF, gNMI) time‑out.Hardware fault, OS panic, software bug, resource exhaustion.
Inventory shard lossPortion of the device inventory database becomes read‑only or missing; queries for a subset of devices return empty or stale data.Replication lag, split‑brain in distributed datastore (etcd, Cassandra), disk corruption.
Partial southbound disconnectSome devices lose NETCONF/gNMI sessions while others remain connected; telemetry gaps appear per‑region.Flapping links, ACL misconfigurations, QoS policers dropping protocol packets.
Control‑plane isolationController can reach the data plane but cannot reach the inventory service (or vice‑versa) due to network partitioning.Misconfigured VRF, firewall rule change, BGP blackhole.

Impact of Partial Failures on System Operations

Approval Paths and Their Role in Autonomy

Definition and Function of Approval Paths

An approval path is the structured workflow that validates a proposed change against business, security, and operational policies before it is applied. Typical steps include:

  1. Change request creation (via CLI, GUI, or API).
  2. Policy evaluation (e.g., change‑window, impact analysis, peer review).
  3. Authorized sign‑off (human or automated approver).
  4. Enqueue for execution (often via a change‑management system like ServiceNow, Jira, or a custom webhook).

In autonomous systems, the approval path may be fully automated (policy‑as‑code) or semi‑automated (human‑in‑the‑loop for high‑risk changes).

Consequences of Approval Path Degradation

When the approval path is degraded:

Source of Truth and Its Significance

Definition and Importance of Source of Truth

The Source of Truth (SoT) is the authoritative repository that stores the desired state of the network: device inventory, intended configuration, topology, and policy bindings. In modern architectures this is often a Git repository (NetOps/GitOps) or a distributed key‑value store (etcd, Consul) synchronized with the controller.

The SoT enables:

Effects of Source of Truth Degradation on Autonomy

If the SoT is partially unavailable or corrupted:

Rollback Channels and Their Purpose

Definition and Function of Rollback Channels

A rollback channel is the mechanism by which a previously applied change can be reversed, restoring the system to a known good state. It typically comprises:

Consequences of Rollback Channel Degradation

When rollback channels are degraded:

Autonomy Response to Simultaneous Degradation

Initial Assessment and Prioritization

When approval paths, SoT, and rollback channels are all impaired, the autonomy engine must:

  1. Detect degradation via health‑check endpoints (e.g., /ready on controller, inventory DB lag metrics, approval‑service heartbeat).
  2. Classify failure scope (local vs. global) using quorum checks (e.g., etcd member list, consensus leader status).
  3. Prioritize actions:
    • Safety first: Preserve data‑plane forwarding and prevent loops.
    • Minimize new risk: Defer non‑essential changes.
    • Enable manual intervention: Expose degraded state via alerts and runbooks.

A typical decision tree (pseudo‑code) might look like:

def assess_degradation():
    controller_ok = ping_controller() and check_controller_health()
    sot_ok      = check_inventory_lag() < MAX_LAG and check_inventory_quorum()
    approval_ok = check_approval_service_heartbeat()
    rollback_ok = check_rollback_store_availability()

    if not controller_ok:
        return "CONTROLLER_DOWN"
    if not sot_ok:
        return "SOT_DEGRADED"
    if not approval_ok:
        return "APPROVAL_DEGRADED"
    if not rollback_ok:
        return "ROLLBACK_DEGRADED"
    return "HEALTHY"

Temporary Workarounds and Contingency Plans

Degraded ComponentContingencyTrigger ConditionAction
Approval PathPre‑approved change windowapproval_degraded AND change_requestedAllow low‑risk changes (e.g., interface description) if they match a pre‑signed policy bundle.
Source of TruthLocal cache fallbacksot_degraded AND cache_validUse the last‑known‑good snapshot cached on each controller node for reconciliation.
Rollback ChannelImmediate inverse generationrollback_degraded AND change_appliedEmit inverse NETCONF config directly from the change diff and push to device; store diff locally for later persistence.
ControllerDistributed autonomous agentscontroller_downEach agent runs a lightweight policy engine (e.g., OPA) using locally cached SoT and makes forwarding‑plane‑only adjustments.

Code Examples for Automated Contingency Measures

Below is a Python snippet that implements a local‑cache fallback for the SoT when the inventory service lag exceeds a threshold. It assumes each controller runs a side‑car process that periodically snapshots the inventory etcd store to a local RocksDB instance.

import time
import rocksdb
import json
from grpc import insecure_channel
from inventory_pb2 import GetDeviceRequest
from inventory_pb2_grpc import InventoryServiceStub

INVENTORY_LAG_SEC = 5
CACHE_DB_PATH = "/var/lib/autonomy/sot_cache.db"

def _open_cache():
    return rocksdb.DB(CACHE_DB_PATH, rocksdb.Options(create_if_missing=True))

def get_device_from_cache(device_id: str):
    db = _open_cache()
    raw = db.get(device_id.encode())
    db.close()
    if raw is None:
        raise KeyError(f"Device {device_id} not in cache")
    return raw.decode()

def get_device_with_fallback(device_id: str) -> dict:
    # Try live inventory first
    try:
        channel = insecure_channel("inventory-svc:50051")
        stub = InventoryServiceStub(channel)
        resp = stub.GetDevice(GetDeviceRequest(device_id=device_id), timeout=2)
        # Update cache on success
        db = _open_cache()
        db.put(device_id.encode(), resp.json.encode())
        db.close()
        return resp.json
    except Exception as e:
        # Live call failed or timed out – check lag
        lag = get_inventory_replication_lag()  # external metric fetch
        if lag > INVENTORY_LAG_SEC:
            # Fallback to cache
            try:
                return json.loads(get_device_from_cache(device_id))
            except KeyError:
                raise RuntimeError(
                    f"Both live inventory and cache unavailable for {device_id}"
                ) from e
        else:
            # Transient glitch – retry shortly
            time.sleep(0.5)
            return get_device_with_fallback(device_id)

Explanation of safety bounds:

Troubleshooting Strategies for Autonomy

Identifying Root Causes of Failure

A systematic approach combines layered health checks, consensus diagnostics, and telemetry correlation:

  1. Controller healthcurl -s http://controller:8080/ready → 200/503.
  2. Inventory quorumetcdctl endpoint status --cluster -w table.
  3. Approval servicesystemctl show approval-svc --property=ActiveState.
  4. Rollback storels -l /var/rollback/snapshots/*.json | wc -l.
  5. Data‑plane impactshow ip route | grep <affected-prefix> on representative routers.

If multiple layers fail simultaneously, the common dependency (e.g., network partition, shared storage) is suspect.

CLI Commands for Diagnostic Purposes

PurposeCommand (example)Expected Output
Verify controller reachabilitycurl -v http://controller01:8080/healthHTTP/1.1 200 OK
Check etcd cluster healthetcdctl endpoint healthhttps://10.0.0.1:2379 is healthy: successfully committed proposal: took = 7.894ms
Inventory replication lagwatch -n 1 "etcdctl endpoint status --write-out='{\"lag\":%{lag}}'"JSON with lag field (seconds)
Approval service logsjournalctl -u approval-svc -fStream of log lines; look for ERROR or timeout
Rollback snapshot availability`ls -lt /var/rollback/snapshotshead -5`
Telemetry drift detectiongnmi_cli -addr router1:9339 -path "/interfaces/interface[name=eth0]/state/counters/in-discards" -timeout 5sCounter value; compare to baseline

Example Use Cases for Troubleshooting Tools


Share this post on:

Previous Post
Migrating telemetry paths from vendor native to OpenConfig
Next Post
Multi-command joins in an operator workbench