From bb8a33c901fa7226f59c7d0b6d938fc284c14ea7 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Thu, 5 Mar 2015 15:03:53 +0000 Subject: [PATCH] Ironic-discoverd: Add benchmark data This patch is adding support to run the AHC benhcmark as part of the hardware detection in the ironic-discoverd ramdisk. Two new binaries dependency were added: * fio: Used for storage benchmarking * sysbench: Used for memory and cpu benchmarking The patch also removes the installation of the hardware library from pip to install it from delorean. However, the hardware library has an unpackaged dependency (ptyprocess). Until we get that packaged, we will need to install from pip. Change-Id: I94fe2ba71205fb996700b2c20af396f75900a04e --- .../binary-deps.d/discovery-ironic | 2 ++ .../init.d/80-discovery-ironic | 2 +- .../install.d/56-discovery-ironic-install-hardware | 9 ++++----- scripts/instack-build-images | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/elements/ironic-discoverd-ramdisk-instack/binary-deps.d/discovery-ironic b/elements/ironic-discoverd-ramdisk-instack/binary-deps.d/discovery-ironic index f20fa994e..2bdf28898 100644 --- a/elements/ironic-discoverd-ramdisk-instack/binary-deps.d/discovery-ironic +++ b/elements/ironic-discoverd-ramdisk-instack/binary-deps.d/discovery-ironic @@ -50,3 +50,5 @@ uname vgcreate wc lsblk +fio +sysbench diff --git a/elements/ironic-discoverd-ramdisk-instack/init.d/80-discovery-ironic b/elements/ironic-discoverd-ramdisk-instack/init.d/80-discovery-ironic index 455434ba7..7f20eca8b 100644 --- a/elements/ironic-discoverd-ramdisk-instack/init.d/80-discovery-ironic +++ b/elements/ironic-discoverd-ramdisk-instack/init.d/80-discovery-ironic @@ -162,7 +162,7 @@ log_n() { } run_edeploy_detect() { - hardware-detect > /hw.json || give_up "Failed to detect hardware" + hardware-detect --benchmark cpu disk mem > /hw.json || give_up "Failed to detect hardware" } run_standard_detect() { diff --git a/elements/ironic-discoverd-ramdisk-instack/install.d/56-discovery-ironic-install-hardware b/elements/ironic-discoverd-ramdisk-instack/install.d/56-discovery-ironic-install-hardware index 7c2b9583c..20050d33a 100755 --- a/elements/ironic-discoverd-ramdisk-instack/install.d/56-discovery-ironic-install-hardware +++ b/elements/ironic-discoverd-ramdisk-instack/install.d/56-discovery-ironic-install-hardware @@ -3,10 +3,9 @@ set -eu set -o pipefail -install-packages hdparm ipmitool lshw ethtool lldpad hdparm sdparm pciutils mcelog smartmontools util-linux lvm2 jq +install-packages hdparm ipmitool lshw ethtool lldpad hdparm sdparm pciutils mcelog smartmontools util-linux lvm2 jq fio sysbench python-hardware -# python-hardware package is missing requires on python-psutil -# and also should have a requirement on python-ptyprocess which does not appear -# packaged anywhere, so we have to fall back to pip for now. +# We still need python-pip until we can get python-ptyprocess packaged yum -y install python-pip -pip install hardware + +pip install ptyprocess diff --git a/scripts/instack-build-images b/scripts/instack-build-images index 79e7072b1..0095a545e 100755 --- a/scripts/instack-build-images +++ b/scripts/instack-build-images @@ -75,7 +75,7 @@ export DEPLOY_IMAGE_ELEMENT=${DEPLOY_IMAGE_ELEMENT:-deploy-ironic} export DEPLOY_NAME=${DEPLOY_NAME:-deploy-ramdisk-ironic} # Include delorean-rdo-management with the discovery ramdisk build so that we # can install python-hardware from somewhere. -export DISCOVERY_IMAGE_ELEMENT=${DISCOVERY_IMAGE_ELEMENT:-"ironic-discoverd-ramdisk-instack"} +export DISCOVERY_IMAGE_ELEMENT=${DISCOVERY_IMAGE_ELEMENT:-"delorean-rdo-management ironic-discoverd-ramdisk-instack"} export DISCOVERY_NAME=${DISCOVERY_NAME:-discovery-ramdisk} export DIB_COMMON_ELEMENTS=${DIB_COMMON_ELEMENTS:-""} @@ -100,7 +100,7 @@ fi export DELOREAN=${DELOREAN:-"0"} if [ "$DELOREAN" = "1" ]; then - export DIB_COMMON_ELEMENTS="$DIB_COMMON_ELEMENTS delorean" + export DIB_COMMON_ELEMENTS="$DIB_COMMON_ELEMENTS delorean" fi export PACKAGES=${PACKAGES:-"1"}