aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts/standalone/model.py
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-01-10 19:42:57 +0000
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-03-21 09:08:27 +0000
commit650e870c1bc836d34e8bda6423560581b25be0a9 (patch)
treee5799f3d6765a2c9be59ce8954f332b3a0f0fed4 /yardstick/benchmark/contexts/standalone/model.py
parentdb951243d3d036fa7989bbd388e869eb89b247e8 (diff)
Improve OVS-DPDK boot process
Check if hugepages are present in the system. Check if every command executed during the boot up process exits correctly. JIRA: YARDSTICK-917 Change-Id: Ic0c8a72199ad80e3a65488cc88d0692863751284 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/benchmark/contexts/standalone/model.py')
-rw-r--r--yardstick/benchmark/contexts/standalone/model.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py
index 14738da8a..ac81ee742 100644
--- a/yardstick/benchmark/contexts/standalone/model.py
+++ b/yardstick/benchmark/contexts/standalone/model.py
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from __future__ import absolute_import
import os
import re
import time
@@ -25,7 +24,8 @@ from netaddr import IPNetwork
import xml.etree.ElementTree as ET
from yardstick import ssh
-from yardstick.common.constants import YARDSTICK_ROOT_PATH
+from yardstick.common import constants
+from yardstick.common import exceptions
from yardstick.common.yaml_loader import yaml_load
from yardstick.network_services.utils import PciAddress
from yardstick.network_services.helpers.cpu import CpuSysCores
@@ -374,7 +374,8 @@ class StandaloneContextHelper(object):
except IOError as io_error:
if io_error.errno != errno.ENOENT:
raise
- self.file_path = os.path.join(YARDSTICK_ROOT_PATH, file_path)
+ self.file_path = os.path.join(constants.YARDSTICK_ROOT_PATH,
+ file_path)
cfg = self.read_config_file()
nodes.extend([node for node in cfg["nodes"] if str(node["role"]) != nfvi_role])
@@ -506,7 +507,7 @@ class OvsDeploy(object):
StandaloneContextHelper.install_req_libs(self.connection, pkgs)
def ovs_deploy(self):
- ovs_deploy = os.path.join(YARDSTICK_ROOT_PATH,
+ ovs_deploy = os.path.join(constants.YARDSTICK_ROOT_PATH,
"yardstick/resources/scripts/install/",
self.OVS_DEPLOY_SCRIPT)
if os.path.isfile(ovs_deploy):
@@ -522,4 +523,6 @@ class OvsDeploy(object):
cmd = "sudo -E %s --ovs='%s' --dpdk='%s' -p='%s'" % (remote_ovs_deploy,
ovs, dpdk, http_proxy)
- self.connection.execute(cmd)
+ exit_status, _, stderr = self.connection.execute(cmd)
+ if exit_status:
+ raise exceptions.OVSDeployError(stderr=stderr)