diskimage-builder Release Notes

diskimage-builder Release Notes

2.24.0

New Features

  • Adds a new element rhel to handle all supported RHEL releases, which are currently ‘7’ and ‘8’. As of now, users of diskimage-builder will still be able to use the ‘rhel7’ element, or migrate to ‘rhel’ and specify their respective DIB_RELEASE value.

Upgrade Notes

  • The opensuse and opensuse-minimal element are now defaulting to build 15.1. Building for 42.3 and 15.0 is still supported, however requires setting DIB_RELEASE to ‘42.3’ resp. ‘15.0’ explicitly.

Deprecation Notes

  • Support in opensuse and opensuse-minimal for openSUSE 42.2 has been removed as these are end of life.
  • The rhel7 element is deprecated and is left only for backwards compatibility. Use the rhel element instead. Note that you should set DIB_RELEASE to 7 to indicate which release you are using. Please read the notes.

Bug Fixes

  • The size of the ESP partition when building EFI based images is increased considerably from 12MiB to 550MiB, in line with modern guidelines. The existing size was often not enough to update packages.

2.23.0

New Features

  • The --image-extra-size option is provided to override the default 60% padding growth of the image size with a fixed gigabyte value.
  • The --mkfs-journal-size option is added to override the default journal size for basic ext4 root partitions.

Upgrade Notes

  • The --image-extra-size argument has changed from gigabytes to megabytes to make it more practical for use on smaller images.
  • The opensuse and opensuse-minimal element are now defaulting to build 15.0. Building for 42.2 and 42.3 is still supported, however requires setting DIB_RELEASE to ‘42.3’ resp. ‘42.2’ explicitly.

Deprecation Notes

  • Support in opensuse and opensuse-minimal for openSUSE 13.* has been removed as these are end of life.

Security Issues

  • a new post-install script was added in openssh-server element to ensure KexAlgorithms, Ciphers and MACs for sshd_config will be configured following good pratices on https://infosec.mozilla.org/guidelines/openssh. This option is activated by default, users can set DIB_OPENSSH_SERVER_HARDENING to 0 to disable this sshd configuration

2.19.0

New Features

  • Adds a new element init-ibft-interfaces to initialize network interfaces with configuration provided via iBFT. The new element is now a dependency of the ironic-agent element.
  • The simple-init element can now use NetworkManager instead of legacy scripts on Red Hat platforms.
  • The package-installs element now supports skipping installation of packages based on an environment variable specified in the config file. See the package-installs element documentation for full details.

Other Notes

  • Setting values with the selinux-permissive element has been moved from install.d to pre-install.d phase to avoid selinux related packages being installed before the settings are applied.

2.18.0

New Features

  • Setting --logfile will now imply DIB_QUIET=1 (i.e. logs will not appear on stdout). You can override this with an explicit DIB_QUIET=0 if you want stdout and file logging.
  • A post-root stage is added that runs outside the chroot and before the image size calculation. For example, this may be useful for running things that copy much data into the image and need to be outside of the chroot and after install stages which run inside the chroot.
  • A pre-finalise stage is added that runs outside the chroot and before the finalise stage. For example, this may be useful for mounting external resources that are used inside the chroot during the finalise stage, but do not need to be distributed in the final image such as build-time caches.

2.17.0

Other Notes

  • It has been clarified that the DIB_BOOTLOADER_DEFAULT_CMDLINE variable appends its values to grubs GRUB_CMDLINE_LINUX_DEFAULT, which is used during all normal boots but not rescue boots; as opposed to applying to GRUB_CMDLINE_LINUX

2.16.0

New Features

  • Add new modprobe element. This element will replace modprobe-blacklist element. It wil still have the blacklist functionality, but it also adds the feature of passing a complete file with settings to the modprobe.d directory. Adding this functionality, that will allow elements that depends on this module, to just copy the specified files to the final directory.

Upgrade Notes

  • You would need to modify your DIB_CLOUD_IMAGES and possibly SHA256SUMS variables if you were using them to build Ubuntu with elements/ubuntu: DIB_CLOUD_IMAGES would need to contain URL with path, and SHA256SUMS would not now neccesarily point to $DIB_RELEASE/current/ directory.

2.12.0

New Features

  • GPT support is added to the bootloader; see documentation for configuration examples. This should be considered a technology preview; there may be minor behaviour modifications as we enable UEFI and support across more architectures.

2.11.0

Bug Fixes

  • This fixes bug 1742170 where the grub root label is different than the file system label when booting from a whole disk image.
  • This fixes bug 1744403 where 60-ironic-agent-install fails to run when DIB_INSTALLTYPE_ironic_agent=source is set. pip installs constraints with the -c argument and this argument is a relatively newer addion. The currently installed pip may not support that option and must be upgraded before proceeding.

2.10.0

