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 |
Affects | MLOps 1.0.13 (runtime images v1.7.12) on clusters that enforce |
Workaround | Add a new runtime with a numeric user under |
Solution | Set a numeric |
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 refusedThe 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 ( |
Deployment | Kubernetes clusters where the scorer container runs with |
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 ( |
Fixed in | Newer runtime images declare a numeric user ( |
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: 65532Before 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
runtimeslist from your chart'svalues.yamland change only the affected entries. If you'd rather not copy the list, use the workaround above. - Leave
securityContext.containerandglobal.securityContext.containerunset. 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
- Confirm the override reached the runtime container (look for
runAsUser: 65532under theruntimecontainer'ssecurityContext):kubectl get pod <deployment-pod> -n <namespace> -o yaml | grep -A5 securityContext - Confirm the runtime container is running and ready rather than waiting:
The second command should return nothing.kubectl get pod <deployment-pod> -n <namespace> kubectl describe pod <deployment-pod> -n <namespace> | grep -i "non-numeric" - 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.
- 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
runtimecontainer (kubectl describe pod <deployment-pod> -n <namespace>) - The
containerSecurityContextyou 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
- Kubernetes — Configure a Security Context for a Pod or Container
- Fix: DAI Python Pipeline Scorer deployment OOMKilled at the default 181Mi memory limit: a separate failure on the Python Pipeline Scorer runtime that can show up on the same deployments.