diskimage-builder/elements/ubuntu-core
Pino Toscano f35aace69f Use shorter temporary file names for kpartx
The loopback handling in the Linux kernel limits the filenames of
files associated to loopback devices, see also linux/loop.h.
This is reflected also on userspace, as kpartx will silently do nothing
(exiting with 0) when requesting to remove a filename longer than 64
characters, as that name will obviously not match the truncated
filename. The result of this is that, when extracting qcow2 images for
the first time, if the qcow2 filename is long enough then the loopback
device will not be removed, remaining as stale in the host.

As a workaround, use a temporary file name when convering a qcow2 image
to raw, instead of using the base name of the qcow2 file.
While this still will not fix the issue when manually using a long
temporary directory (e.g. TMP_DIR=/very/long/etc...), at least should
avoid it in other cases.

Change-Id: Ibf46cd313a9d89412c0e1068fa0993be6c5a29db
2015-04-21 10:36:33 +02:00
..
environment.d Add element for ubuntu-core 2014-12-11 18:04:58 -08:00
root.d Use shorter temporary file names for kpartx 2015-04-21 10:36:33 +02:00
element-deps Add element for ubuntu-core 2014-12-11 18:04:58 -08:00
element-provides Add element for ubuntu-core 2014-12-11 18:04:58 -08:00
package-installs.yaml Add element for ubuntu-core 2014-12-11 18:04:58 -08:00
README.rst Create docs site containing element READMEs 2015-02-10 11:45:35 -08:00

ubuntu-core

Use Ubuntu Core cloud images as the baseline for built disk images.

Overrides:

  • To use a non-default URL for downloading base Ubuntu cloud images, use the environment variable DIB_CLOUD_IMAGES
  • To download a non-default release of Ubuntu cloud images, use the environment variable DIB_RELEASE
  • To use different mirrors rather than the default of archive.ubuntu.com and security.ubuntu.com, use the environment variable DIB_DISTRIBUTION_MIRROR