diskimage-builder fails to create disk image- cannot uninstall virtualenv

Bug #1768135 reported by Sai Sindhur Malleni on 2018-04-30
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

diskimage-builder is failing to build a centos7 disk image which uses the following elements:

THe command used if disk-image-create -o <filename> dentos7 vm shaker and ELEMENTS_PATH is set to https://github.com/openstack/shaker/tree/master/shaker/resources/image_elements

The error seen is whl (1.3MB)\n2018-04-26 13:20:42.821 | Collecting wheel\n2018-04-26 13:20:42.888 | Downloading https://files.pythonhosted.org/packages/1b/d2/22cde5ea9af055f81814f9f2545f5ed8a053eb749c08d186b369959189a8/wheel-0.31.0-py2.py3-none-any.whl (41kB)\n2018-04-26 13:20:42.951 | Installing collected packages: pip, wheel\n2018-04-26 13:20:43.710 | Successfully installed pip-10.0.1 wheel-0.31.0\n2018-04-26 13:20:44.150 | Collecting setuptools\n2018-04-26 13:20:45.741 | Downloading https://files.pythonhosted.org/packages/20/d7/04a0b689d3035143e2ff288f4b9ee4bf6ed80585cc121c90bfd85a1a8c2e/setuptools-39.0.1-py2.py3-none-any.whl (569kB)\n2018-04-26 13:20:46.005 | Installing collected packages: setuptools\n2018-04-26 13:20:46.254 | Successfully installed setuptools-39.0.1\n2018-04-26 13:20:46.632 | Collecting virtualenv\n2018-04-26 13:20:47.245 | Downloading https://files.pythonhosted.org/packages/ed/ea/e20b5cbebf45d3096e8138ab74eda139595d827677f38e9dd543e6015bdf/virtualenv-15.2.0-py2.py3-none-any.whl (2.6MB)\n2018-04-26 13:20:47.647 | Installing collected packages: virtualenv\n2018-04-26 13:20:47.647 | Found existing installation: virtualenv 1.10.1\n2018-04-26 13:20:47.651 | Cannot uninstall \'virtualenv\'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.\n2018-04-26 13:20:48.004 | INFO diskimage_builder.block_device.blockdevice [-] State already cleaned - no way to do anything here\n2018-04-26 13:20:48.425 | Unmount /tmp/dib_build.J2Px0x4d/mnt/tmp/yum\n2018-04-26 13:20:48.448 | Unmount /tmp/dib_build.J2Px0x4d/mnt/tmp/in_target.d\n2018-04-26 13:20:48.468 | Unmount /tmp/dib_build.J2Px0x4d/mnt/sys\n2018-04-26 13:20:48.486 | Unmount /tmp/dib_build.J2Px0x4d/mnt/proc\n2018-04-26 13:20:48.509 | Unmount /tmp/dib_build.J2Px0x4d/mnt/dev/pts\n2018-04-26 13:20:48.532 | Unmount /tmp/dib_build.J2Px0x4d/mnt/dev\n'

This doesn't happen with ubuntu.

Dario Zanzico (dario.zanzico) wrote :

I'm using a different set of custom/heat/tripleo elements on a rhel7 image and I've run in the same "Cannot uninstall 'virtualenv'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall." error.
I've worked around it by setting DIB_INSTALLTYPE_pip_and_virtualenv to "package".

Sai Sindhur Malleni (smalleni) wrote :

Even setting DIB_INSTALLTYPE_pip_and_virtualenv to package did not help in my case with CentOS7.

Sai Sindhur Malleni (smalleni) wrote :

Actually, strike my previous comment. It worked on second try.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers