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
This commit is contained in:
Yolanda Robla Mota 2017-01-16 16:36:21 +01:00
parent 57a19a7267
commit 15b5776c57
4 changed files with 27 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: