From 22a5e4e50f2bf2a71128614218ed208ee8f6f5c2 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Wed, 30 Aug 2017 10:47:05 +0200 Subject: [PATCH] Update ironic-agent-multipath element It finally was tested on real environments, and it was not working properly. The generated image is not build with dracut, so the regenerate we did there was not used, and the modules were not enabled. Adding the modules on the right directory, to be loaded at boot time. Also removing the 98-regenerate-initramfs patch, because it was regenerating an image that is never used, so it was a no-op Change-Id: I87527a4ac2111f1e572e3c779e11fdf20fc88bc8 --- elements/ironic-agent-multipath/README.rst | 9 +++------ elements/ironic-agent-multipath/element-deps | 1 + .../10-ironic-agent-multipath.bash | 4 ---- .../finalise.d/98-regenerate-initramfs | 17 ----------------- .../static/etc/modules-load.d/iscsi.conf | 8 ++++++++ 5 files changed, 12 insertions(+), 27 deletions(-) delete mode 100755 elements/ironic-agent-multipath/environment.d/10-ironic-agent-multipath.bash delete mode 100755 elements/ironic-agent-multipath/finalise.d/98-regenerate-initramfs create mode 100644 elements/ironic-agent-multipath/static/etc/modules-load.d/iscsi.conf diff --git a/elements/ironic-agent-multipath/README.rst b/elements/ironic-agent-multipath/README.rst index 8c658777e..dbe81b6bd 100644 --- a/elements/ironic-agent-multipath/README.rst +++ b/elements/ironic-agent-multipath/README.rst @@ -1,10 +1,7 @@ ====================== ironic-agent-multipath ====================== -Updates the ironic agent, installing multipath package, -and rebuilding dracut to add the specified drivers. +Updates the ironic agent, installing multipath and +iscsi package, and enabling needed modules by default, +to execute a modprobe for the needed drivers before it is started. -The drivers to add can be specified with the -`IRONIC_AGENT_MULTIPATH_DRIVERS`. It accepts a list of -drivers to add separated by spaces. The default values are -'be2iscsi iscsi_target_mod dm_multipath'. diff --git a/elements/ironic-agent-multipath/element-deps b/elements/ironic-agent-multipath/element-deps index 8c3ffe52a..95c6f0330 100644 --- a/elements/ironic-agent-multipath/element-deps +++ b/elements/ironic-agent-multipath/element-deps @@ -1,2 +1,3 @@ +install-static package-installs select-boot-kernel-initrd diff --git a/elements/ironic-agent-multipath/environment.d/10-ironic-agent-multipath.bash b/elements/ironic-agent-multipath/environment.d/10-ironic-agent-multipath.bash deleted file mode 100755 index 8e3520155..000000000 --- a/elements/ironic-agent-multipath/environment.d/10-ironic-agent-multipath.bash +++ /dev/null @@ -1,4 +0,0 @@ -if [ -z "${IRONIC_AGENT_MULTIPATH_DRIVERS:-}" ]; then - export IRONIC_AGENT_MULTIPATH_DRIVERS=${IRONIC_AGENT_MULTIPATH_DRIVERS:-"be2iscsi iscsi_target_mod dm_multipath"} -fi - diff --git a/elements/ironic-agent-multipath/finalise.d/98-regenerate-initramfs b/elements/ironic-agent-multipath/finalise.d/98-regenerate-initramfs deleted file mode 100755 index d9602ddcd..000000000 --- a/elements/ironic-agent-multipath/finalise.d/98-regenerate-initramfs +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -RET=$(select-boot-kernel-initrd) -KERNEL_VERSION=`echo ${RET%:*} | sed 's/vmlinuz-//g'` -RAMDISK=/boot/${RET#*:} - -if [ -z $IRONIC_AGENT_MULTIPATH_DRIVERS ]; then - dracut -v --force $RAMDISK $KERNEL_VERSION -else - dracut -v --force --add-drivers "$IRONIC_AGENT_MULTIPATH_DRIVERS" $RAMDISK $KERNEL_VERSION -fi diff --git a/elements/ironic-agent-multipath/static/etc/modules-load.d/iscsi.conf b/elements/ironic-agent-multipath/static/etc/modules-load.d/iscsi.conf new file mode 100644 index 000000000..6d48d9633 --- /dev/null +++ b/elements/ironic-agent-multipath/static/etc/modules-load.d/iscsi.conf @@ -0,0 +1,8 @@ +qla4xxx +cxgb3i +cxgb4i +bnx2i +be2iscsi +iscsi_boot_sysfs +iscsi_ibft +iscsi_tcp