Repository navigation
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream cEOSLab disables the EOS
reloadandshow reloadCLI commands viaCliPlugin.ReloadCli.notCeosGuard, causing Octa'sgnoi.system.Reboothandler (which executesshow reloadfollowed byreload in 0 forceviaConfigAgent) to fail withCli command execution failed.This change mounts a
usercustomize.pyruntime hook into/mnt/flash/usercustomize.pyvia the<node>-configConfigMap and setsPYTHONPATH=/mnt/flashin the container environment so that EOS CLI processes (ConfigAgentandCli) interceptCliPlugin.ReloadClion import:notCeosGuardis active, the hook lifts the guard onreload/show reloadand replacesdoReloadwith a handler that haltssystemd(PID 1) viaSIGRTMIN+3, allowingkubeletto restart the container in place while preserving the pod network namespace and startup config.reloadon cEOSLab,notCeosGuard(None, None)returnsNoneand the hook becomes a no-op.