get_docker_info reports garbled output the same as "Docker not installed" #3

Closed
opened 2026-09-25 12:43:56 +00:00 by christianmanivong · 1 comment
Owner

Found while fixing christianmanivong/netork#331.

get_docker_info returns a plain {"available": False} in two different situations:

  1. command -v docker finds no binary — Docker is not installed. netOrk now (netork#331) treats this as definite and retires the host's service instances.
  2. The combined output lacks the ---CONTAINERS--- marker — i.e. the output was garbled or cut short.

Case 2 is "could not look", not "not there", and should either raise or be reported differently (e.g. an explicit "installed": False flag for case 1). Impact today is small (a netmiko timeout raises rather than returning partial output, and the soft-deactivation reverts on the next good poll), but the two answers should not share a shape.

Found while fixing christianmanivong/netork#331. `get_docker_info` returns a plain `{"available": False}` in two different situations: 1. `command -v docker` finds no binary — Docker is not installed. netOrk now (netork#331) treats this as definite and retires the host's service instances. 2. The combined output lacks the `---CONTAINERS---` marker — i.e. the output was garbled or cut short. Case 2 is "could not look", not "not there", and should either raise or be reported differently (e.g. an explicit `"installed": False` flag for case 1). Impact today is small (a netmiko timeout raises rather than returning partial output, and the soft-deactivation reverts on the next good poll), but the two answers should not share a shape.
Author
Owner

Obsolete: get_docker_info was removed in 3333d8e ("refactor!: drop the Docker CLI methods", 2026-10-08); netOrk reads containers through the Engine API.

Obsolete: `get_docker_info` was removed in 3333d8e ("refactor!: drop the Docker CLI methods", 2026-10-08); netOrk reads containers through the Engine API.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-linux#3