SRIOV init script raises an error: [: Illegal number: 8 eth1:8

Bug #1832379 reported by Nicolas Pochet
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Neutron Open vSwitch Charm
Fix Released
Medium
Nicolas Pochet

Bug Description

When modifying by hand the default environment file (as described in https://bugs.launchpad.net/charm-neutron-openvswitch/+bug/1832378), the /etc/init.d/neutron-openvswitch-networking-sriov.sh script raises the following error:

Jun 11 16:10:26 myhost neutron-openvswitch-networking-sriov.sh[786511]: /etc/init.d/neutron-openvswitch-networking-sriov.sh: 39: [: Illegal number: 8 eth1:8

It is due to https://github.com/openstack/charm-neutron-openvswitch/blob/03eb908d822fcdc91f14c22434a0fd0b51761c90/templates/kilo/neutron-openvswitch-networking-sriov.sh#L50

Stupid bash reproducer:

VFS_LIST="eth0:8 eth1:8"
echo ${VFS_LIST}
eth0:8 eth1:8
echo ${VFS_LIST} | while IFS=':' read DEVICE NUMVFS; do echo "numvfs: ${NUMVFS}, device: ${DEVICE}"; done
numvfs: 8 eth1:8, device: eth0

Changed in charm-neutron-openvswitch:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Sahid Orentino (sahid-ferdjaoui)
Nicolas Pochet (npochet)
Changed in charm-neutron-openvswitch:
assignee: Sahid Orentino (sahid-ferdjaoui) → Nicolas Pochet (npochet)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-neutron-openvswitch (master)

Fix proposed to branch: master
Review: https://review.opendev.org/665314

Changed in charm-neutron-openvswitch:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-openvswitch (master)

Reviewed: https://review.opendev.org/665314
Committed: https://git.openstack.org/cgit/openstack/charm-neutron-openvswitch/commit/?id=d02fad482d328a3368ccdbad8a5f253a774a03cc
Submitter: Zuul
Branch: master

commit d02fad482d328a3368ccdbad8a5f253a774a03cc
Author: Nicolas Pochet <email address hidden>
Date: Fri Jun 14 08:48:09 2019 +0200

    Replace SR-IOV systemd unit script

    * The goal of this change is to enable the ability to configure only the
    VFs that are configured through the charm and not fallback to the
    blanket configuration.
    * This python version of the script brings unit-tests that fully covers
    it.
    * Move the the template files to `files` and modify `neutron_ovs_utils`
    accordingly.

    Closes-Bug: 1832379
    Depends-On: https://review.opendev.org/#/c/664837/

    Change-Id: I7ad1ebc16883bda23cbad89a852e7e8f88f49c49

Changed in charm-neutron-openvswitch:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-neutron-openvswitch:
milestone: none → 19.07
David Ames (thedac)
Changed in charm-neutron-openvswitch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.