DIB IPA image needlessly installs python2.7

Bug #1678656 reported by Julia Kreger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Confirmed
Undecided
Unassigned
ironic-python-agent
Incomplete
Low
Unassigned

Bug Description

When building an ubuntu-minimal IPA image using diskimage-builder (current release as of 20170402), creation of an IPA image using `disk-image-create -o ubuntu-minimal-ipa ubuntu-minimal ironic-agent` results in python2.7 being installed along side py3x, which ultimately only makes the IPA image needlessly larger.

We should support whatever version python is present. This appears to be due to the installation of python-dev which is a python-2.7 package, where python3-dev on Ubuntu Xenial would be more ideal.

Revision history for this message
Dmitry Tantsur (divius) wrote :

To change the python version we need to modify https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/ironic-agent/pkg-map. But I'm not sure how to make the services created by that element to pick the right python.. I'm moving this to DIB as the element still lives there.

Changed in diskimage-builder:
status: New → Confirmed
Changed in ironic-python-agent:
status: New → Incomplete
Revision history for this message
Yang Youseok (ileixe) wrote :

ipa now does not support python2 so this problem becamse worse since ipa does not initialized at all

root@ubuntu:~# systemctl status ironic-python-agent.service
● ironic-python-agent.service - Ironic Python Agent
   Loaded: loaded (/usr/lib/systemd/system/ironic-python-agent.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2020-01-30 06:40:40 UTC; 1s ago
  Process: 1268 ExecStart=/usr/local/bin/ironic-python-agent (code=exited, status=1/FAILURE)
  Process: 1267 ExecStartPre=/sbin/modprobe vfat (code=exited, status=0/SUCCESS)
 Main PID: 1268 (code=exited, status=1/FAILURE)
root@ubuntu:~# journalctl -fu ironic-python-agent
-- Logs begin at Thu 2020-01-30 06:37:42 UTC. --
Jan 30 06:40:40 ubuntu ironic-python-agent[1268]: Traceback (most recent call last):
Jan 30 06:40:40 ubuntu ironic-python-agent[1268]: File "/usr/local/bin/ironic-python-agent", line 6, in <module>
Jan 30 06:40:40 ubuntu ironic-python-agent[1268]: from ironic_python_agent.cmd.agent import run
Jan 30 06:40:40 ubuntu ironic-python-agent[1268]: File "/opt/ironic-python-agent/local/lib/python2.7/site-packages/ironic_python_agent/cmd/agent.py", line 21, in <module>
Jan 30 06:40:40 ubuntu ironic-python-agent[1268]: from ironic_python_agent import agent
Jan 30 06:40:40 ubuntu ironic-python-agent[1268]: File "/opt/ironic-python-agent/local/lib/python2.7/site-packages/ironic_python_agent/agent.py", line 16, in <module>
Jan 30 06:40:40 ubuntu ironic-python-agent[1268]: import ipaddress
Jan 30 06:40:40 ubuntu ironic-python-agent[1268]: ImportError: No module named ipaddress
Jan 30 06:40:40 ubuntu systemd[1]: ironic-python-agent.service: Main process exited, code=exited, status=1/FAILURE
Jan 30 06:40:40 ubuntu systemd[1]: ironic-python-agent.service: Failed with result 'exit-code'.

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.