Add element to customize dracut on the agent

Updates the ironic agent, installing multipath package
and regenerating dracut to add all the specified drivers.

Change-Id: Ieda51d71c4760c66c00c48d27b6b6b66e3f479eb
(cherry picked from commit 15b5776c57)
This commit is contained in:
Yolanda Robla Mota 2017-01-16 16:36:21 +01:00 committed by Yolanda Robla
parent 3ecf477958
commit e61376c2d2
5 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,10 @@
======================
ironic-agent-multipath
======================
Updates the ironic agent, installing multipath package,
and rebuilding dracut to add the specified drivers.
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'.

View File

@ -0,0 +1,2 @@
package-installs
select-boot-kernel-initrd

View File

@ -0,0 +1,13 @@
#!/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#*:}
dracut -v --force --add-drivers "$IRONIC_AGENT_MULTIPATH_DRIVERS" $RAMDISK $KERNEL_VERSION

View File

@ -0,0 +1,2 @@
iscsi-initiator-utils:
device-mapper-multipath:

View File

@ -0,0 +1,3 @@
if [ -z "${IRONIC_AGENT_MULTIPATH_DRIVERS:-}" ]; then
export IRONIC_AGENT_MULTIPATH_DRIVERS=${IRONIC_AGENT_MULTIPATH_DRIVERS:-"be2iscsi iscsi_target_mod dm_multipath"}
fi