At a glance

Problem

A real-time MLOps deployment on an MLflow or Hydrogen Torch Python runtime never starts. The runtime container is rejected with CreateContainerConfigError.

Affects

MLOps 1.0.13 (runtime images v1.7.12) on clusters that enforce runAsNonRoot on the scorer container. MOJO and DAI Python Pipeline Scorer runtimes are not affected.

Workaround

Add a new runtime with a numeric user under extraByom and switch the affected deployments to it.

Solution

Set a numeric runAsUser / runAsGroup in the containerSecurityContext of the affected runtimes only, or upgrade MLOps to a release whose runtime images use a numeric user.

Problem

A new real-time deployment on the MLflow or Hydrogen Torch Python runtime never becomes healthy. The init containers (artifact-fetcher, artifact-processor) finish and the model files extract correctly, but the kubelet refuses to start the runtime container. Retries fail the same way, so the problem is not transient.

Warning  Failed  <timestamp>  kubelet  Error: container has runAsNonRoot and image has non-numeric user (nonroot), cannot verify user is non-root
Container current state: waiting (reason: CreateContainerConfigError)

# Hydrogen Torch runtime shows the same error with (runtime-user)

# proxy.log (downstream symptom)
http: proxy error: dial tcp [::1]:8080: connect: connection refused

The line that identifies this issue is image has non-numeric user (...). The proxy's connection refused and the readiness probe's 502 are side effects: the scorer container never starts, so nothing listens on port 8080.

Affected versions

Product

H2O MLOps 1.0.13 (shipped with HAIC 25.08.2), runtime images v1.7.12

Component

MLflow / Python runtime (USER nonroot) and Hydrogen Torch runtime (USER runtime-user)

Deployment

Kubernetes clusters where the scorer container runs with runAsNonRoot: true and no numeric runAsUser. Confirmed on VMware Tanzu.

Trigger

Creating or restarting a real-time deployment on one of the two runtimes above

Not a factor

DAI MOJO and DAI Python Pipeline Scorer runtimes: their v1.7.12 images already declare a numeric user (65532:65532). The model artifact itself: the init containers extract it correctly.

Fixed in

Newer runtime images declare a numeric user (USER 65532), so no override is needed: mlops-runtimes v2.3.9 (MLflow/Python, H2O-3 MOJO), ht-mlops-scorers v2.3.12 (Hydrogen Torch) and dai-mlops-scorers v2.1.7. These need an MLOps upgrade; swapping images on 1.0.x is not supported. Not confirmed: the first MLOps release that bundles these images.

Cause

The deployment's scorer container is required to run as non-root (runAsNonRoot: true), but no numeric runAsUser is set. The MLflow and Hydrogen Torch runtime images in v1.7.12 declare their user by name (nonroot, runtime-user) rather than by numeric UID.

With a named user and no numeric UID, the kubelet cannot prove the container will not run as root. It therefore rejects the container at admission with CreateContainerConfigError, before any scoring code runs.

What this is not

Theory

Status

A corrupt or incompatible model artifact

Ruled out. The init containers download and extract the artifact successfully; the failure happens only when the runtime container is admitted.

A problem with every runtime

Ruled out. DAI MOJO and DAI Python Pipeline Scorer runtimes in the same release use a numeric user and start normally.

A transient scheduling error

Ruled out. Repeated attempts on new pods fail identically.

Workaround

To avoid editing the default runtime list, add a new runtime under config.deployer.extraByom.runtimes. Give it a new name, the same fields as the original MLflow or Hydrogen Torch entry, and the containerSecurityContext shown below. Then switch the affected deployments to the new runtime. Existing deployments on other runtimes are untouched.

Solution

Set a numeric user on the affected runtimes only, through the h2oai-mlops Helm values. Every entry in config.deployer.byom.runtimes has its own containerSecurityContext, which applies only to that runtime's scorer container:

config:
  deployer:
    byom:
      runtimes:
        # ...all other default entries, copied unchanged...
        - name: "<MLflow runtime name from your default list>"
          # ...all other fields of this entry, copied unchanged...
          image:
            repository: "h2oai-modelscoring-mlflowscorer"
            tag: "v1.7.12-py3.9.22"
          containerSecurityContext:
            runAsNonRoot: true
            runAsUser: 65532
            runAsGroup: 65532
        - name: "<Hydrogen Torch runtime name from your default list>"
          # ...same change for the Hydrogen Torch entry...
          containerSecurityContext:
            runAsNonRoot: true
            runAsUser: 65532
            runAsGroup: 65532

Before you apply this:

  • Helm replaces lists whole. If your override contains only the Python entries, every other runtime, MOJO included, disappears. Copy the full default runtimes list from your chart's values.yaml and change only the affected entries. If you'd rather not copy the list, use the workaround above.
  • Leave securityContext.container and global.securityContext.container unset. The chart merges both into every runtime, which brings back an override that applies to everything.
  • Per-deployment settings are not available in 1.0.13. The deployment API has no security-context field. Per runtime is the finest level; the extra runtime in the workaround is the closest thing to per deployment.

A global security context set through the umbrella chart also resolves the error, but it applies to every pod. Use it only if that matches your security requirements.

After the values change, upgrade the Helm release and recreate the affected deployments.

How to verify

  1. Confirm the override reached the runtime container (look for runAsUser: 65532 under the runtime container's securityContext):
    kubectl get pod <deployment-pod> -n <namespace> -o yaml | grep -A5 securityContext
  2. Confirm the runtime container is running and ready rather than waiting:
    kubectl get pod <deployment-pod> -n <namespace>
    kubectl describe pod <deployment-pod> -n <namespace> | grep -i "non-numeric"
    The second command should return nothing.
  3. Confirm the MOJO runtimes are still listed when you create a new deployment. If they are missing, the override replaced the runtime list; see the first warning under Solution.
  4. Send a scoring request to the deployment and confirm a response.

If this doesn't resolve it

Open a support ticket and include:

  • Your MLOps version and HAIC version
  • The runtime name and image tag the deployment uses
  • The full pod event for the runtime container (kubectl describe pod <deployment-pod> -n <namespace>)
  • The containerSecurityContext you set, and the rendered pod spec (kubectl get pod <deployment-pod> -n <namespace> -o yaml)
  • Any Pod Security or admission policy on the cluster that requires a specific UID range

Related