[2.28.0] crashes with error: environment.d/51-pip-and-virutalenv-default.bash: line 5: GenericCloud: unbound variable

Bug #1848062 reported by Gudrutis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Committed
Medium
Unassigned

Bug Description

We are running diskimage-builder on docker container based on CentOS7. However, version 2.28.0 is crashing when ran with parameters seen below. The 2.24.0 version on the same container is working fine.

```
> ELEMENTS_PATH=cci-elements DIB_REPOREF_ironic_agent=$IPA_BRANCH disk-image-create -o /ironic-image-creation/outputimage/$TEMP_FOLDER/$TEMP_FOLDER centos7 posix local-config disable-selinux cleanup-kernel-initrd ironic-agent ironic-hwmanager-cern ironic-rsyslog mellanox
...
2019-10-14 15:56:52.198 | ++ '[' -z '' ']'
2019-10-14 15:56:52.198 | ++ '[' centos7 == ubuntu ']'
2019-10-14 15:56:52.198 | ++ '[' centos7 == debian ']'
2019-10-14 15:56:52.198 | ++ '[' centos7 == fedora ']'
2019-10-14 15:56:52.198 | ++ '[' centos7 == centos7 ']'
2019-10-14 15:56:52.198 | ++ DIB_PYTHON_VERSION=2
2019-10-14 15:56:52.198 | ++ '[' -z 2 ']'
2019-10-14 15:56:52.198 | ++ export DIB_PYTHON_VERSION
2019-10-14 15:56:52.198 | ++ export DIB_PYTHON=python2
2019-10-14 15:56:52.198 | ++ DIB_PYTHON=python2
2019-10-14 15:56:52.198 | dib-run-parts Sourcing environment file /tmp/dib_build.HHRsKYaF/hooks/root.d/../environment.d/50-redhat-common
2019-10-14 15:56:52.201 | + source /tmp/dib_build.HHRsKYaF/hooks/root.d/../environment.d/50-redhat-common
2019-10-14 15:56:52.201 | ++ export DIB_DISABLE_KERNEL_CLEANUP=0
2019-10-14 15:56:52.201 | ++ DIB_DISABLE_KERNEL_CLEANUP=0
2019-10-14 15:56:52.201 | dib-run-parts Sourcing environment file /tmp/dib_build.HHRsKYaF/hooks/root.d/../environment.d/51-pip-and-virutalenv-default.bash
2019-10-14 15:56:52.204 | + source /tmp/dib_build.HHRsKYaF/hooks/root.d/../environment.d/51-pip-and-virutalenv-default.bash
2019-10-14 15:56:52.204 | ++ [[ centos7 =~ (centos|rhel) ]]
2019-10-14 15:56:52.204 | ++ [[ GenericCloud -ge 8 ]]
2019-10-14 15:56:52.204 | /tmp/dib_build.HHRsKYaF/hooks/root.d/../environment.d/51-pip-and-virutalenv-default.bash: line 5: GenericCloud: unbound variable
2019-10-14 15:56:52.513 | INFO diskimage_builder.block_device.blockdevice [-] State already cleaned - no way to do anything here
```

> rpm -q centos-release
centos-release-7-6.1810.2.el7.cern.x86_64

> pip show diskimage-builder
---
Metadata-Version: 2.1
Name: diskimage-builder
Version: 2.28.0
Summary: Golden Disk Image builder.
Home-page: https://docs.openstack.org/diskimage-builder/latest/
Author: OpenStack
Author-email: <email address hidden>
Installer: pip
License: Apache License (2.0)
Location: /usr/lib/python2.7/site-packages
Requires: Babel, PyYAML, networkx, stevedore, six, pbr, hacking
Classifiers:
  Development Status :: 5 - Production/Stable
  License :: OSI Approved :: Apache Software License
  Operating System :: POSIX :: Linux
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3
  Environment :: Console
Entry-points:
  [console_scripts]
  dib-block-device = diskimage_builder.block_device.cmd:main
  disk-image-create = diskimage_builder.disk_image_create:main
  element-info = diskimage_builder.element_dependencies:main
  ramdisk-image-create = diskimage_builder.disk_image_create:main
  [diskimage_builder.block_device.plugin]
  fstab = diskimage_builder.block_device.level4.fstab:Fstab
  local_loop = diskimage_builder.block_device.level0.localloop:LocalLoop
  lvm = diskimage_builder.block_device.level1.lvm:LVMPlugin
  mkfs = diskimage_builder.block_device.level2.mkfs:Mkfs
  mount = diskimage_builder.block_device.level3.mount:Mount
  partitioning = diskimage_builder.block_device.level1.partitioning:Partitioning
  [diskimage_builder.block_device.plugin_test]
  test_a = diskimage_builder.block_device.tests.plugin.test_a:TestA
  test_b = diskimage_builder.block_device.tests.plugin.test_b:TestB

Revision history for this message
Gudrutis (zyrus123) wrote :
description: updated
Gudrutis (zyrus123)
description: updated
Revision history for this message
Ian Wienand (iwienand) wrote :

This should be fixed with https://review.opendev.org/#/c/688321/, which i'll release with 2.28.2

Changed in diskimage-builder:
importance: Undecided → Medium
status: New → Fix Committed
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.