Updating and Configuring the Firmware

In some cases, it is required to update the firmware of Mellanox devices or configure them. This section explains how to use mellanox_fw_update.yaml for firmware update and configuration.

  1. Create the mellanox_fw_update.yaml file:

    Copy
    Copied!
                

    $ git clone https://github.com/Mellanox/switchdev-utils.git $ cd switchdev-utils/templates/firstboot/ $ sude pip3 install -U jinja2 $ python3 gen_yaml_from_template.py

  2. Add this file to the resource registry section under the specified role -

  • For ComputeSriov:

    Copy
    Copied!
                

    OS::TripleO::ComputeSriov::NodeUserData: /home/stack/switchdev-utils/templates/firstboot/mellanox_fw_update.yaml

  • For ComputeOvsDpdk:

    Copy
    Copied!
                

    OS::TripleO::ComputeOvsDpdk::NodeUserData: /home/stack/switchdev-utils/templates/firstboot/mellanox_fw_update.yaml

  • For compute:

    Copy
    Copied!
                

    OS::TripleO::Compute::NodeUserData: /home/stack/switchdev-utils/templates/firstboot/mellanox_fw_update.yaml

Specify the devices you wish to configure according to the following parameters:

Parameter

Description

Type

BIN_DIR_URL

URL of a directory containing Mellanox NIC Firmware. For example: "http://192.168.24.1:8786/fw/"

String

FORCE_UPDATE

Forcefully update the firmware, even if it is an older version

boolean [True, False]

DEV_WHITE_LIS

A list of MLNX devices' PCIs to be processed.

If the value is empty, all MLNX devices will be processed. Make sure to select only the PCI that ends with 0. For example: ['0000:04:00.0', '0000:81:00.0']

comma_delimited_list

NUM_OF_VFS

Max number of VFS

Example: 64

number

SRIOV_EN

Enable/Disable Sriov

boolean [True, False]

LINK_TYPE

Link type ["eth", "ib"]

string

ESWITCH_IPV4_TTL_MODIFY_ENABLE

Enable TTL modification by E-Switch

boolean [True, False]

PRIO_TAG_REQUIRED_EN

Priority tag required

boolean [True, False]

ESWITCH_HAIRPIN_TOT_BUFFER_SIZE

If a single key of "*" is provided, its value will set to all indexes.

To set configuration for a set of specific indexes, pass the for index 2 to be 17 and index 3 to be 16. For example: {"2": "17", "3": "16"}

yjson

ESWITCH_HAIRPIN_DESCRIPTORS

If a single key of "*" is provided, its value will be set to all indexes.

To set configuration for a set of specific indexes, you can pass the value for index 2 to be 17 and index 3 to be 16. For example: {"2": "17", "3": "16"}

json

Configuring and Preparing NEO

Use the links below to execute the necessary preliminary steps for the NEO machine preparation:

  1. Follow the instructions in the NEO User Manual.

  2. Configure NTP on the NEO machine:

    Copy
    Copied!
                

    ssh root@<NEO_IP> ntpdate 0.asia.pool.ntp.org

Enabling LLDP on the Mellanox Switch

  1. Login as admin.

  2. Enable LLDP globally on the switch:

    Copy
    Copied!
                

    switch > enable switch # configure terminal switch (config) # lldp

Installing the RPM Package on the Container Image

Before deploying the overcloud, create the /home/stack/containers-prepare-parameter.yaml file, in order to modify the container image with the required python-networking-mlnx package.

  1. Download the RPM python2-networking-mlnx package file from this directory.

  2. Move the package to /home/stack/rpm_path/

  3. Generate /home/stack/containers-prepare-parameter.yaml, if it does not exist yet, using this command:

    Copy
    Copied!
                

    (undercloud) [stack@undercloud ~]$openstack tripleo container image prepare\ default --local-push-destination \ --output-env-file /home/stack/containers-prepare-parameter.yaml

  4. Modify the /home/stack/containers-prepare-parameter.yaml file to install the package on the container image. You may use the following example as reference:

    Copy
    Copied!
                

    parameter_defaults: null DockerInsecureRegistryAddress:   - '192.168.24.1:8787' ContainerImagePrepare:   - push_destination: true     set:       tag: current-tripleo-rdo       namespace: docker.io/tripleostein       name_prefix: centos-binary-       name_suffix: ''       neutron_driver: null   - push_destination: true     includes:       - neutron-server     modify_role: tripleo-modify-image     modify_append_tag: '-updated'     modify_vars:       tasks_from: rpm_install.yml       rpms_path: /home/stack/rpm_path/

