diskimage-builder: Software Deployments Broken In Xenial
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
heat-agents |
New
|
Undecided
|
Unassigned |
Bug Description
I am trying to build an image for ubuntu trusty and xenial that works with OS::Heat:
pip install diskimage-builder
an run the following scripts to build the images:
export DISTRIBUTION=
export DIB_RELEASE=
git clone https:/
git clone https:/
export ELEMENTS_
export BASE_ELEMENTS=
export AGENT_ELEMENTS=
export DEPLOYMENT_
export DEPLOYMENT_TOOL=""
TIMESTAMP=$(date +%Y%m%d%H%M%S)
export IMAGE_NAME=
disk-image-create vm $BASE_ELEMENTS $AGENT_ELEMENTS \
$DEPLOYMEN
openstack image create --disk-format raw --container-format bare \
$IMAGE_NAME < $IMAGE_NAME.raw
To build xenial I just set DIB_RELEASE to "xenial". The build process runs fine and the images a uploaded. Then I deploy instances from both images and check the os-collect-config service. On trusty the service is running and executing os-collect-config manually results in a successful run as expected.
On xenial though, this is what I see:
root@test:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
root@test:~# os-collect-config --debug --force
Source [heat_local] Unavailable.
Traceback (most recent call last):
File "/usr/local/
sys.
File "/opt/stack/
collector_
File "/opt/stack/
content = module.
File "/opt/stack/
md = config_
File "/opt/stack/
bd = config_drive()
File "/opt/stack/
for bd in all_block_
File "/opt/stack/
for device in out.split('\n\n'):
TypeError: a bytes-like object is required, not 'str'
root@test:~#
I have no idea what this means or where it might come from. Any help is very much appreciated.
Got the hint that it might be an os-collect-config bug where it seems it is not python3 compatible because xenial only ships with python3 by default. Therfore, I exported DIB_PYTHON_
Any ideas?
affects: | fuel-plugin-contrail → glance |
affects: | glance → heat-agents |
I think it is an issue with the default python version running on your local system when the virtualenvs for os-* are created. I fixed this by specifing a Python 2 virtualenv environment variable before calling disk-image-create like this:
export VIRTUALENV_ PYTHON= "/usr/bin/ python2"