Update neutron chart to enable dpdk tests

Running dpdk test job on a sinlge node env
does not require a real hardware dpdk interfaces
to be attached to the tunnel bridge. Let's
make the list of dpdk interfaces empty which
will allow us to test the Openvswitch in user space
but not touch real hardware.

Change-Id: I2f9d954258451f64eb87d03affc079b71b00f7bd
Co-Authored-By: Arina Stebenkova <astebenkova@mirantis.com>
This commit is contained in:
Vladimir Kozhukalov 2024-02-12 17:34:55 -06:00
parent 04dc3ab3d0
commit 17ca3983c2
6 changed files with 44 additions and 16 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Neutron
name: neutron
version: 0.3.31
version: 0.3.32
home: https://docs.openstack.org/neutron/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources:

View File

@ -1,7 +1,7 @@
---
network:
interface:
tunnel: br-phy
tunnel: null
conf:
plugins:
openvswitch_agent:
@ -14,13 +14,13 @@ conf:
ovs_dpdk:
enabled: true
driver: uio_pci_generic
nics:
nics: []
# CHANGE-ME: modify pci_id according to your hardware
- name: dpdk0
pci_id: '0000:05:00.0'
bridge: br-phy
migrate_ip: true
# - name: dpdk0
# pci_id: '0000:05:00.0'
# bridge: br-tun
# migrate_ip: true
bridges:
- name: br-phy
- name: br-tun
bonds: []
...

View File

@ -73,4 +73,5 @@ neutron:
- 0.3.29 Disable DVR for OVN floating ip
- 0.3.30 Fix designate auth url
- 0.3.31 FIX ovn-metadata-agent mountPropagation overrides by parent directory
- 0.3.32 Update dpdk override
...

View File

@ -22,6 +22,17 @@ parameters:
description: address of a dns nameserver reachable in your environment
default: 8.8.8.8
dpdk:
type: string
default: disabled
constraints:
- allowed_values:
- enabled
- disabled
conditions:
dpdk_enable: {equals: [{get_param: dpdk}, "enabled"]}
resources:
flavor:
type: OS::Nova::Flavor
@ -30,13 +41,21 @@ resources:
ram: 128
vcpus: 1
flavor_dpdk:
type: OS::Nova::Flavor
properties:
disk: 1
ram: 2048
vcpus: 1
extra_specs:
"hw:mem_page_size": "2MB"
server:
type: OS::Nova::Server
properties:
image:
get_param: image
flavor:
get_resource: flavor
flavor: {if: ["dpdk_enable", {get_resource: flavor_dpdk}, {get_resource: flavor}]}
key_name:
get_param: ssh_key
networks:

View File

@ -13,6 +13,11 @@
# under the License.
set -xe
DPDK_ENABLED=disabled
if [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])dpdk($|[[:space:]]) ]]; then
DPDK_ENABLED=enabled
fi
export OS_CLOUD=openstack_helm
: ${HEAT_DIR:="$(readlink -f ./tools/deployment/common)"}
@ -77,6 +82,7 @@ openstack stack show "heat-basic-vm-deployment" || \
--parameter ssh_key=${OSH_VM_KEY_STACK} \
--parameter cidr=${OSH_PRIVATE_SUBNET} \
--parameter dns_nameserver=${OSH_BR_EX_ADDR%/*} \
--parameter dpdk=${DPDK_ENABLED} \
-t ${HEAT_DIR}/heat-basic-vm-deployment.yaml \
heat-basic-vm-deployment
@ -85,6 +91,13 @@ FLOATING_IP=$(openstack stack output show \
floating_ip \
-f value -c output_value)
INSTANCE_ID=$(openstack stack output show \
heat-basic-vm-deployment \
instance_uuid \
-f value -c output_value)
openstack server show ${INSTANCE_ID}
function wait_for_ssh_port {
# Default wait timeout is 300 seconds
set +x
@ -127,11 +140,6 @@ ssh -i ${SSH_DIR}/osh_key cirros@${FLOATING_IP} curl --verbose --connect-timeout
# Check to see if cinder has been deployed, if it has then perform a volume attach.
if openstack service list -f value -c Type | grep -q "^volume"; then
INSTANCE_ID=$(openstack stack output show \
heat-basic-vm-deployment \
instance_uuid \
-f value -c output_value)
# Get the devices that are present on the instance
DEVS_PRE_ATTACH=$(mktemp)
ssh -i ${SSH_DIR}/osh_key cirros@${FLOATING_IP} lsblk > ${DEVS_PRE_ATTACH}

View File

@ -40,7 +40,7 @@ make nova
#NOTE: Deploy nova
: ${OSH_EXTRA_HELM_ARGS:=""}
if [ "x$(systemd-detect-virt)" == "xnone" ]; then
if [ "x$(systemd-detect-virt)" == "xnone" ] || [ "x$(systemd-detect-virt)" == "xkvm" ]; then
echo 'OSH is not being deployed in virtualized environment'
helm upgrade --install nova ./nova \
--namespace=openstack \