Skip to content

arista: monkey-patch CliPlugin.ReloadCli for cEOS gNOI System.Reboot - #799

Draft
kraney wants to merge 1 commit into
openconfig:mainfrom
kraney:ceos-reboot-monkeypatch
Draft

kraney wants to merge 1 commit into
openconfig:mainfrom
kraney:ceos-reboot-monkeypatch

Conversation

@kraney

@kraney kraney commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Upstream cEOSLab disables the EOS reload and show reload CLI commands via CliPlugin.ReloadCli.notCeosGuard, causing Octa's gnoi.system.Reboot handler (which executes show reload followed by reload in 0 force via ConfigAgent) to fail with Cli command execution failed.

This change mounts a usercustomize.py runtime hook into /mnt/flash/usercustomize.py via the <node>-config ConfigMap and sets PYTHONPATH=/mnt/flash in the container environment so that EOS CLI processes (ConfigAgent and Cli) intercept CliPlugin.ReloadCli on import:

  • When notCeosGuard is active, the hook lifts the guard on reload / show reload and replaces doReload with a handler that halts systemd (PID 1) via SIGRTMIN+3, allowing kubelet to restart the container in place while preserving the pod network namespace and startup config.
  • Once a future EOS release natively supports reload on cEOSLab, notCeosGuard(None, None) returns None and the hook becomes a no-op.

Upstream cEOSLab disables the EOS `reload` and `show reload` CLI commands
via `CliPlugin.ReloadCli.notCeosGuard`, causing Octa's `gnoi.system.Reboot`
handler (which executes `show reload` followed by `reload in 0 force` via
ConfigAgent) to fail with `Cli command execution failed`.

Mount a `usercustomize.py` hook into `/mnt/flash/usercustomize.py` via the
`<node>-config` ConfigMap and set `PYTHONPATH=/mnt/flash` in the container
environment so that EOS CLI processes (`ConfigAgent` and `Cli`) intercept
`CliPlugin.ReloadCli` on import. When `notCeosGuard` is active, the hook
lifts the guard and replaces `doReload` with a handler that halts `systemd`
(PID 1) via `SIGRTMIN+3`, allowing `kubelet` to restart the container in
place while preserving the pod network namespace and startup config. Once a
future EOS release natively supports `reload` on cEOSLab, `notCeosGuard`
returns `None` and the hook becomes a no-op.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant