From 77ada2d24f25a7ef4131955cff3ad773e5e7c3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?p=C3=BDrus?= Date: Fri, 15 Nov 2024 14:34:53 +0100 Subject: [PATCH] [tests] bump devstack branch to stable/2023.2, fix python issues (#2716) --- .../roles/install-devstack/defaults/main.yaml | 2 +- .../roles/install-devstack/tasks/main.yml | 15 --------------- .../install-devstack/templates/local.conf.j2 | 9 +++++++++ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/tests/playbooks/roles/install-devstack/defaults/main.yaml b/tests/playbooks/roles/install-devstack/defaults/main.yaml index d5d704f4c3..5812d9c97e 100644 --- a/tests/playbooks/roles/install-devstack/defaults/main.yaml +++ b/tests/playbooks/roles/install-devstack/defaults/main.yaml @@ -1,7 +1,7 @@ --- user: "stack" workdir: "/home/{{ user }}/devstack" -branch: "stable/2023.1" +branch: "stable/2023.2" enable_services: - nova - glance diff --git a/tests/playbooks/roles/install-devstack/tasks/main.yml b/tests/playbooks/roles/install-devstack/tasks/main.yml index fa58b4a1b1..1115520321 100644 --- a/tests/playbooks/roles/install-devstack/tasks/main.yml +++ b/tests/playbooks/roles/install-devstack/tasks/main.yml @@ -97,21 +97,6 @@ src: local.conf.j2 dest: "{{ workdir }}/local.conf" - - name: Fix localhost - shell: - executable: /bin/bash - cmd: | - # https://bugs.launchpad.net/devstack/+bug/1891694 - rm -rf /usr/lib/python3/dist-packages/PyYAML-*.egg-info - # https://bugs.launchpad.net/devstack/+bug/1906322 - sed -i 's|$cmd_pip $upgrade |$cmd_pip $upgrade --ignore-installed |g' {{ workdir }}/inc/python - python3 -m pip install --upgrade pip==23.0 - python3 -m pip install --upgrade keystoneauth1==5.1.1 - python3 -m pip install --upgrade setuptools - python3 -m pip install --upgrade python-debian - python3 -m pip install --upgrade distro-info - python3 -m pip install --upgrade SecretStorage - - name: Change devstack directory owner file: path: "{{ item }}" diff --git a/tests/playbooks/roles/install-devstack/templates/local.conf.j2 b/tests/playbooks/roles/install-devstack/templates/local.conf.j2 index b75b4598df..6ac3707636 100644 --- a/tests/playbooks/roles/install-devstack/templates/local.conf.j2 +++ b/tests/playbooks/roles/install-devstack/templates/local.conf.j2 @@ -122,6 +122,15 @@ MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS='snapshot_support=True create_share_from_s MANILA_CONFIGURE_DEFAULT_TYPES=True {% endif %} +# Add a pre-install script to upgrade pip and setuptools +[[local|pre-install]] +# Activate the virtual environment and upgrade pip and setuptools +if [ -f /opt/stack/data/venv/bin/activate ]; then + source /opt/stack/data/venv/bin/activate + pip install --upgrade pip setuptools + deactivate +fi + {% if "glance" in enable_services %} [[post-config|$GLANCE_API_CONF]] [glance_store]