From 6b271982c8c5e1ee7a18e6a55a07f2ac79b76328 Mon Sep 17 00:00:00 2001 From: John Rey Juele Date: Thu, 27 Apr 2023 10:21:48 +0000 Subject: [PATCH] update UFT container to select correct env variable (v22.07) This change is for v22.07 of the UFT project. The entrypoint script that is used for building the UFT image uses an environment variable produced by sriov network device plugin. Recent updates to sriov network device plugin has introduced a new environment variable that is being consumed by the entrypoint script and is breaking UFT functionality. The script is updated to ignore the new environment variable introduced by newer versions of device plugin (with the suffix of _INFO). --- images/entrypoint.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/images/entrypoint.sh b/images/entrypoint.sh index 902d2fd..845455e 100755 --- a/images/entrypoint.sh +++ b/images/entrypoint.sh @@ -13,11 +13,17 @@ # See the License for the specific language governing permissions and # limitations under the License. #### -# This script generate server config file dynamically from VF PCI address -# given in Environment varible exported by device plugin in following -# format: PCIDEVICE_INTEL_COM_INTEL_ENP24S0F0=0000:18:02.2 +# This script generates a server config file dynamically from VF PCI address +# provided by network device plugin. The environment variable is in the format: +# PCIDEVICE_= +# E.g - PCIDEVICE_INTEL_COM_INTEL_ENP24S0F0=0000:18:02.2 +# +# Device plugin also exposes a variable in the format of: +# PCIDEVICE__INFO which contains additional information about +# the allocated devices. Information in that variable is not needed by this script +# and so it is ignored. #### -rawpci=$(env | grep PCIDEVICE_ | awk -F'=' '{ print $2 }') +rawpci=$(env | grep -P 'PCIDEVICE_[A-Z0-9_]{1,}(?