From 7ee7de1ec9f546f7ff45b51f74e54a52ad6083f7 Mon Sep 17 00:00:00 2001 From: Yumeng Bao Date: Mon, 15 Jun 2020 15:59:01 +0800 Subject: [PATCH] Remove OPAE dependency in devstack This patch removes OPAE driver package from cyborg-agent dependencies due to the following reasons: 1. In the kolla cyborg-agent image we install OPAE, but OPAE is not available for CentOS 8 for the moment. This will make the cyborg-agent image unbuildable in Ussuri[0]. 2. In devstack, due to the fact that OPAE packages depend on libjson0, which is not available after Ubuntu 16.04, so cyborg can't be installed on Ubuntu higher than 16.04 now(unless disable dependency manually). Moreover,from cyborg's perspective, it does not need to contain any hardware driver dependency, we can assume the admin should know about it and install the correct version. 3. We had an agreement at Victoria PTG that we should remove.[1] [0]http://lists.openstack.org/pipermail/openstack-discuss/2020-June/015428.html [1]https://etherpad.opendev.org/p/cyborg-victoria-goals L261 Change-Id: If0c92ea6ed98f195f5645ae0260855ed50f4f2a8 Story: 2007810 Task: 40078 --- devstack/lib/cyborg | 21 ------- devstack/lib/opae | 57 ------------------- devstack/plugin.sh | 3 - devstack/settings | 11 ---- doc/source/contributor/devstack_setup.rst | 24 -------- ...ndency-from-devstack-f6db83bb37761340.yaml | 13 +++++ 6 files changed, 13 insertions(+), 116 deletions(-) delete mode 100644 devstack/lib/opae create mode 100644 releasenotes/notes/remove-OPAE-dependency-from-devstack-f6db83bb37761340.yaml diff --git a/devstack/lib/cyborg b/devstack/lib/cyborg index fed7b9bc..b58da12b 100644 --- a/devstack/lib/cyborg +++ b/devstack/lib/cyborg @@ -31,27 +31,6 @@ function check_cyborg_service_deps { fi } -function pre_install_agent { - if is_service_enabled cyborg-agent; then - # stack/pre-install - Called after (OS) setup is complete and before - # project source is installed - echo_summary "Installing additional Cyborg packages" - if [[ "$OPAE_INSTALL_ENABLE" == "True" ]] && install_opae_packages; then - echo_summary "INFO: Additional Cyborg packages installed" - elif [[ "$OPAE_INSTALL_ENABLE" == "True" ]]; then - echo "WARNING: Failed to install additional Cyborg packages" - fi - fi -} - -function cleanup_agent { - if is_service_enabled cyborg-agent; then - if [[ "$OPAE_INSTALL_ENABLE" == "True" ]]; then - uninstall_opae_packages - fi - fi -} - function clone_cyborg_client { if [[ "${CYBORG_CLIENT_INSTALL}" == "True" ]]; then diff --git a/devstack/lib/opae b/devstack/lib/opae deleted file mode 100644 index e17df579..00000000 --- a/devstack/lib/opae +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -# -# lib/opae -# Functions to download, install, or remove OPAE packages - -# Dependencies: -# - -function setup_distro_vars { - PKG_EXT="" - if is_fedora; then - PKG_EXT="rpm" - elif is_ubuntu ; then - # NOTE(Sundar): OPAE packages depend on libjson0, which is - # not available after Ubuntu 16.04. After OPAE packages are - # updated, this check can be removed. - [[ $os_RELEASE == "16.04" ]] && PKG_EXT="deb" - fi -} - -function install_opae_pkg { - local pkg=$1 - local url=$2 - local CURL="curl -sSfL --retry 2" - local tmpfile="/tmp/$pkg.$PKG_EXT" - local retval=0 - - # NOTE(Sundar): After OPAE libraries become part of the distro - # repos, we can skip the download with curl. - if ! is_package_installed $pkg; then - $CURL -o $tmpfile $url; retval=$? - if [[ $? -eq 0 ]]; then - install_package $tmpfile; retval=$? - [[ $? -ne 0 ]] && echo "WARNING: Could not install $pkg" - else - echo "WARNING: Could not download $url" - fi - /bin/rm -f $tmpfile - fi - return $retval -} - -function install_opae_packages { - setup_distro_vars - local libs_url="$OPAE_GITHUB/$OPAE_LIBS.$PKG_EXT" - local devel_url="$OPAE_GITHUB/$OPAE_DEVEL.$PKG_EXT" - - [[ "$PKG_EXT" == "" ]] && return 1 - install_opae_pkg "$OPAE_LIBS_PKG" $libs_url && \ - install_opae_pkg "$OPAE_DEVEL_PKG" $devel_url - # return value is the exit code of last command -} - -function uninstall_opae_packages { - uninstall_package "$OPAE_DEVEL_PKG" - uninstall_package "$OPAE_LIBS_PKG" -} diff --git a/devstack/plugin.sh b/devstack/plugin.sh index c8e2ea11..0b9e0e31 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -6,13 +6,11 @@ echo_summary "cyborg devstack plugin.sh called: $1/$2" source $DEST/cyborg/devstack/lib/cyborg -source $DEST/cyborg/devstack/lib/opae case $1 in "stack") case $2 in "pre-install") - pre_install_agent clone_cyborg_client ;; "install") @@ -47,6 +45,5 @@ case $1 in # clean - Called by clean.sh before other services are cleaned, but after # unstack.sh has been called. cleanup_cyborg - cleanup_agent ;; esac diff --git a/devstack/settings b/devstack/settings index b60ed8be..acbb0b6e 100644 --- a/devstack/settings +++ b/devstack/settings @@ -39,17 +39,6 @@ else CYBORG_API_URL="$CYBORG_SERVICE_PROTOCOL://$CYBORG_SERVICE_HOST:$CYBORG_SERVICE_PORT" fi -# OPAE settings -# OPAE packages are not yet upstreamed into OS repos -# We need to download them from OPAE releases page on GitHub -OPAE_INSTALL_ENABLE=$(trueorfalse True OPAE_INSTALL_ENABLE) -OPAE_VERSION=${OPAE_VERSION:-"1.1.0-2"} -OPAE_GITHUB=${OPAE_GITHUB:-"https://github.com/OPAE/opae-sdk/releases/download/$OPAE_VERSION"} -OPAE_DEVEL_PKG=${OPAE_DEVEL_PKG:-"opae-devel"} -OPAE_DEVEL=${OPAE_DEVEL:-"${OPAE_DEVEL_PKG}-$OPAE_VERSION.x86_64"} -OPAE_LIBS_PKG=${OPAE_LIBS_PKG:-"opae-libs"} -OPAE_LIBS=${OPAE_LIBS:-"${OPAE_LIBS_PKG}-$OPAE_VERSION.x86_64"} - # client settings CYBORG_CLIENT_INSTALL=$(trueorfalse True CYBORG_CLIENT_INSTALL) CYBORG_CLIENT_REPO=${CYBORG_CLIENT_REPO:-"$GIT_BASE/openstack/python-cyborgclient"} diff --git a/doc/source/contributor/devstack_setup.rst b/doc/source/contributor/devstack_setup.rst index 9a07e031..b03fb118 100644 --- a/doc/source/contributor/devstack_setup.rst +++ b/doc/source/contributor/devstack_setup.rst @@ -2,12 +2,6 @@ DevStack Quick Start ==================== -.. note:: - - Because OPAE packages depend on libjson0, which is not available - after Ubuntu 16.04, so cyborg can't be installed on Ubuntu - higher than 16.04 now. - Create stack user (optional) ---------------------------- @@ -119,24 +113,6 @@ Enable services If you got version conflicts, please set `PIP_UPGRADE` to `True` in local.conf -Disable OPAE install ->>>>>>>>>>>>>>>>>>>> - -:: - - OPAE_INSTALL_ENABLE=false - -- By default OPAE_INSTALL_ENABLE is True. - -- You need to set OPAE_INSTALL_ENABLE as false explicitly, - if not need OPEA enviroment. - -- At present OPAE depends on OS verson heavily. - -.. note:: - - If you do not want to try Intel FPGA, you can disable OPAE install. Then you - do not depend on specific OS verson. Multi-Node Lab -------------- diff --git a/releasenotes/notes/remove-OPAE-dependency-from-devstack-f6db83bb37761340.yaml b/releasenotes/notes/remove-OPAE-dependency-from-devstack-f6db83bb37761340.yaml new file mode 100644 index 00000000..8bbe794e --- /dev/null +++ b/releasenotes/notes/remove-OPAE-dependency-from-devstack-f6db83bb37761340.yaml @@ -0,0 +1,13 @@ +--- +deprecations: + - | + Intel OPAE driver dependency is removed from the devstack installation + dependencies due to the following reasons: + 1) In the kolla cyborg-agent image we install OPAE, but OPAE is + not available for CentOS 8 for the moment. This will make the cyborg-agent + image unbuildable in Ussuri. 2) In devstack, due to the fact that OPAE + packages depend on libjson0, which is not available after Ubuntu 16.04, so + cyborg can't be installed on Ubuntu higher than 16.04 now(unless disable + dependency manually). Moreover,from cyborg's perspective, it does not need + to contain any hardware driver dependency, we can assume the admin should + know about it and install the correct version.