oc adm node-image create fails with "curl: (22) The requested URL returned error: 401" when adding multiple worker nodes
Issue
When attempting to add multiple worker nodes to an existing OpenShift cluster using oc adm node-image create, the second and subsequent nodes fail to join the cluster with HTTP 401 authentication errors.
Symptoms:
- First node joins successfully
- Second and subsequent nodes boot from their respective ISOs but fail to register
- Installation process hangs during the agent registration phase
- SSH access to the failing nodes (as core user) shows HTTP 401 errors in logs
Error in journalctl:
wait-for-assisted-service.sh[<pid>]: curl: (22) The requested URL returned error: 401
start-agent.sh[<pid>]: Querying assisted-service for infra-env-id...
service[<pid>]: time="<timestamp>" level=debug msg="Request: {GET /api/assisted-install/v2/infra-envs HTTP/1.1..."
start-agent.sh[<pid>]: jq: error (at <stdin>:0): Cannot index object with number
Common scenario:
# User generates separate ISO for each node
oc adm node-image create --mac-address='AA:BB:CC:DD:EE:01' # worker1 - SUCCESS
oc adm node-image create --mac-address='AA:BB:CC:DD:EE:02' # worker2 - 401 ERROR
oc adm node-image create --mac-address='AA:BB:CC:DD:EE:03' # worker3 - 401 ERROR
Environment
- OpenShift Container Platform 4.18+
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.