Set IRONIC_AGENT_MULTIPATH_DRIVERS to '' when undefined
Sometimes we fail to build the IPA ramdisk with: /tmp/in_target.d/finalise.d/98-regenerate-initramfs: line 13: IRONIC_AGENT_MULTIPATH_DRIVERS: unbound variable Let's make sure the env variable is set to 'be2iscsi iscsi_target_mod dm_multipath' when it is not set as that is the default stated in the README. We also make sure to not use the --add-drivers parameter in case IRONIC_AGENT_MULTIPATH_DRIVERS is set to '' Change-Id: I4f22c84fb65c7bba6904c174ff6819c6eaee0c32 Closes-Bug: #1659493
This commit is contained in:
parent
9538a56022
commit
00b986959c
@ -0,0 +1,4 @@
|
||||
if [ -z "${IRONIC_AGENT_MULTIPATH_DRIVERS:-}" ]; then
|
||||
export IRONIC_AGENT_MULTIPATH_DRIVERS=${IRONIC_AGENT_MULTIPATH_DRIVERS:-"be2iscsi iscsi_target_mod dm_multipath"}
|
||||
fi
|
||||
|
@ -10,4 +10,8 @@ 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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user