From afda063697ef1ce43395ba384ffd25c36ceea25c Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 30 Sep 2015 11:37:28 +0200 Subject: [PATCH] agent: ensure vmlinuz file does not exist before hard-linking into it Otherwise on rebuilding the agent the following error is produced: failed to create hard link /home/stack/ironic-agent.vmlinuz and the vmlinuz file is not updated. Change-Id: I2015da889c932a854727235b1e34256a28e9eac6 --- elements/ironic-agent/cleanup.d/99-ramdisk-create | 1 + 1 file changed, 1 insertion(+) diff --git a/elements/ironic-agent/cleanup.d/99-ramdisk-create b/elements/ironic-agent/cleanup.d/99-ramdisk-create index ae83338c..2b7df9a6 100755 --- a/elements/ironic-agent/cleanup.d/99-ramdisk-create +++ b/elements/ironic-agent/cleanup.d/99-ramdisk-create @@ -30,4 +30,5 @@ sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.kernel # 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 rm -f ${IMAGE_PATH}.vmlinuz sudo ln ${IMAGE_PATH}.kernel ${IMAGE_PATH}.vmlinuz