Class ContainerStartupDiagnostics

java.lang.Object
io.jenkins.plugins.swarmcloud.diagnostics.ContainerStartupDiagnostics

public final class ContainerStartupDiagnostics extends Object
Pattern-based diagnostics for Docker / OCI runtime errors observed when a Swarm task fails to start the agent container. The goal is to convert the cryptic "exec: \"...\": no such file or directory" message into a one-line actionable hint that points the user at the right knob (disableContainerArgs, entrypoint:, or switching to jenkins/inbound-agent).

Used by SwarmComputerLauncher when polling the failing Swarm task's Status.Err field.

  • Method Details

    • hintFor

      @CheckForNull public static String hintFor(@CheckForNull String taskError)
      Returns a human-readable hint for a Swarm task error string, or null if no known pattern matches.

      Recognised patterns:

      • Args used as command (no ENTRYPOINT in image). The would-be executable is an http(s):// URL — that is the Jenkins URL the plugin passes as the first positional arg. Recommend disableContainerArgs: true, setting entrypoint: on the template, or switching to jenkins/inbound-agent.
      • Custom entrypoint binary missing. The would-be executable is a path (/usr/... or bin/...) that does not exist in the image. Hint the user to check the entrypoint: value or the image's installed binaries.
      Parameters:
      taskError - the Task.Status.Err string reported by Docker Swarm; may be null
      Returns:
      a single-line hint suitable for the build log, or null when nothing matches