aboutsummaryrefslogtreecommitdiffstats
path: root/nfvbenchvm/dib/elements
diff options
context:
space:
mode:
authorGwenael Lambrouin <gwenael.lambrouin@orange.com>2021-12-13 13:17:53 +0100
committerGwenael Lambrouin <gwenael.lambrouin@orange.com>2022-02-28 15:44:58 +0100
commit1a9c875d35daf4e742cd980e824c862ad793a658 (patch)
tree3fabbc360d61759f168e250c41aed5f6a309a064 /nfvbenchvm/dib/elements
parentb8186aa57c5026c556f5ac41f49126b14d720cf4 (diff)
nfvbenchvm: fix broken build after dib update
Attempting to build nfvbench VM images with diskimage_builder (dib) 3.16.0 leads to the following error: diskimage_builder.element_dependencies.MissingElementException: Element 'block-device' not found Something changed at some point of diskimage_builder history, and the updated doc states: "When using the vm element, an element that provides block-device should be included". To fix this and prevent future similar issues, this patch: - adds the "block-device-mbr" element to the dependency list - sets diskimage_builder version By the way: - replace the deprecated "centos7" element with the more generic "centos" element. - add missing dependencies in the pre-requisites section of nfvbenchvm doc - install pip with package manager (the current latest version of get-pip.py is not compatible with python 3.6, so let's use the occasion to stop getting pip directly from the Internet) - use Python 3 in build-image.sh Change-Id: I3198a1042eca04224b2a62db443c39a76903cf22 Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@orange.com>
Diffstat (limited to 'nfvbenchvm/dib/elements')
-rw-r--r--nfvbenchvm/dib/elements/nfvbenchvm/element-deps1
-rw-r--r--nfvbenchvm/dib/elements/nfvbenchvm/package-installs.yaml3
-rwxr-xr-xnfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-pip-package9
-rwxr-xr-xnfvbenchvm/dib/elements/nfvbenchvm/post-install.d/52-nfvbench-script2
4 files changed, 7 insertions, 8 deletions
diff --git a/nfvbenchvm/dib/elements/nfvbenchvm/element-deps b/nfvbenchvm/dib/elements/nfvbenchvm/element-deps
index c6be0aa..7fd8e5b 100644
--- a/nfvbenchvm/dib/elements/nfvbenchvm/element-deps
+++ b/nfvbenchvm/dib/elements/nfvbenchvm/element-deps
@@ -1,4 +1,5 @@
vm
+block-device-mbr
cloud-init-datasources
install-static
package-installs
diff --git a/nfvbenchvm/dib/elements/nfvbenchvm/package-installs.yaml b/nfvbenchvm/dib/elements/nfvbenchvm/package-installs.yaml
index 60efec1..6f86027 100644
--- a/nfvbenchvm/dib/elements/nfvbenchvm/package-installs.yaml
+++ b/nfvbenchvm/dib/elements/nfvbenchvm/package-installs.yaml
@@ -17,4 +17,5 @@ openssh-server:
dpdk-tools:
git:
python3-dev:
-libpython3.6-dev: \ No newline at end of file
+libpython3.6-dev:
+python3-pip:
diff --git a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-pip-package b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-pip-package
index 9707841..79dea6c 100755
--- a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-pip-package
+++ b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-pip-package
@@ -1,8 +1,5 @@
#!/bin/bash
-cd /tmp
-wget https://bootstrap.pypa.io/get-pip.py
-python3 get-pip.py
-
-pip3 install setuptools wheel pbr
-pip3 install pyyaml
+python3 -m pip install --upgrade pip
+python3 -m pip install setuptools wheel pbr
+python3 -m pip install pyyaml
diff --git a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/52-nfvbench-script b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/52-nfvbench-script
index 9162952..5cc52e3 100755
--- a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/52-nfvbench-script
+++ b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/52-nfvbench-script
@@ -19,7 +19,7 @@ rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex
cd /opt
git clone https://gerrit.opnfv.org/gerrit/nfvbench
cd nfvbench/
-pip3 install . --use-deprecated=legacy-resolver
+python3 -m pip install . --use-deprecated=legacy-resolver
cp xtesting/testcases.yaml /usr/local/lib/python3.6/site-packages/xtesting/ci/testcases.yaml
python3 ./docker/cleanup_generators.py
rm -rf /opt/nfvbench/.git