Skip to content

Commit

Permalink
vrouter-port-control execution failure
Browse files Browse the repository at this point in the history
Partial-bug: #1758481
Containerized nova-compute doesnt have vrouter-port-control
in the standard executable paths. Include the plugin path
during vrouter-port-control call.

Change-Id: I47445a14b05562ea187a1524dd4346f56f7890f4
  • Loading branch information
Jeya ganesh babu J committed Sep 6, 2018
1 parent 65ecfdb commit 7d1e481
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vif_plug_vrouter/vrouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.

import os
from os_vif import objects
from os_vif import plugin

Expand Down Expand Up @@ -83,7 +84,9 @@ def plug_contrail_vif(vif_id, vm_id, net_id, project_id, ip_addr, ip6_addr,
'--rx_vlan_id=%d' % -1,
)
try:
processutils.execute(*cmd)
env = dict(os.environ)
env['PATH'] = env['PATH'] + ':/opt/plugin/bin'
processutils.execute(*cmd, env_variables=env)
except Exception as e:
LOG.error(_LE("Unable to execute vrouter-port-control "
"%(args)s. Exception: %(exception)s"),
Expand Down Expand Up @@ -116,7 +119,9 @@ def unplug_contrail_vif(port_id, pci_dev=None, vnic_type=None,
if vhostuser_mode:
cmd += ('--vhostuser_mode=%s' % vhostuser_mode,)
try:
processutils.execute(*cmd)
env = dict(os.environ)
env['PATH'] = env['PATH'] + ':/opt/plugin/bin'
processutils.execute(*cmd, env_variables=env)
except Exception as e:
LOG.error(_LE("Unable to execute vrouter-port-control "
"%(args)s. Exception: %(exception)s"),
Expand Down

0 comments on commit 7d1e481

Please sign in to comment.