New Features

  • Adds sysprep element included by all systemd distros
  • A --logfile option is added to save output to a given file.
  • By default, all stdout will log with timestamps (this used to be inconsistent; python tools logged with a timestamp, and bash parts did not). If you set DIB_NO_TIMESTAMP to 1 the timestamp prefix will be suppressed (this would be appropriate if you are running diskimage-builder and capturing its output, and adding your own timestamp). Note that output to --logfile will always be timestamped.
  • You can set DIB_QUIET to 1 to suppress all output. This is likely only useful when used with the --logfile command.

Bug Fixes

  • Adds default sysprep element clearing /etc/machine-id which prevents duplicated /etc/machine-id by forcing systemd to generate a new id for each booted system.

2.9.0

New Features

  • Adds lvm support, allowing to create volumes.

Upgrade Notes

  • The fedora-minimal and fedora elements have been updated to default to Fedora 26. Note if you to pin to specific versions, be sure to specify DIB_RELEASE.

2.8.0

Upgrade Notes

  • The opensuse and opensuse-minimal element are now defaulting to 42.3, which is the latest stable openSUSE release. Building for 42.2 is still supported, however requires setting DIB_RELEASE to ‘42.2’ explicitly.

2.7.0

Deprecation Notes

  • The centos and rhel elements have been removed. These were building version 6 which is no longer supported (mostly due to a lack of python 2.7). Version 7 support is available via the centos7 and rhel7 elements (which downloads and modifies the upstream cloud images) or via centos-minimal (which builds the image from a empty chroot; only available for CentOS). centos-minimal is suggested as this is what OpenStack Infrastructure uses for its elements.

    Unfortunately, centos-minimal sets DISTRO=centos while centos7 sets DISTRO=centos7, despite building the same thing as far as upper levels are concerned. We plan to rectify this in the version 8 time-frame.

  • The DIB_[DISTRO]_DISTRIBUTION_MIRROR variables have been removed. These were undocumented ways to set DIB_DISTRIBUTION_MIRROR for some elements. It was not implemented consistently and causing some confusion. If you need to setup mirrors for testing purposes, the openstack-ci-mirrors element is a good example that is used by OpenStack gate testing.

2.6.0

Deprecation Notes

  • The dracut-network element has been removed. It has not been functioning for some time due to incorrect paths.

2.4.0

New Features

  • Adds mkfs, mount and fstab to the block device layer.

2.3.0

Deprecation Notes

  • The dib-run-parts element is no longer required as disk-image-create will directly source the internal version for running scripts within the chroot. This element was unintentionally leaving /usr/local/bin/dib-run-parts in the built image. From code search we do not believe anyone was relying on the presence of this script. If you do require it, you should source the dib-utils package to install.
  • dib no longer exports dib-run-parts. Adding this was an oversight made during v2 development, since dib-utils already provides this. The dib-run-parts used internally (diskimage_builder/lib/dib-run-parts) is not intended to be used by external tools. If you require dib-run-parts, you should install the dib-utils package.

Other Notes

  • The packages specified with the -p command-line operation are now installed after the install.d phase, not before. This is to give elements priority when installing packages. The flag documentation has been updated to describe this.

2.1.0

Bug Fixes

  • dib-init-system did not correctly find the init system for Debian Jessie and Debian Stretch. This version also looks for /bin/systemctl as as hint for systemd and fixes the problem.

2.0.0

Prelude

Version 2.0.0 of diskimage-builder incorporates recent work from the feature/v2 branch. This includes incorporating some largely internal changes to the way it finds and calls elements, enhancements to partitioning and removal of some long-deprecated elements. If you use dib exclusively via the command-line disk-image-create installed from a package or via pypi you are unlikely to notice any difference (if you run it directly from a git-tree checkout, you may be affected).

New Features

  • 2.0.0 includes a new framework for partitioning contributed by Andreas Florath. This should allow for creating multiple partitions, images with encryption, LVM support and flexibility for multiple-devices, all of which are currently not supported. Please check the v2 documentation, specs and reach out if these features interest you (some parts still in review).
  • Element override is now supported. If you have an element of the same name earlier in the ELEMENTS_PATH, it will override later instances (previously, the behaviour was undefined).

