Fix mellanox plugin naming in scripts

Added a more robust way to find mellanox plugin name and version

Change-Id: I44f57411806ad4c9e58bd2211df3e0461f77b575
This commit is contained in:
Rawan Herzallah 2016-03-07 07:20:30 +00:00
parent 517345f0db
commit c9ffc114b2
4 changed files with 9 additions and 5 deletions

View File

@ -14,7 +14,7 @@ class mellanox_openstack::compute_sriov (
$libvirt_service_name = 'libvirtd' $libvirt_service_name = 'libvirtd'
$libvirt_package_name = $nova::params::libvirt_package_name $libvirt_package_name = $nova::params::libvirt_package_name
$path_to_generate_pci_script = generate ("/bin/bash", "-c", 'echo /etc/fuel/plugins/mellanox-plugin-*.0/generate_pci_passthrough_whitelist.py | tr -d \'\n \' ') $path_to_generate_pci_script = generate ("/bin/bash", "-c", 'echo /etc/fuel/plugins/mellanox-plugin-*/generate_pci_passthrough_whitelist.py | tr -d \'\n \' ')
$pci_passthrough_addresses = generate ("/usr/bin/python", $path_to_generate_pci_script, $exclude_vf, $physnet, $physifc) $pci_passthrough_addresses = generate ("/usr/bin/python", $path_to_generate_pci_script, $exclude_vf, $physnet, $physifc)
# configure pci_passthrough_whitelist nova compute # configure pci_passthrough_whitelist nova compute

View File

@ -5,7 +5,7 @@ name: mellanox-plugin
title: Mellanox Openstack features title: Mellanox Openstack features
# Plugin version # Plugin version
version: 2.0.33 version: 2.0.34
# Description # Description
description: Enable features over Mellanox hardware description: Enable features over Mellanox hardware

View File

@ -1,5 +1,5 @@
MELLANOX_PLUGIN_NAME="mellanox-plugin-2.0" MELLANOX_PLUGIN_NAME="mellanox-plugin-*"
PLUGIN_SCRIPTS_DIR="/var/www/nailgun/plugins/$MELLANOX_PLUGIN_NAME/scripts/" PLUGIN_SCRIPTS_DIR=`echo /var/www/nailgun/plugins/$MELLANOX_PLUGIN_NAME/scripts/`
FUEL_BOOTSTRAP_DIR="/var/www/nailgun/bootstrap/" FUEL_BOOTSTRAP_DIR="/var/www/nailgun/bootstrap/"
ORIG_BOOTSTRAP_VERSION_FILE="/opt/orig_bootstrap.txt" ORIG_BOOTSTRAP_VERSION_FILE="/opt/orig_bootstrap.txt"
BOOTSTRAP_CLI_YAML="/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml" BOOTSTRAP_CLI_YAML="/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml"

View File

@ -3,8 +3,12 @@
import yaml import yaml
import os import os
import time import time
import subprocess
import sys
plugin = "mellanox-plugin-2.0" plugin = subprocess.Popen("echo /var/www/nailgun/plugins/mellanox-plugin-*/ " +
"| tr '/' '\n' | grep mellanox-plugin | tr -d '\n' ",
shell=True, stdout=subprocess.PIPE).stdout.read()
plugin_uri = "http://127.0.0.1:8080/plugins/%s/repositories/ubuntu/" % plugin plugin_uri = "http://127.0.0.1:8080/plugins/%s/repositories/ubuntu/" % plugin
current_time = time.strftime("%d_%m_%y_%H_%M") current_time = time.strftime("%d_%m_%y_%H_%M")