Modify the overcloud-full.qcow2 and Ironic configs to add drivers during boot time for deployment with Red Hat OSP Director based on tripleO

I am working with old equipment in my home lab which sometimes brings more complexity into my deployments. In case of tripleO and ironic my old hardware was actually beneficial to learn how ironic and triple0 works.

I am working with BL465c G6 and SB40c which have a e200/p400 controller. RHEL7.x does not recognize these cards/disks if the kernel params hpsa.hpsa_allow_any=1 and hpsa.hpsa_simple_mode=1 are not set during boot time.

So to be able to deploy my overcloud I am going to have to modify the image as well as some config files on the OSP Director to make this work.

First we need to understand what the steps are for deployment.

Step 1. Is modifying the image and adding the hpsa.hpsa_allow_any=1 and hpsa.hpsa_simple_mode=1 to /etc/sysconfig/grub. We need to do this so when the installer runs the command
grub2-mkconfig -o /boot/grub2/grub.cfg after it “dd’s” the overcloud-full.qcow2 image to the compute, controller, ceph … nodes we will see the params in the linux16 line in grub.cfg which will enable the system to recognize the controller and disks.

# yum install libguestfs-tools-c
# virt-edit -a overcloud-full.qcow2 /etc/sysconfig/grub 

If you launch the above command, virt-edit will open the file in vi and you will be able to add the changes to the /etc/sysconfig/grub. Once you save and close the file it will be ready for the upload to glance.

Step 2. Modify the /httpboot/discoverd.ipxe to extend the two params in the kernel line.
When we add a host to OSP Director we will need to boot it into discovery mode. The discovery image is a small image which will gather the following information:
CPU/cores, Memory (MB), Disk (GB).

#!ipxe

dhcp

kernel http://192.168.2.2:8088/discovery.kernel discoverd_callback_url=http://192.168.2.2:5050/v1/continue RUNBENCH=1 hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1 ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac}
initrd http://192.168.2.2:8088/discovery.ramdisk
boot

Step 3 and 4. Modify /usr/lib/python2.7/site-packages/ironic/drivers/modules/ipxe_config.template (for ipxe)

#!ipxe

dhcp

goto deploy

:deploy
kernel {{ pxe_options.deployment_aki_path }} selinux=0 disk={{ pxe_options.disk }} iscsi_target_iqn={{ pxe_options.iscsi_target_iqn }} deployment_id={{ pxe_options.deployment_id }} deployment_key={{ pxe_options.deployment_key }} ironic_api_url={{ pxe_options.ironic_api_url }} troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_option={{ pxe_options.boot_option }} ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} {% if pxe_options.root_device %}root_device={{ pxe_options.root_device }}{% endif %} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} coreos.configdrive=0 hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1

initrd {{ pxe_options.deployment_ari_path }}
boot

:boot_partition
kernel {{ pxe_options.aki_path }} root={{ ROOT }} ro text {{ pxe_options.pxe_append_params|default("", true) }} hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1
initrd {{ pxe_options.ari_path }}
boot

:boot_whole_disk
kernel chain.c32
append mbr:{{ DISK_IDENTIFIER }}
boot

and
Modify /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_config.template (for pxe )

default deploy

label deploy
kernel {{ pxe_options.deployment_aki_path }}
append initrd={{ pxe_options.deployment_ari_path }} selinux=0 disk={{ pxe_options.disk }} iscsi_target_iqn={{ pxe_options.iscsi_target_iqn }} deployment_id={{ pxe_options.deployment_id }} deployment_key={{ pxe_options.deployment_key }} ironic_api_url={{ pxe_options.ironic_api_url }} troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_option={{ pxe_options.boot_option }} {% if pxe_options.root_device %}root_device={{ pxe_options.root_device }}{% endif %} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} boot_mode={{ pxe_options['boot_mode'] }} coreos.configdrive=0 hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1
ipappend 3


label boot_partition
kernel {{ pxe_options.aki_path }}
append initrd={{ pxe_options.ari_path }} root={{ ROOT }} ro text {{ pxe_options.pxe_append_params|default("", true) }} hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1


label boot_whole_disk
COM32 chain.c32
append mbr:{{ DISK_IDENTIFIER }}

After you modified those params and restarted httpd, openstack-ironic-conductor.service, openstack-ironic-discoverd-dnsmasq.service,openstack-ironic-discoverd.service you should be good to go.