feat(container-engine): run the engine CLI privileged on request #19

Merged
christianmanivong merged 1 commits from feat/privileged-cli into main 2026-10-07 20:11:13 +00:00
Owner

ContainerEngineConnection.run_cli() and stream_cli() take privileged= and pass it to the driver's run_command() / open_stream(). An engine that refuses the login user can then be retried as root, the same way the driver gains root for any command.

netOrk uses this to retry a refused container start/stop/restart with sudo (NetOrk/netork#773).

  • Additive: the default is privileged=False, so existing callers are unchanged.
  • Version 2.7.0.
  • Tests: TestPrivilegedCli (3), 383 passed.
`ContainerEngineConnection.run_cli()` and `stream_cli()` take `privileged=` and pass it to the driver's `run_command()` / `open_stream()`. An engine that refuses the login user can then be retried as root, the same way the driver gains root for any command. netOrk uses this to retry a refused container start/stop/restart with sudo (NetOrk/netork#773). - Additive: the default is `privileged=False`, so existing callers are unchanged. - Version 2.7.0. - Tests: `TestPrivilegedCli` (3), 383 passed.
christianmanivong added 1 commit 2026-10-07 20:08:44 +00:00
feat(container-engine): run the engine CLI privileged on request
CI / test (3.10) (push) Successful in 23s
CI / test (3.11) (push) Successful in 23s
CI / test (3.12) (push) Successful in 24s
CI / test (3.10) (pull_request) Successful in 23s
CI / test (3.11) (pull_request) Successful in 22s
CI / test (3.12) (pull_request) Successful in 23s
e50e497939
run_cli() and stream_cli() take privileged=, passed to the driver's
run_command()/open_stream(): an engine that refuses the login user can
be retried as root, the way the driver gains root for any command.
netOrk uses it to retry a refused container start/stop/restart with
sudo (NetOrk/netork#773).
christianmanivong merged commit eb80d5cb0d into main 2026-10-07 20:11:13 +00:00
christianmanivong deleted branch feat/privileged-cli 2026-10-07 20:11:13 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-device-types#19