Add the /home/stack/ containers-prepare-parameter.yaml file to deploy the command, using the -e parameter, and deploy the overcloud.

Configuring the Mellanox SDN Mechanism Driver Plugin

  1. Modify the /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-mlnx- sdn.yaml file.

  2. Add the /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-mlnx- sdn.yaml file to deploy the command, using the -e parameter, and deploy the overcloud:

    Copy
    Copied!
                

    # A Heat environment file which can be used to configure Mellanox SDN resource_registry: OS::TripleO::Services::NeutronCorePlugin: OS::TripleO::Services::NeutronCorePluginMLNXSDN parameter_defaults: MlnxSDNUsername: '<sdn_username>' MlnxSDNPassword: '<sdn_password>' MlnxSDNUrl: '<sdn_url>' MlnxSDNDomain: 'cloudx' NeutronCorePlugin: 'neutron.plugins.ml2.plugin.Ml2Plugin' NeutronMechanismDrivers: ['mlnx_sdn_assist','sriovnicswitch','openvswitch']

Setting the NTP Server

It is important that the times on the overcloud and NEO machine are synchronized. In the parameter defaults section, add the following line to set the NTP server:

Copy
Copied!
            

parameter_defaults:     NtpServer: ['0.asia.pool.ntp.org', '1.asia.pool.ntp.org']

Warning

The NEO machine and overcloud must have the same NTP server.

Installing the LLDPAD Package on the Overcloud Image

The LLDPAD package must be installed on all overcloud nodes, by installing it on the overcloud image before deployment:

Copy
Copied!
            

  virt-customize -v -a overcloud-full.qcow2 --run-command \        "sudo subscription-manager register --username <USERNAME> \        --password <PASSWORD> --auto-attach ; yum install lldpad -y ;\         sudo subscription-manager unregister"

Configuring the LLDPAD in the First Boot

  1. Create the yaml file that contains the following content:

    Copy
    Copied!
                

    heat_template_version: rocky description: |   Start and configure LLDPAD resources:   userdata:     type: 'OS::Heat::MultipartMime'     properties:       parts:         - config:             get_resource: configure_lldp   configure_lldp:     type: 'OS::Heat::SoftwareConfig'     properties:       config: >         #!/bin/bash         set -eux         set -o pipefail         hostnamectl set-hostname $(hostname -s).localdomain         hostnamectl set-hostname --transient $(hostname -s)         sudo systemctl enable lldpad         sudo systemctl start lldpad         interface=p6p1         lldptool set-lldp -i $interface adminStatus=rxtx         lldptool -T -i $interface -V sysName enableTx=yes         lldptool -T -i $interface -V portDesc enableTx=yes         lldptool -T -i $interface -V sysDesc enableTx=yes         lldptool -T -i $interface -V sysCap enableTx=yes         lldptool -T -i $interface -V mngAddr enableTx=yes         lldptool set-tlv -i $interface -V mngAddr ipv4=$(ip a sh br-ex | grep "         inet " | head -1 | awk '{print $2}' | cut -d'/' -f1); outputs:   'OS::stack_id':     value:       get_resource: userdata

  2. In your network-environment.yaml file, add the following line:

    Copy
    Copied!
                

    resource_registry:   OS::TripleO::ComputeSriov::NodeUserData: ./first_boot.yaml

© Copyright 2023, NVIDIA. Last updated on May 23, 2023.