Add compute-kit job with DPDK enabled

+ add role for enabling hugepages

Change-Id: I89d3c09ea3bedcba6cb51178c8d1ac482a57af01
Depends-On: I2f9d954258451f64eb87d03affc079b71b00f7bd
This commit is contained in:
astebenkova 2024-02-06 13:43:27 +02:00 committed by Vladimir Kozhukalov
parent 683102b725
commit 2216cbfec4
9 changed files with 108 additions and 5 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: OpenStack-Helm OpenVSwitch description: OpenStack-Helm OpenVSwitch
name: openvswitch name: openvswitch
version: 0.1.21 version: 0.1.22
home: http://openvswitch.org home: http://openvswitch.org
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources: sources:

View File

@ -14,11 +14,11 @@ pod:
limits: limits:
memory: "2Gi" memory: "2Gi"
cpu: "2" cpu: "2"
hugepages-1Gi: "1Gi" hugepages-2Mi: "1Gi"
conf: conf:
ovs_dpdk: ovs_dpdk:
enabled: true enabled: true
hugepages_mountpath: /dev/hugepages hugepages_mountpath: /dev/hugepages
vhostuser_socket_dir: vhostuser vhostuser_socket_dir: vhostuser
socket_memory: 1024 socket_memory: 512
... ...

View File

@ -14,11 +14,11 @@ pod:
limits: limits:
memory: "2Gi" memory: "2Gi"
cpu: "2" cpu: "2"
hugepages-1Gi: "1Gi" hugepages-2Mi: "1Gi"
conf: conf:
ovs_dpdk: ovs_dpdk:
enabled: true enabled: true
hugepages_mountpath: /dev/hugepages hugepages_mountpath: /dev/hugepages
vhostuser_socket_dir: vhostuser vhostuser_socket_dir: vhostuser
socket_memory: 1024 socket_memory: 512
... ...

View File

@ -0,0 +1,20 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- hosts: all
gather_facts: True
become: yes
roles:
- role: enable-hugepages
when: hugepages.enabled|default(false)|bool == true
...

View File

@ -22,4 +22,5 @@ openvswitch:
- 0.1.19 Add check for cgroups v2 file structure - 0.1.19 Add check for cgroups v2 file structure
- 0.1.20 Add Ubuntu Focal and Ubuntu Jammy overrides - 0.1.20 Add Ubuntu Focal and Ubuntu Jammy overrides
- 0.1.21 Add overrides for dpdk - 0.1.21 Add overrides for dpdk
- 0.1.22 Change hugepages size to 2M for easier configuration
... ...

View File

@ -0,0 +1,21 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
hugepages:
enabled: false
# This parameter sets the size of the huge pages, available options: 2M and 1G
size: "2M"
# This parameter sets the number of huge pages to allocate
number: 1024
grub_default_config: "/etc/default/grub"
...

View File

@ -0,0 +1,37 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: Set up 1G hugepages
become: true
block:
- name: Configure grub
lineinfile:
dest: "{{ grub_default_config }}"
line: 'GRUB_CMDLINE_LINUX="default_hugepagesz={{ hugepages.size }} hugepagesz={{ hugepages.size }} hugepages={{ hugepages.number }}"'
regexp: '^GRUB_CMDLINE_LINUX="'
- name: Update grub configuration
command: update-grub2
- name: Reboot host
reboot:
reboot_timeout: 600
when: hugepages.size == "1G"
- name: Set up 2M hugepages
become: true
sysctl:
name: vm.nr_hugepages
value: "{{ hugepages.number }}"
sysctl_set: true
reload: true
when: hugepages.size == "2M"
...

View File

@ -308,5 +308,28 @@
- ./tools/deployment/mariadb-operator-cluster/090-mariadb-backup-test.sh - ./tools/deployment/mariadb-operator-cluster/090-mariadb-backup-test.sh
- ./tools/deployment/mariadb-operator-cluster/095-mariadb-prometheus-mysql-exporter.sh - ./tools/deployment/mariadb-operator-cluster/095-mariadb-prometheus-mysql-exporter.sh
- job:
name: openstack-helm-compute-kit-dpdk-ubuntu_jammy
description: |
Run the openstack-helm compute-kit job with DPDK enabled.
We use single node environment to run this job which means
that the job only tests that QEMU and OVS-DPDK are working
together. The job does not assume having specific DPDK hardware.
parent: openstack-helm-compute-kit
pre-run:
- playbooks/enable-hugepages.yaml
- playbooks/prepare-hosts.yaml
nodeset: openstack-helm-1node-32GB-ubuntu_jammy
vars:
gate_scripts_relative_path: ../openstack-helm
hugepages:
enabled: true
size: "2M"
number: 2048
osh_params:
openstack_release: "2023.2"
container_distro_name: ubuntu
container_distro_version: jammy
feature_gates: dpdk
... ...

View File

@ -30,6 +30,7 @@
- openstack-helm-infra-metacontroller - openstack-helm-infra-metacontroller
- openstack-helm-infra-mariadb-operator - openstack-helm-infra-mariadb-operator
- openstack-helm-infra-openstack-support-mariadb-service-primary - openstack-helm-infra-openstack-support-mariadb-service-primary
- openstack-helm-compute-kit-dpdk-ubuntu_jammy
gate: gate:
jobs: jobs:
- openstack-helm-lint - openstack-helm-lint