USER GUIDE
CLI: validate / reload / test
Purpose¶
Validate YAML offline, request a config reload through the API, and dry-run hook scripts — the safe path before touching production networking.
When to use it¶
- Before every edit to
/etc/netevd/netevd.yaml - After adding or renaming hook scripts (validate + restart/reload)
- When developing a new hook: preview environment variables without firing real events
How to get there¶
- Commands:
netevd validate,netevd reload,netevd test,netevd version - Config path:
/etc/netevd/netevd.yaml(override with-c/--config) - Global flags on the daemon binary:
--dry-run,-v(verbose)
Operate from CLI¶
- Validate the live config (default path):
sudo netevd validate
- Validate a staged file before install:
netevd validate -c /tmp/netevd.yaml
- Request reload via API (preferred when the daemon supports hot reload):
netevd reload --endpoint http://127.0.0.1:9090
curl -X POST http://127.0.0.1:9090/api/v1/reload -H 'Content-Type: application/json' -d '{}'
- When reload is not yet applied server-side, restart the unit (config + hook directory changes):
sudo systemctl restart netevd
journalctl -u netevd -n 30 --no-pager
- Dry-run the daemon (no script execution, no routing mutations):
sudo netevd --dry-run -c /etc/netevd/netevd.yaml start -f
- Preview hook environment for a script under test:
netevd test /etc/netevd/routable.d/01-notify.sh -i eth0 -t routable --ip 192.168.1.10
- Print build/feature matrix:
netevd version --detailed
-
Empty / fail: Validation errors name the YAML key; reload returns
success: false→ fall back tosystemctl restart netevd; test mode prints env but does not execute — confirm with a real link bounce +journalctl. -
Success:
✓ Configuration is validsummary lists backend, interfaces, and policy rules; daemon restarts cleanly; test output shows expected$LINK,$STATE,$ADDRESSES.