From bbc8e0ac3e37752b4f114811878cabd544746923 Mon Sep 17 00:00:00 2001 From: waleed mousa Date: Wed, 21 Feb 2018 08:29:25 -0500 Subject: [PATCH] Adding a workaround for enabling steering in ConnectX-3 devices This file will add this configuration "options mlx4_core log_num_mgm_entry_size=-1" to /etc/modprobe.d/mlx4.conf file in order to enable steering in ConnectX-3 devices and then will rebuild the initramfs at the first boot stage Change-Id: Ia64e62e7fdb70e19be7b0a5cee163bd03c6de65d --- firstboot/conntectx3_streering.yaml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 firstboot/conntectx3_streering.yaml diff --git a/firstboot/conntectx3_streering.yaml b/firstboot/conntectx3_streering.yaml new file mode 100644 index 0000000000..db38556511 --- /dev/null +++ b/firstboot/conntectx3_streering.yaml @@ -0,0 +1,31 @@ +heat_template_version: queens + +description: > + This's a temporary workaround for adding this option + "log_num_mgm_entry_size=-1" to /etc/modprobe.d/mlx4.conf file in order to + allow steering in ConnectX-3 devices + + +resources: + userdata: + type: OS::Heat::MultipartMime + properties: + parts: + - config: {get_resource: allow_steering} + allow_steering: + type: OS::Heat::SoftwareConfig + properties: + config: | + #!/bin/bash + set -x + echo "options mlx4_core log_num_mgm_entry_size=-1" >> /etc/modprobe.d/mlx4.conf + /sbin/dracut --force + +outputs: + # This means get_resource from the parent template will get the userdata, see: + # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent + # Note this is new-for-kilo, an alternative is returning a value then using + # get_attr in the parent template instead. + OS::stack_id: + value: {get_resource: userdata} +