provisioning fails due to undefined SRIOV_INTERFACES var @ compute-server-setup.sh

Bug #1540688 reported by Senthilnathan Murugappan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Undecided
Senthilnathan Murugappan

Bug Description

2016-02-01 16:25:14:010547: [root@10.84.21.6] out: /usr/bin/compute-server-setup.sh: line 195: [: !=: unary operator expected

root@a2s42:~/contrail-provisioning# git diff
diff --git a/contrail_provisioning/compute/scripts/compute-server-setup.sh b/contrail_provisioning/compute/scripts/compute-server-setup.sh
index 1ce4f38..5c9753b 100755
--- a/contrail_provisioning/compute/scripts/compute-server-setup.sh
+++ b/contrail_provisioning/compute/scripts/compute-server-setup.sh
@@ -192,7 +192,7 @@ if [ $VMWARE_IP ]; then
 fi

 openstack-config --del /etc/nova/nova.conf DEFAULT pci_passthrough_whitelist
-if [ $SRIOV_INTERFACES != "" ]; then
+if [ ! -z $SRIOV_INTERFACES ] ; then
     OLD_IFS=$IFS
     IFS=','
     intf_list=($SRIOV_INTERFACES)

The above patch would check for defined as well as empty string or not.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/16767
Submitter: Senthilnathan Murugappan (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/16767
Committed: http://github.org/Juniper/contrail-provisioning/commit/7a1da892d7d4be498ee780f1b7402255fc09a094
Submitter: Zuul
Branch: master

commit 7a1da892d7d4be498ee780f1b7402255fc09a094
Author: Senthilnathan Murugappan <email address hidden>
Date: Mon Feb 1 17:10:10 2016 -0800

undefined SRIOV_INTERFACES var @ compute-server-setup.sh Edit

Check if SRIOV_INTERFACES is defined before accessing it.
Closes-Bug:#1540688

Change-Id: I5b565472766d4d2aae41dd2523d63a68aab7028b

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.