ironic-agent element to output a .kernel file

The ironic-agent element is created using the disk-image-create utility
(even being a ramdisk) and outputs a .vmlinuz file for the kernel
(different than the ramdisk-image-create which outputs a .kernel file
for the kernel). This is inconsistent and make scripting against the
diskimage-builder more complicated if one wants to support different
types of ramdisk.

This patch creates a hard link for the .vmlinuz file to a .kernel file
at the end of the process (to keep backward compatibility) and print a
deprecation message.

Depends-On: I81400305f166d62aa4612aab54602abb8178b64c
Change-Id: I476f9ec9ec4206ece0261eaaf2b4182c6bcbd802
Closes-Bug: #1482606
This commit is contained in:
Lucas Alvares Gomes 2015-08-07 13:45:12 +01:00 committed by John Trowbridge
parent 6b82210f9d
commit ba808fa6ec
2 changed files with 16 additions and 1 deletions

View File

@ -16,6 +16,15 @@ Beyond installing the ironic-python-agent, this element does the following:
in order to support source based installation of ironic-python-agent and its
dependencies.
This element outputs three files:
- ``$IMAGE-NAME.initramfs``: The deploy ramdisk file containing the
ironic-python-agent (IPA) service.
- ``$IMAGE-NAME.kernel``: The kernel binary file.
- ``$IMAGE-NAME.vmlinuz``: A hard link pointing to the ``$IMAGE-NAME.kernel``
file; this is just a backward compatibility layer, please do not rely
on this file.
.. note::
The package based install currently only enables the service when using the
systemd init system. This can easily be changed if there is an agent

View File

@ -21,4 +21,10 @@ sudo ln -s ./sbin/init ./
sudo find . -path ./sys -prune -o -path ./proc -prune -o -path './tmp/*' -prune -o -path './boot/*' -prune -o -path './root/*' -prune -o -path './usr/lib/locale/*' -prune -o -path './usr/share/doc/*' -prune -o -path './usr/share/man/*' -prune -o -path './usr/share/info/*' -prune -o -path './usr/share/licenses/*' -prune -o -path './usr/share/misc/*' -prune -o -print | sudo cpio -o -H newc | gzip > ${IMAGE_PATH}.initramfs
select_boot_kernel_initrd $TARGET_ROOT
sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.vmlinuz
sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.kernel
# TODO(lucasagomes): Create a hard link for the .vmlinuz file to keep
# it backward compatible. Remove it after it has been consistent and
# documented in both places for at least one full OpenStack release cycle
echo "WARNING: The kernel extension .vmlinuz has been deprecated. Please rely on the file with the extension .kernel instead."
sudo ln ${IMAGE_PATH}.kernel ${IMAGE_PATH}.vmlinuz