openshift / openshift/oadp-operator

Makefile container tool check only verifies binary exists, not runtime readiness

Open Beginner friendly
#2,249 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lifecycle/stale
Dominant language
Go
Stars
92
Forks
93
Avg merge
1d 23h
Merged PRs (30d)
43

Description

Problem

The Makefile's container tool availability check uses command -v which only verifies the binary exists on PATH:

ifeq ($(shell command -v $(CONTAINER_TOOL) >/dev/null 2>&1 && echo found),)
  $(error The selected container tool '$(CONTAINER_TOOL)' is not available on this system.)
endif

On macOS with Podman, the podman binary is always present even when the Podman machine is stopped. This means the check passes, the Makefile proceeds with targets like deploy-olm (which first runs undeploy-olm), and only fails later when podman build is actually invoked. By that point, the existing deployment may already be torn down.

Expected behavior

The Makefile should detect that the container runtime is not functional before executing any destructive operations (like undeploy-olm). A check like podman info or docker info would verify the daemon/machine is actually running.

Suggested fix

Replace the command -v check with a runtime health check:

ifeq ($(shell $(CONTAINER_TOOL) info >/dev/null 2>&1 && echo found),)
  $(error The container tool '$(CONTAINER_TOOL)' is installed but not running. For podman on macOS, run: podman machine start)
endif

[!Note]
Responses generated with Claude

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the Makefile at the container tool availability check and review how it runs before targets such as deploy-olm and undeploy-olm. Verify the check tests runtime readiness for the selected container tool, then exercise the relevant Make targets with a stopped runtime to confirm destructive operations are not reached first.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
build-system, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.