Fix upgrade on CentOS and with Keystone enabled

* Downgrade openstacksdk instead of the collections since some keystone
  code does not work on old collection and new SDK.
* Force checkout on upgrade since we have local changes to requirements

Reverts commit c12b7fafe8.

Change-Id: I14a83b703c1c76fd311c60aa23880b5708105165
This commit is contained in:
Dmitry Tantsur 2022-07-08 09:53:33 +02:00
parent 7c9ef4e68e
commit 03ddd02656
7 changed files with 30 additions and 8 deletions

View File

@ -1,6 +1,4 @@
collections:
- name: openstack.cloud
# NOTE(dtantsur): replace with >=2.0.0 when ready. The next version after
# 1.8.0 will be incompatible with openstacksdk in Zed constraints.
version: '>=1.3.0,<=1.8.0'
version: '>=1.3.0,<2.0.0'
source: https://galaxy.ansible.com

View File

@ -18,7 +18,7 @@
UPPER_CONSTRAINTS_FILE: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
WORKSPACE: "{{ ansible_user_dir }}/src/opendev.org"
ZUUL_BRANCH: "{{ upgrade_from }}"
- command: git checkout -
- command: git checkout --force -
args:
chdir: "{{ ansible_user_dir }}/{{ item.src_dir }}"
loop: "{{ zuul.projects.values() | list }}"

View File

@ -92,6 +92,14 @@
group: "{{ ansible_user_gid }}"
when: copy_from_local_path | bool
# FIXME(dtantsur): downgrade openstacksdk since ansible-collections-openstack
# before 2.0.0 cannot work with 0.99.0. Remove when we use >=2.0.0.
- name: downgrade openstacksdk in upper constraints
lineinfile:
path: "{{ upper_constraints_file }}"
regexp: "^openstacksdk="
line: "openstacksdk===0.61.0"
- include: prepare_libvirt.yml
- name: truncate explicit list of vm names

View File

@ -133,3 +133,7 @@ bifrost_install_sources:
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
upper_constraints_file: >-
{{ lookup('env', 'UPPER_CONSTRAINTS_FILE')
| default(lookup('env', 'TOX_CONSTRAINTS_FILE'), True)
| default(reqs_git_folder + '/upper-constraints.txt', True) }}

View File

@ -71,3 +71,11 @@
- copy_from_local_path | bool
- item.source_install | default(true) | bool
- item.enabled | default(true) | bool
# FIXME(dtantsur): downgrade openstacksdk since ansible-collections-openstack
# before 2.0.0 cannot work with 0.99.0. Remove when we use >=2.0.0.
- name: downgrade openstacksdk in upper constraints
lineinfile:
path: "{{ upper_constraints_file }}"
regexp: "^openstacksdk="
line: "openstacksdk===0.61.0"

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes upgrade from Yoga with Keystone enabled by keeping the Yoga version
of openstacksdk until ansible-collections-openstack releases version
2.0.0.

View File

@ -15,9 +15,7 @@
- bifrost-integration-redfish-vmedia-uefi-ubuntu-focal
- bifrost-integration-redfish-vmedia-uefi-centos-9
- bifrost-upgrade-ubuntu-focal
# FIXME(dtantsur): make this voting when Yoga is fixed
- bifrost-upgrade-keystone-centos9:
voting: false
- bifrost-upgrade-keystone-centos9
# Non-voting jobs
- bifrost-integration-tinyipa-fedora-latest:
voting: false
@ -62,7 +60,7 @@
- bifrost-integration-redfish-vmedia-uefi-ubuntu-focal
- bifrost-integration-redfish-vmedia-uefi-centos-9
- bifrost-upgrade-ubuntu-focal
# - bifrost-upgrade-keystone-centos9
- bifrost-upgrade-keystone-centos9
experimental:
jobs:
- bifrost-benchmark-ironic