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

Open
opened 2026-09-25 12:43:56 +00:00 by christianmanivong · 0 comments
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.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-linux#3