Upgrade Notes

  • For purposes of both users and development we want dib to be as “pythonic” as possible and behave like all other projects. Two major visible changes are:

    • command-line scripts are entry points (i.e. need to be installed)
    • elements have moved under diskimage_create module

    The result of the first is that ./bin/disk-image-create from the source tree is no longer there. Like all other projects, you should install dib into a virtualenv (if you’re developing, use pip -e) and disk-image-create will “just work”.

    The second change, moving the inbuilt elements under the diskimage_create module, is a simplification so we always have a canonical path to our elements. Since we now always know where elements are relative to the imported diskimage_builder module we can drop all the path guessing complexity. This has other good flow-on effects such as testr being able to find unit-tests for elements in the normal fashion and having imports work as usual.

    We are aware there are a number of tools that like to take dib elements and do things with them. Reading some of the dib source you may find there is a canonical way to find out the included dib elements path – ask dib itself, something like

    DIB_ELEMENTS=$(python -c '
    import diskimage_builder.paths;
    diskimage_builder.paths.show_path("elements")')
    

    Note you probably do not want this. As mentioned, another feature of v2 is override elements – an element that appears first in the element path-list will override any built-in one (just like $PATH). There is a function, diskimage_builder.get_elements(), which will correctly process the element path, calculate overrides and return a canonical list of elements, their dependencies and correct paths.

    That said, you probably do not want this either! There are a number of elements that do things on behalf of other elements – they look for a file in the included elements, say, and use that as a manifest for something. Previously, these would just have to make up their own element processing via inspection of the command-line arguments. dib now exports pre-computed variables that an element can walk for all the current build elements – a YAML list for easy python decoding and a function that builds an array for Bash elements.

Deprecation Notes

  • A number of long-deprecated elements have been removed in v2, which are to the best of our knowledge unused.
    • partitioning-sfdisk
    • deploy-ironic-element
    • ironc-discovered-ramdisk
    • serial-console-element
    • map-services
  • We have removed and deprecated the dib-utils package. This was intended to be a more generic repository of tools that might be useful outside dib, but that did not eventuate and it has been folded back into dib for simplicity.

2.0.0rc1

New Features

  • Create sphinx directive ‘element_deps’ that automatically generates dependencies in the element documentation.

1.27.0

New Features

  • Cleaning logs was split, some was done in the img-functions.finalise_base, some was done in the base element. The version unifies tidy up logs in the lib/img-functions. Especially when building docker container images the base element cannot be used. This patch removes about some hundreds KB of useless logs in cases when the base element is not used.

Deprecation Notes

  • The DIB_YUMCHROOT_USE_CACHE variable has been removed and the Fedora and CentOS -minimal initial chroot will always be created by the package manager. The default creation of a chroot tarball is stopped for these elements. This unused option was unsafe; there is no guarantee that the base system will not change even between runs. Getting the package manager to reuse the cache for the initial chroot install is future work.

1.26.0

New Features

  • The bootloader element will explicitly set the timeout to 5 seconds when using grub (previously this was undefined, but platform defaults were usually 5 seconds). Set this to 0 for faster boots.
  • New squashfs image output format.

1.24.0

New Features

  • Create partitions with MBR layout optimized for performance and highly configurable.

Deprecation Notes

  • The new partitions are created based on configuration rather than on a list of provided commands for a special partitioning tool. Therefore elements using tools (like partitioning-sfdisk) are deprecated and will be removed.

Bug Fixes

  • The debian-minimal and ubuntu-minimal elements now install directly from the updates repo, avoiding the need to double-install packages during build.

1.23.0

New Features

  • New openssh-server element to ensure that the openssh server is installed and enabled during boot.

1.22.0

New Features

  • New zypper-minimal and opensuse-minimal elements to create basic openSUSE images. These two new elements are also making use of the existing zypper element which has been extended to include the functionality previously present in the opensuse element.

Deprecation Notes

  • The dib-utils requirement has been removed as the dib-run-parts script is now shipped from within diskimage-builder. The dib-utils project is now considered retired.

1.20.0

New Features

  • Add new block device handling. Unify and generalize the creation and usage of block device. This release includes setting up the general infrastructure and setting up loop device
  • Elements that need access to the other elements being used during the build should use the new IMAGE_ELEMENT_YAML environment variable and it’s Bash equivalent get_image_element_array.
  • New element (runtime-ssh-host-keys) to manage SSH host keys at boot. Since SSH host key generation is not standard across operating systems, add support for both Debian and Ubuntu to handle it. While this is a new element, simple-init has been updated to depend on it.

Known Issues

  • Because the implementation of the new block device layer is not complete, some features which are already implemented cannot be used because of limitations of the current environment.

Deprecation Notes

  • The current way of handling block devices is deprecated. The existing block device phase will be called for a limited time. If this phase delivers a result, this is used; if there is no result, the new way of block device handling is used. Please note that the old way of block device handling has some major limitations such as that it is only possible to use one block device.
  • The element ‘partitioning-sfdisk’ is deprecated. The new implementation will create the partition tables based on a tool independent description.
  • The element-info script is now provided by a standard python entry-point, rather than an explicit wrapper script. This may affect you if you were running this script directly out of bin in the source directory without installing. See developer notes for details on using developer-installs with virtual environments for testing.
  • Element override behavior is now defined, with elements found in earlier entries of ELEMENTS_PATH overriding later ones (e.g. the same semantics as $PATH). Previously the behavior was undefined.
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.