IPA: Spawning container fails with "execv() failed"

Bug #1470199 reported by Jacob McCann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Undecided
Jacob McCann

Bug Description

When building my own IPA from https://github.com/openstack/ironic-python-agent the agent does not seem to start. Configuring my IPA to allow me to login I found the following:

-- Unit ironic-python-agent.service has begun starting up.
Jun 30 13:21:17 host-192-168-50-113 systemd-nspawn[638]: Spawning container ironic_python_agent on /opt/ironic-python-agent.
Jun 30 13:21:17 host-192-168-50-113 systemd-nspawn[638]: Press ^] three times within 1s to kill container.
Jun 30 13:21:17 host-192-168-50-113 systemd-nspawn[638]: execv() failed: No such file or directory
Jun 30 13:21:17 host-192-168-50-113 systemd-nspawn[638]: Container ironic_python_agent failed with error code 1.
Jun 30 13:21:17 host-192-168-50-113 systemd[1]: ironic-python-agent.service: main process exited, code=exited, status=1/FAILURE
Jun 30 13:21:17 host-192-168-50-113 systemd[1]: Unit ironic-python-agent.service entered failed state.
Jun 30 13:21:17 host-192-168-50-113 systemd[1]: ironic-python-agent.service failed.

I then tried to do it manually and got the same error. I then started the container without running /usr/local/bin/ironic-python-agent to have a prompt inside the container. If I then run /usr/local/bin/ironic-python-agent while in the container I get:

host-192-168-50-113 ~ # /usr/bin/systemd-nspawn -D /opt/ironic-python-agent \
> --share-system \
> --capability=all \
> --machine=ironic_python_agent \
> --bind=/dev:/dev \
> --bind=/dev/pts:/dev/pts \
> --bind=/proc:/proc \
> --bind=/sys:/sys \
> --bind=/usr/share/oem:/mnt \
> --user=root \
> --keep-unit
Spawning container ironic_python_agent on /opt/ironic-python-agent.
Press ^] three times within 1s to kill container.
root@host-192-168-50-113:~# /usr/local/bin/ironic-python-agent
-bash: /usr/local/bin/ironic-python-agent: /usr/bin/python: bad interpreter: No such file or directory
root@host-192-168-50-113:~# ls /usr/bin/pyth*
/usr/bin/python2.7
root@host-192-168-50-113:~#

It seems /usr/bin/python is missing. A workaround is to comment out the last 'cleanup' section in the Dockerfile (https://github.com/openstack/ironic-python-agent/blob/master/Dockerfile#L28-L31) and create the IPA again. Then everything seems to start and work normally.

Tags: agent
Changed in ironic:
assignee: nobody → Jacob McCann (jmccann)
status: New → In Progress
Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.