apply_ap_config: a step refused inside the detached script is not reported #54

Closed
opened 2026-11-29 20:13:30 +00:00 by christianmanivong · 0 comments
Owner

apply_ap_config(config, parts) (napalm-openwrt 0.11.0, branch feature/declared-ap-methods-695, NetOrk/netork#695) writes the access point's configuration as one shell script, run detached on the AP: it rebuilds the bridge, which restarts the AP, and may cut the session. Its steps are not checked the way #35 checks the narrow writes. A refused uci set inside the script ends up in apply.log on the AP, and the call has already returned with the part listed as applied.

This is the builder netOrk had in _uci_builders.py, moved over unchanged in what it writes. It had the same gap there.

What would close it, test first:

  • set -e style checking per part, or a status line per part in the log (__part=<name> rc=$?), and
  • a getter (or a second call) that reads apply.log back once the AP answers again, so the caller can tell an applied part from a refused one. netOrk polls 30 s (90 s after a bridge rebuild) after the run and recomputes the drift, which catches a refusal only indirectly.

Prio: P3. A refused step leaves drift that the next poll shows again, but the run says it applied it.

`apply_ap_config(config, parts)` (napalm-openwrt 0.11.0, branch `feature/declared-ap-methods-695`, NetOrk/netork#695) writes the access point's configuration as one shell script, run detached on the AP: it rebuilds the bridge, which restarts the AP, and may cut the session. Its steps are not checked the way #35 checks the narrow writes. A refused `uci set` inside the script ends up in `apply.log` on the AP, and the call has already returned with the part listed as `applied`. This is the builder netOrk had in `_uci_builders.py`, moved over unchanged in what it writes. It had the same gap there. What would close it, test first: - `set -e` style checking per part, or a status line per part in the log (`__part=<name> rc=$?`), and - a getter (or a second call) that reads `apply.log` back once the AP answers again, so the caller can tell an applied part from a refused one. netOrk polls 30 s (90 s after a bridge rebuild) after the run and recomputes the drift, which catches a refusal only indirectly. Prio: P3. A refused step leaves drift that the next poll shows again, but the run says it applied it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-openwrt#54